Merge branch 'stable-1.2'

# Conflicts:
        #       .travis/osx..install.sh
        #       .travis/osx..script.sh
        #       cmake/linux/package_linux.sh.in
        #       data/locale/en.ts
        #       src/core/CMakeLists.txt
        #       src/core/ProjectRenderer.cpp
        #       src/gui/FileBrowser.cpp
This commit is contained in:
Hyunin Song
2018-03-07 23:32:33 +09:00
54 changed files with 5952 additions and 3202 deletions

View File

@@ -380,7 +380,7 @@ IF(WANT_JACK)
SET(STATUS_JACK "OK (weak linking enabled)")
SET(JACK_INCLUDE_DIRS "")
# use dlsym instead
SET(JACK_LIBRARIES "dl")
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
ELSE()
SET(STATUS_JACK "OK")
ENDIF()

71
buildtools/update_locales Executable file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
aberr(){ printf "[\e[31mERROR\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
abinfo(){ printf "[\e[96mINFO\e[0m]: \e[1m%s\e[0m\n" "$*" >&2; }
function upload_to_tx() {
if ! which tx > /dev/null; then
aberr "You don't have Transifex client installed. \n Run \`pip install transifex-client\` to install it."
exit 1
fi
abinfo "Uploading to transifex..."
if ! tx push -s; then
aberr "Problems occurred when uploading strings to Transifex."
printf "\t Either there are syntax errors in source file or you don't have permission to update the source file."
exit 1
fi
exit 0
}
function validate() {
ERR_LANG=""
ERR_BUF=""
for i in data/locale/*.ts; do
if ! ERR_BUF=$(lconvert-qt5 -i "${i}" -o "/tmp/test.qm" -of qm 2>&1); then
ERR_LANG+="\e[96m$(basename "${i}")\e[0m: \e[93m${ERR_BUF}\e[0m "
printf "\e[31mx\e[0m"
continue
fi
printf "\e[32m.\e[0m"
done
echo ""
if [[ "x${ERR_LANG}" != "x" ]]; then
aberr "The following files failed the validation: "
echo -e "${ERR_LANG}"
fi
}
abinfo "Checking for your environment..."
if ! which lupdate-qt5 > /dev/null; then
aberr "You don't seem to have Qt i18n tools installed."
printf "\tUsually this comes with your Qt installation, or you need to\n"
printf "\tinstall extra packages like \`qt5-tools\` or similar.\n"
exit 1;
fi
abinfo "Scanning directories..."
if test -d src/3rdparty/qt5-x11embed/3rdparty/ECM/; then
# prevent from collecting strings in ECM
rm -rf src/3rdparty/qt5-x11embed/3rdparty/ECM/
fi
if ! lupdate-qt5 -I include/ src/ plugins/ -ts data/locale/en.ts; then
aberr "There are some problems when collecting the strings."
exit 1
fi
abinfo "Validating translations..."
validate
abinfo "Translations successfully updated."
printf "Do you want to upload translations to Transifex? [y/N]: "
read -n 1 -r TX
echo ""
if [[ "$TX" == "y" || "$TX" == "Y" ]]; then
upload_to_tx
fi
abinfo "No upload as required."
exit 0

View File

@@ -8,9 +8,7 @@
set -e
USERBIN="$HOME/bin"
LINUXDEPLOYQT="$USERBIN/linuxdeployqt"
APPIMAGETOOL="$USERBIN/appimagetool"
LINUXDEPLOYQT="@CMAKE_BINARY_DIR@/linuxdeployqt"
VERBOSITY=2 # 3=debug
LOGFILE="@CMAKE_BINARY_DIR@/appimage.log"
APPDIR="@CMAKE_BINARY_DIR@/@PROJECT_NAME_UCASE@.AppDir/"
@@ -55,7 +53,7 @@ fi
echo -e "\nWriting verbose output to \"${LOGFILE}\""
# Ensure linuxdeployqt uses the same qmake version as cmake
PATH="$HOME/bin:$(dirname "@QT_QMAKE_EXECUTABLE@")":$PATH
PATH="$(pwd -P)/squashfs-root/usr/bin:$(dirname "@QT_QMAKE_EXECUTABLE@")":$PATH
export PATH
# Fetch portable linuxdeployqt if cache is older than $DAYSOLD
@@ -73,12 +71,8 @@ elif ! find "$LINUXDEPLOYQT" -mtime -$DAYSOLD 2>/dev/null|grep -q "." > /dev/nul
touch "$LINUXDEPLOYQT"
success "Downloaded $LINUXDEPLOYQT"
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
mv "squashfs-root/usr/bin/appimagetool" "$APPIMAGETOOL"
APPIMAGETOOL="squashfs-root/usr/bin/appimagetool"
success "Extracted $APPIMAGETOOL"
mv "squashfs-root/usr/bin/mksquashfs" "$USERBIN/mksquashfs"
success "Extracted $USERBIN/mksquashfs"
rm -rf "squashfs-root/"
else
skipped "$LINUXDEPLOYQT is less than $DAYSOLD days old"
fi
@@ -183,10 +177,10 @@ rm -f "${APPDIR}/usr/lib/libwine.so.1"
# Use system-provided carla
rm -f "${APPDIR}usr/lib/"libcarla*.so
# Remove problematic jack library, replace with weakjack
# Move jack out of LD_LIBRARY_PATH
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
rm -f "${APPDIR}/usr/lib/libjack.so.0"
ln -sr "${APPDIR}usr/lib/lmms/optional/libweakjack.so" "${APPDIR}usr/lib/lmms/optional/libjack.so.0"
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
mv "${APPDIR}/usr/lib/libjack.so.0" "${APPDIR}usr/lib/lmms/optional/"
fi
# Create AppImage

View File

@@ -18,23 +18,23 @@ SET(WINE_LIBRARIES ${WINE_LIBRARY} )
# Handle wine linking problems
EXEC_PROGRAM(${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT)
STRING(REPLACE " " ";" WINEBUILD_FLAGS "${WINEBUILD_OUTPUT}")
# Debian systems
IF("${WINEBUILD_OUTPUT}" MATCHES ".*x86_64-linux-gnu/wine/libwinecrt0.a.*")
SET(WINE_LIBRARY_FIX "/usr/lib/i386-linux-gnu/" )
# Fedora systems
ELSEIF("${WINEBUILD_OUTPUT}" MATCHES "/usr/lib/lib64/wine/libwinecrt0.a.*")
SET(WINE_LIBRARY_FIX "/usr/lib/i386/")
# Wine stable
ELSEIF("${WINEBUILD_OUTPUT}" MATCHES "/opt/wine-stable/lib64/wine/libwinecrt0.a.*")
SET(WINE_LIBRARY_FIX "/opt/wine-stable/lib/")
# Wine development
ELSEIF("${WINEBUILD_OUTPUT}" MATCHES "/opt/wine-devel/lib64/wine/libwinecrt0.a.*")
SET(WINE_LIBRARY_FIX "/opt/wine-devel/lib/")
# Wine staging
ELSEIF("${WINEBUILD_OUTPUT}" MATCHES "/opt/wine-staging/lib64/wine/libwinecrt0.a.*")
SET(WINE_LIBRARY_FIX "/opt/wine-staging/lib/")
ENDIF()
FOREACH(FLAG ${WINEBUILD_FLAGS})
IF("${FLAG}" MATCHES "libwinecrt0.a.*")
# Debian systems
STRING(REPLACE "/lib/x86_64-" "/lib/i386-" FLAG "${FLAG}")
# Fedora systems
STRING(REPLACE "/lib/lib64" "/lib/i386" FLAG "${FLAG}")
# Gentoo systems
STRING(REPLACE "/lib/wine-" "/lib32/wine-" FLAG "${FLAG}")
# WineHQ (/opt/wine-stable, /opt/wine-devel, /opt/wine-staging)
STRING(REPLACE "/lib64/wine/" "/lib/wine/" FLAG "${FLAG}")
STRING(REGEX REPLACE "/wine/libwinecrt0.a.*" "" WINE_LIBRARY_FIX "${FLAG}")
SET(WINE_LIBRARY_FIX "${WINE_LIBRARY_FIX}/")
ENDIF()
ENDFOREACH()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Wine DEFAULT_MSG WINE_LIBRARIES WINE_INCLUDE_DIRS)

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="117" arprange="2" arptime_denominator="4" syncmode="6" arpmode="1" arp-enabled="1" arp="0" arptime_numerator="4" arpdir="2" arpgate="20"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="0" enabled="0"/>
</instrumenttrack>
</instrumenttracksettings>

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="6" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="1" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="10">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="3" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0.15" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="7" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols link="1" ports="2">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="25" arprange="4" arptime_denominator="4" syncmode="0" arpmode="1" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="1" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="1" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="3" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="0" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="6" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols link="1" ports="2">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="4" chord-enabled="1"/>
<arpeggiator arptime="273" arprange="3" arptime_denominator="4" syncmode="5" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="1" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="-1" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="7" enabled="1">
<effect autoquit_numerator="1" autoquit_denominator="1" syncmode="0" autoquit="1" gate="0" name="stereomatrix" wet="0.38" on="1">
<stereomatrixcontrols l-l="-0.5" l-r="-0.5" r-l="-0.5" r-r="-0.5"/>

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="127" fixedoutputnote="-1" outputprogram="1" basevelocity="127" readable="0"/>
<fxchain numofeffects="2" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -14,7 +14,7 @@
</eldata>
<chordcreator chord="0" chordrange="1" chord-enabled="0"/>
<arpeggiator arptime="100" arprange="1" arptime_denominator="4" syncmode="0" arpmode="0" arp-enabled="0" arp="0" arptime_numerator="4" arpdir="0" arpgate="100"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="1"/>
<midiport inputcontroller="0" inports="" fixedoutputvelocity="-1" inputchannel="0" outputcontroller="0" writable="0" outputchannel="1" fixedinputvelocity="62" fixedoutputnote="-1" outputprogram="1" basevelocity="63" readable="0"/>
<fxchain numofeffects="1" enabled="1">
<effect autoquit_numerator="4" autoquit_denominator="4" syncmode="0" autoquit="8000" gate="0" name="ladspaeffect" wet="1" on="1">
<ladspacontrols ports="4">

View File

@@ -676,11 +676,6 @@
<fxmixer maximized="0" height="332" visible="1" minimized="0" x="9" y="530" width="530">
<fxchannel muted="0" num="0" name="Master" volume="0.31" soloed="0">
<fxchain enabled="0" numofeffects="0"/>
<connection>
<muted>
<Midicontroller outputchannel="1" outputcontroller="0" basevelocity="127" name="MIDI ch1 ctrl37" outputprogram="1" fixedinputvelocity="-1" fixedoutputvelocity="-1" fixedoutputnote="-1" inputchannel="1" inputcontroller="37" inports="" readable="1" type="2" writable="0"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView maximized="0" height="300" visible="0" minimized="0" x="955" y="413" width="400"/>

View File

@@ -190,11 +190,6 @@
<fxmixer maximized="0" height="332" visible="1" minimized="0" x="1" y="463" width="530">
<fxchannel muted="0" num="0" name="Master" volume="1" soloed="0">
<fxchain enabled="0" numofeffects="0"/>
<connection>
<muted>
<Midicontroller outputchannel="1" outputcontroller="0" basevelocity="127" name="MIDI ch1 ctrl37" outputprogram="1" fixedinputvelocity="-1" fixedoutputvelocity="-1" fixedoutputnote="-1" inputchannel="1" inputcontroller="37" inports="" readable="1" type="2" writable="0"/>
</muted>
</connection>
</fxchannel>
<fxchannel muted="0" num="1" name="Drum" volume="1" soloed="0">
<fxchain enabled="0" numofeffects="0"/>

View File

@@ -117,11 +117,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="608" y="307" maximized="0" minimized="0"/>

View File

@@ -235,11 +235,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
<fxchannel num="1" muted="0" volume="0.4" name="cr8000" soloed="0">
<fxchain numofeffects="0" enabled="0"/>

View File

@@ -134,11 +134,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="608" y="307" maximized="0" minimized="0"/>

View File

@@ -20,11 +20,6 @@
<fxmixer visible="1" width="561" height="332" x="5" y="310" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="142" x="836" y="407" maximized="0" minimized="0"/>

View File

@@ -303,11 +303,6 @@
<fxmixer visible="1" width="561" height="332" x="10" y="314" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
<fxchannel num="1" muted="0" volume="0.41" name="tr808" soloed="0">
<fxchain numofeffects="0" enabled="0"/>

View File

@@ -70,11 +70,6 @@
<fxmixer visible="1" width="647" height="332" x="9" y="441" maximized="0" minimized="0">
<fxchannel num="0" muted="0" volume="1" name="Master" soloed="0">
<fxchain numofeffects="0" enabled="0"/>
<connection>
<muted>
<Midicontroller type="2" inputchannel="1" fixedinputvelocity="-1" outputcontroller="0" inports="" name="MIDI ch1 ctrl37" outputchannel="1" fixedoutputvelocity="-1" readable="1" fixedoutputnote="-1" outputprogram="1" writable="0" basevelocity="127" inputcontroller="37"/>
</muted>
</connection>
</fxchannel>
</fxmixer>
<ControllerRackView visible="1" width="258" height="173" x="664" y="444" maximized="0" minimized="0"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -7,6 +7,28 @@ QLabel, QTreeWidget, QListWidget, QGroupBox, QMenuBar {
color: #d1d8e4;
}
QTreeView {
outline: none;
}
QTreeWidget::item:hover,
QTreeWidget::branch:hover {
background-color: #3C444E;
}
QTreeWidget::item:selected,
QTreeWidget::branch:selected {
background-color: #17793b;
}
QTreeView::branch:has-children:open {
border-image: url("resources:open_branch.png") 0;
}
QTreeView::branch:has-children:closed {
border-image: url("resources:closed_branch.png") 0;
}
QMdiArea {
background-color: #111314;
}

View File

@@ -175,6 +175,7 @@ public:
void setAudioDevice( AudioDevice * _dev,
const struct qualitySettings & _qs,
bool _needs_fifo );
void storeAudioDevice();
void restoreAudioDevice();
inline AudioDevice * audioDev()
{

View File

@@ -89,7 +89,6 @@ private:
AudioFileDevice * m_fileDev;
Mixer::qualitySettings m_qualitySettings;
Mixer::qualitySettings m_oldQualitySettings;
volatile int m_progress;
volatile bool m_abort;

View File

@@ -420,6 +420,7 @@ enum RemoteMessageIDs
IdQuit,
IdSampleRateInformation,
IdBufferSizeInformation,
IdInformationUpdated,
IdMidiEvent,
IdStartProcessing,
IdProcessingDone,
@@ -808,6 +809,7 @@ public:
{
lock();
sendMessage( message( IdSampleRateInformation ).addInt( _sr ) );
waitForMessage( IdInformationUpdated, true );
unlock();
}
@@ -1319,9 +1321,14 @@ bool RemotePluginClient::processMessage( const message & _m )
case IdSampleRateInformation:
m_sampleRate = _m.getInt();
updateSampleRate();
reply_message.id = IdInformationUpdated;
reply = true;
break;
case IdBufferSizeInformation:
// Should LMMS gain the ability to change buffer size
// without a restart, it must wait for this message to
// complete processing or else risk VST crashes
m_bufferSize = _m.getInt();
updateBufferSize();
break;

View File

@@ -65,6 +65,7 @@ private:
void restoreMutedState();
const Mixer::qualitySettings m_qualitySettings;
const Mixer::qualitySettings m_oldQualitySettings;
const OutputSettings m_outputSettings;
ProjectRenderer::ExportFileFormats m_format;
QString m_outputPath;

View File

@@ -25,6 +25,8 @@
#include <QMessageBox>
#include "VstEffect.h"
#include "GuiApplication.h"
#include "Song.h"
#include "TextFloat.h"
#include "VstSubPluginFeatures.h"
@@ -122,10 +124,14 @@ bool VstEffect::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
void VstEffect::openPlugin( const QString & _plugin )
{
TextFloat * tf = TextFloat::displayMessage(
VstPlugin::tr( "Loading plugin" ),
VstPlugin::tr( "Please wait while loading VST plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
TextFloat * tf = NULL;
if( gui )
{
tf = TextFloat::displayMessage(
VstPlugin::tr( "Loading plugin" ),
VstPlugin::tr( "Please wait while loading VST plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
}
QMutexLocker ml( &m_pluginMutex ); Q_UNUSED( ml );
m_plugin = QSharedPointer<VstPlugin>(new VstPlugin( _plugin ));

View File

@@ -192,7 +192,10 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
_ctl->m_selPresetButton->setWhatsThis(
tr( "Click here to select presets that are currently loaded in VST." ) );
_ctl->m_selPresetButton->setMenu(_ctl->menu);
QMenu * menu = new QMenu;
connect( menu, SIGNAL( aboutToShow() ), _ctl, SLOT( updateMenu() ) );
_ctl->m_selPresetButton->setMenu(menu);
_ctl->m_selPresetButton->setMinimumWidth( 16 );
_ctl->m_selPresetButton->setMaximumWidth( 16 );

View File

@@ -39,13 +39,10 @@ VstEffectControls::VstEffectControls( VstEffect * _eff ) :
m_effect( _eff ),
m_subWindow( NULL ),
knobFModel( NULL ),
vstKnobs( NULL ),
ctrHandle( NULL ),
lastPosInMenu (0)
// m_presetLabel ( NULL )
{
menu = new QMenu;
connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) );
}
@@ -72,19 +69,13 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
paramCount = dump.size();
char paramStr[35];
vstKnobs = new Knob *[ paramCount ];
knobFModel = new FloatModel *[ paramCount ];
QStringList s_dumpValues;
QWidget * widget = new QWidget();
for( int i = 0; i < paramCount; i++ )
{
sprintf( paramStr, "param%d", i );
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[i] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i]->loadSettings( _this, paramStr );
@@ -96,8 +87,6 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
}
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
vstKnobs[i]->setModel( knobFModel[i] );
}
}
@@ -358,37 +347,35 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
const QMap<QString, QString> & dump = m_effect->m_plugin->parameterDump();
m_vi->paramCount = dump.size();
bool isVstKnobs = true;
vstKnobs = new Knob *[ m_vi->paramCount ];
if (m_vi->vstKnobs == NULL) {
m_vi->vstKnobs = new Knob *[ m_vi->paramCount ];
isVstKnobs = false;
}
bool hasKnobModel = true;
if (m_vi->knobFModel == NULL) {
m_vi->knobFModel = new FloatModel *[ m_vi->paramCount ];
hasKnobModel = false;
}
char paramStr[35];
QStringList s_dumpValues;
if (isVstKnobs == false) {
for( int i = 0; i < m_vi->paramCount; i++ )
for( int i = 0; i < m_vi->paramCount; i++ )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
if( !hasKnobModel )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
m_vi->vstKnobs[ i ] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
sprintf( paramStr, "%d", i);
m_vi->knobFModel[ i ] = new FloatModel( ( s_dumpValues.at( 2 ) ).toFloat(),
0.0f, 1.0f, 0.01f, _eff, tr( paramStr ) );
connect( m_vi->knobFModel[ i ], SIGNAL( dataChanged() ), this,
SLOT( setParameter() ) );
m_vi->vstKnobs[ i ] ->setModel( m_vi->knobFModel[ i ] );
}
connect( m_vi->knobFModel[ i ], SIGNAL( dataChanged() ), this,
SLOT( setParameter() ) );
vstKnobs[ i ] ->setModel( m_vi->knobFModel[ i ] );
}
int i = 0;
@@ -398,7 +385,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
{
if( i < m_vi->paramCount )
{
l->addWidget( m_vi->vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
l->addWidget( vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
}
i++;
}
@@ -466,12 +453,12 @@ void manageVSTEffectView::displayAutomatedOnly( void )
if( !( m_vi2->knobFModel[ i ]->isAutomated() ||
m_vi2->knobFModel[ i ]->controllerConnection() ) )
{
if( m_vi2->vstKnobs[ i ]->isVisible() == true && isAuto )
if( vstKnobs[ i ]->isVisible() == true && isAuto )
{
m_vi2->vstKnobs[ i ]->hide();
vstKnobs[ i ]->hide();
m_displayAutomatedOnly->setText( "All" );
} else {
m_vi2->vstKnobs[ i ]->show();
vstKnobs[ i ]->show();
m_displayAutomatedOnly->setText( "Automated" );
}
}
@@ -502,14 +489,14 @@ manageVSTEffectView::~manageVSTEffectView()
for( int i = 0; i < m_vi2->paramCount; i++ )
{
delete m_vi2->knobFModel[ i ];
delete m_vi2->vstKnobs[ i ];
delete vstKnobs[ i ];
}
}
if( m_vi2->vstKnobs != NULL )
if( vstKnobs != NULL )
{
delete [] m_vi2->vstKnobs;
m_vi2->vstKnobs = NULL;
delete [] vstKnobs;
vstKnobs = NULL;
}
if( m_vi2->knobFModel != NULL )

View File

@@ -82,12 +82,10 @@ private:
VstEffect * m_effect;
QPushButton * m_selPresetButton;
QMenu *menu;
QMdiSubWindow * m_subWindow;
QScrollArea * m_scrollArea;
FloatModel ** knobFModel;
Knob ** vstKnobs;
int paramCount;
QObject * ctrHandle;
@@ -133,6 +131,7 @@ private:
QPushButton * m_syncButton;
QPushButton * m_displayAutomatedOnly;
QPushButton * m_closeButton;
Knob ** vstKnobs;
} ;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -84,7 +84,6 @@ vestigeInstrument::vestigeInstrument( InstrumentTrack * _instrument_track ) :
m_pluginMutex(),
m_subWindow( NULL ),
m_scrollArea( NULL ),
vstKnobs( NULL ),
knobFModel( NULL ),
p_subWindow( NULL )
{
@@ -132,19 +131,13 @@ void vestigeInstrument::loadSettings( const QDomElement & _this )
const QMap<QString, QString> & dump = m_plugin->parameterDump();
paramCount = dump.size();
char paramStr[35];
vstKnobs = new Knob *[ paramCount ];
knobFModel = new FloatModel *[ paramCount ];
QStringList s_dumpValues;
QWidget * widget = new QWidget();
for( int i = 0; i < paramCount; i++ )
{
sprintf( paramStr, "param%d", i );
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[i] = new Knob( knobBright_26, widget, s_dumpValues.at( 1 ) );
vstKnobs[i]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[i]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
knobFModel[i] = new FloatModel( 0.0f, 0.0f, 1.0f, 0.01f, this, QString::number(i) );
knobFModel[i]->loadSettings( _this, paramStr );
@@ -155,8 +148,6 @@ void vestigeInstrument::loadSettings( const QDomElement & _this )
}
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
vstKnobs[i]->setModel( knobFModel[i] );
}
}
m_pluginMutex.unlock();
@@ -267,10 +258,14 @@ void vestigeInstrument::loadFile( const QString & _file )
closePlugin();
}
m_pluginDLL = SampleBuffer::tryToMakeRelative( _file );
TextFloat * tf = TextFloat::displayMessage(
tr( "Loading plugin" ),
tr( "Please wait while loading VST-plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
TextFloat * tf = NULL;
if( gui )
{
tf = TextFloat::displayMessage(
tr( "Loading plugin" ),
tr( "Please wait while loading VST-plugin..." ),
PLUGIN_NAME::getIconPixmap( "logo", 24, 24 ), 0 );
}
m_pluginMutex.lock();
m_plugin = new VstPlugin( m_pluginDLL );
@@ -348,16 +343,9 @@ void vestigeInstrument::closePlugin( void )
for( int i = 0; i < paramCount; i++ )
{
delete knobFModel[ i ];
delete vstKnobs[ i ];
}
}
if( vstKnobs != NULL )
{
delete [] vstKnobs;
vstKnobs = NULL;
}
if( knobFModel != NULL )
{
delete [] knobFModel;
@@ -921,35 +909,34 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
const QMap<QString, QString> & dump = m_vi->m_plugin->parameterDump();
m_vi->paramCount = dump.size();
bool isVstKnobs = true;
vstKnobs = new Knob *[ m_vi->paramCount ];
if (m_vi->vstKnobs == NULL) {
m_vi->vstKnobs = new Knob *[ m_vi->paramCount ];
isVstKnobs = false;
}
bool hasKnobModel = true;
if (m_vi->knobFModel == NULL) {
m_vi->knobFModel = new FloatModel *[ m_vi->paramCount ];
hasKnobModel = false;
}
char paramStr[35];
QStringList s_dumpValues;
if (isVstKnobs == false) {
for( int i = 0; i < m_vi->paramCount; i++ )
for( int i = 0; i < m_vi->paramCount; i++ )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
vstKnobs[ i ] = new Knob( knobBright_26, this, s_dumpValues.at( 1 ) );
vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
if( !hasKnobModel )
{
sprintf( paramStr, "param%d", i);
s_dumpValues = dump[ paramStr ].split( ":" );
m_vi->vstKnobs[ i ] = new Knob( knobBright_26, this, s_dumpValues.at( 1 ) );
m_vi->vstKnobs[ i ]->setHintText( s_dumpValues.at( 1 ) + ":", "" );
m_vi->vstKnobs[ i ]->setLabel( s_dumpValues.at( 1 ).left( 15 ) );
sprintf( paramStr, "%d", i);
m_vi->knobFModel[ i ] = new FloatModel( (s_dumpValues.at( 2 )).toFloat(),
0.0f, 1.0f, 0.01f, castModel<vestigeInstrument>(), tr( paramStr ) );
connect( m_vi->knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
m_vi->vstKnobs[i] ->setModel( m_vi->knobFModel[i] );
}
connect( m_vi->knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
vstKnobs[i] ->setModel( m_vi->knobFModel[i] );
}
int i = 0;
@@ -959,7 +946,7 @@ manageVestigeInstrumentView::manageVestigeInstrumentView( Instrument * _instrume
{
if( i < m_vi->paramCount )
{
l->addWidget( m_vi->vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
l->addWidget( vstKnobs[i], lrow, lcolumn, Qt::AlignCenter );
}
i++;
}
@@ -1025,12 +1012,12 @@ void manageVestigeInstrumentView::displayAutomatedOnly( void )
if( !( m_vi->knobFModel[ i ]->isAutomated() || m_vi->knobFModel[ i ]->controllerConnection() ) )
{
if( m_vi->vstKnobs[ i ]->isVisible() == true && isAuto )
if( vstKnobs[ i ]->isVisible() == true && isAuto )
{
m_vi->vstKnobs[ i ]->hide();
vstKnobs[ i ]->hide();
m_displayAutomatedOnly->setText( "All" );
} else {
m_vi->vstKnobs[ i ]->show();
vstKnobs[ i ]->show();
m_displayAutomatedOnly->setText( "Automated" );
}
}
@@ -1045,13 +1032,13 @@ manageVestigeInstrumentView::~manageVestigeInstrumentView()
for( int i = 0; i < m_vi->paramCount; i++ )
{
delete m_vi->knobFModel[ i ];
delete m_vi->vstKnobs[ i ];
delete vstKnobs[ i ];
}
}
if (m_vi->vstKnobs != NULL) {
delete []m_vi->vstKnobs;
m_vi->vstKnobs = NULL;
if (vstKnobs != NULL) {
delete []vstKnobs;
vstKnobs = NULL;
}
if( m_vi->knobFModel != NULL )

View File

@@ -87,7 +87,6 @@ private:
QString m_pluginDLL;
QMdiSubWindow * m_subWindow;
QScrollArea * m_scrollArea;
Knob ** vstKnobs;
FloatModel ** knobFModel;
QObject * p_subWindow;
int paramCount;
@@ -130,6 +129,7 @@ private:
QPushButton * m_syncButton;
QPushButton * m_displayAutomatedOnly;
QPushButton * m_closeButton;
Knob ** vstKnobs;
} ;

View File

@@ -110,6 +110,7 @@ static VstHostLanguages hlang = LanguageEnglish;
static bool EMBED = false;
static bool EMBED_X11 = false;
static bool EMBED_WIN32 = false;
static bool HEADLESS = false;
class RemoteVstPlugin;
@@ -237,21 +238,16 @@ public:
// has to be called as soon as input- or output-count changes
void updateInOutCount();
inline void lock()
{
pthread_mutex_lock( &m_pluginLock );
}
inline void unlock()
{
pthread_mutex_unlock( &m_pluginLock );
}
inline void lockShm()
{
pthread_mutex_lock( &m_shmLock );
}
inline bool tryLockShm()
{
return pthread_mutex_trylock( &m_shmLock ) == 0;
}
inline void unlockShm()
{
pthread_mutex_unlock( &m_shmLock );
@@ -318,22 +314,8 @@ private:
bool load( const std::string & _plugin_file );
// thread-safe dispatching of plugin
int pluginDispatch( int cmd, int param1 = 0, int param2 = 0,
void * p = NULL, float f = 0 )
{
int ret = 0;
lock();
if( m_plugin )
{
ret = m_plugin->dispatcher( m_plugin, cmd, param1, param2, p, f );
}
unlock();
return ret;
}
// thread-safe dispatching of plugin
int pluginDispatchNoLocking( int cmd, int param1 = 0, int param2 = 0, void * p = NULL, float f = 0 )
{
if( m_plugin )
{
@@ -354,9 +336,7 @@ private:
int m_windowHeight;
bool m_initialized;
bool m_registeredWindowClass;
pthread_mutex_t m_pluginLock;
bool m_processing;
std::queue<message> m_messageList;
@@ -407,8 +387,6 @@ RemoteVstPlugin::RemoteVstPlugin( const char * socketPath ) :
m_windowWidth( 0 ),
m_windowHeight( 0 ),
m_initialized( false ),
m_registeredWindowClass( false ),
m_pluginLock(),
m_processing( false ),
m_messageList(),
m_shouldGiveIdle( false ),
@@ -424,7 +402,6 @@ RemoteVstPlugin::RemoteVstPlugin( const char * socketPath ) :
m_shmID( -1 ),
m_vstSyncData( NULL )
{
pthread_mutex_init( &m_pluginLock, NULL );
pthread_mutex_init( &m_shmLock, NULL );
__plugin = this;
@@ -518,7 +495,6 @@ RemoteVstPlugin::~RemoteVstPlugin()
delete[] m_outputs;
pthread_mutex_destroy( &m_shmLock );
pthread_mutex_destroy( &m_pluginLock );
}
@@ -623,9 +599,7 @@ bool RemoteVstPlugin::processMessage( const message & _m )
break;
case IdVstSetParameter:
lock();
m_plugin->setParameter( m_plugin, _m.getInt( 0 ), _m.getFloat( 1 ) );
unlock();
//sendMessage( IdVstSetParameter );
break;
@@ -660,12 +634,8 @@ void RemoteVstPlugin::init( const std::string & _plugin_file )
}
updateInOutCount();
// some plugins have to set samplerate during init
if( m_vstSyncData->hasSHM )
{
updateSampleRate();
}
updateBufferSize();
updateSampleRate();
/* set program to zero */
/* i comment this out because it breaks dfx Geometer
@@ -718,7 +688,7 @@ static void close_check( int fd )
void RemoteVstPlugin::initEditor()
{
if( m_window || !( m_plugin->flags & effFlagsHasEditor ) )
if( HEADLESS || m_window || !( m_plugin->flags & effFlagsHasEditor ) )
{
return;
}
@@ -732,27 +702,6 @@ void RemoteVstPlugin::initEditor()
}
if( !m_registeredWindowClass )
{
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = DefWindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInst;
wc.hIcon = LoadIcon( NULL, IDI_APPLICATION );
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "LVSL";
if( !RegisterClass( &wc ) )
{
return;
}
m_registeredWindowClass = true;
}
DWORD dwStyle;
if (EMBED) {
dwStyle = WS_POPUP | WS_SYSMENU | WS_BORDER;
@@ -906,13 +855,14 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
// now we're ready to fetch sound from VST-plugin
lock();
lockShm();
if( !tryLockShm() )
{
return;
}
if( !isShmValid() )
{
unlockShm();
unlock();
return;
}
@@ -943,7 +893,6 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
#endif
unlockShm();
unlock();
m_currentSamplePos += bufferSize();
}
@@ -1050,8 +999,6 @@ void RemoteVstPlugin::sendCurrentProgramName()
void RemoteVstPlugin::getParameterDump()
{
lock();
message m( IdVstParameterDump );
m.addInt( m_plugin->numParams );
@@ -1059,7 +1006,7 @@ void RemoteVstPlugin::getParameterDump()
{
char paramName[32];
memset( paramName, 0, sizeof( paramName ) );
pluginDispatchNoLocking( effGetParamName, i, 0, paramName );
pluginDispatch( effGetParamName, i, 0, paramName );
paramName[sizeof(paramName)-1] = 0;
m.addInt( i );
@@ -1067,8 +1014,6 @@ void RemoteVstPlugin::getParameterDump()
m.addFloat( m_plugin->getParameter( m_plugin, i ) );
}
unlock();
sendMessage( m );
}
@@ -1077,7 +1022,6 @@ void RemoteVstPlugin::getParameterDump()
void RemoteVstPlugin::setParameterDump( const message & _m )
{
lock();
const int n = _m.getInt( 0 );
const int params = ( n > m_plugin->numParams ) ?
m_plugin->numParams : n;
@@ -1090,7 +1034,6 @@ void RemoteVstPlugin::setParameterDump( const message & _m )
item.value = _m.getFloat( ++p );
m_plugin->setParameter( m_plugin, item.index, item.value );
}
unlock();
}
@@ -1243,14 +1186,12 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
chunk_size = m_plugin->numParams * sizeof( float );
data = new char[ chunk_size ];
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( data );
lock();
for ( int i = 0; i < m_plugin->numParams; i++ )
{
float value = m_plugin->getParameter( m_plugin, i );
unsigned int * pValue = ( unsigned int * ) &value;
toUIntArray[ i ] = endian_swap( *pValue );
}
unlock();
} else chunk_size = (((m_plugin->numParams * sizeof( float )) + 56)*m_plugin->numPrograms);
}
@@ -1296,14 +1237,12 @@ void RemoteVstPlugin::savePreset( const std::string & _file )
pluginDispatch( effSetProgram, 0, j );
pluginDispatch( effGetProgramName, 0, 0, pBank->prgName );
fwrite ( pBank, 1, 56, stream );
lock();
for ( int i = 0; i < m_plugin->numParams; i++ )
{
value = m_plugin->getParameter( m_plugin, i );
pValue = ( unsigned int * ) &value;
toUIntArray[ i ] = endian_swap( *pValue );
}
unlock();
fwrite ( data, 1, chunk_size, stream );
}
pluginDispatch( effSetProgram, 0, currProgram );
@@ -1370,7 +1309,6 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
pluginDispatch( 24, 1, len, chunk );
else
{
lock();
unsigned int* toUIntArray = reinterpret_cast<unsigned int*>( chunk );
for (int i = 0; i < pBank->numPrograms; i++ )
{
@@ -1378,7 +1316,6 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
pFloat = ( float* ) &toUInt;
m_plugin->setParameter( m_plugin, i, *pFloat );
}
unlock();
}
} else {
if(pBank->fxMagic != 0x6B427846) {
@@ -1389,7 +1326,6 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
int currProgram = pluginDispatch( effGetProgram );
chunk = new char[ len = sizeof(float)*m_plugin->numParams ];
toUIntArray = reinterpret_cast<unsigned int *>( chunk );
lock();
for (int i =0; i < numPrograms; i++) {
if ( fread (pBank, 1, 56, stream) != 56 )
{
@@ -1410,7 +1346,6 @@ void RemoteVstPlugin::loadPresetFile( const std::string & _file )
m_plugin->setParameter( m_plugin, j, *pFloat );
}
}
unlock();
pluginDispatch( effSetProgram, 0, currProgram );
fclose( stream );
}
@@ -1542,7 +1477,7 @@ intptr_t RemoteVstPlugin::hostCallback( AEffect * _effect, int32_t _opcode,
// value is 0 for input and != 0 otherwise. note: the
// return value is 0 for <true> such that older versions
// will always return true.
return 1;
return 0;
case audioMasterGetTime:
SHOW_CALLBACK( "amc: audioMasterGetTime\n" );
@@ -2062,6 +1997,29 @@ int main( int _argc, char * * _argv )
}
#endif
HMODULE hInst = GetModuleHandle( NULL );
if( hInst == NULL )
{
return -1;
}
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = DefWindowProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInst;
wc.hIcon = LoadIcon( NULL, IDI_APPLICATION );
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
wc.hbrBackground = NULL;
wc.lpszMenuName = NULL;
wc.lpszClassName = "LVSL";
if( !RegisterClass( &wc ) )
{
return -1;
}
{
#ifdef SYNC_WITH_SHM_FIFO
int embedMethodIndex = 3;
@@ -2073,27 +2031,32 @@ int main( int _argc, char * * _argv )
if ( embedMethod == "none" )
{
cerr << "Starting detached." << endl;
EMBED = EMBED_X11 = EMBED_WIN32 = false;
EMBED = EMBED_X11 = EMBED_WIN32 = HEADLESS = false;
}
else if ( embedMethod == "win32" )
{
cerr << "Starting using Win32-native embedding." << endl;
EMBED = EMBED_WIN32 = true; EMBED_X11= false;
EMBED = EMBED_WIN32 = true; EMBED_X11 = HEADLESS = false;
}
else if ( embedMethod == "qt" )
{
cerr << "Starting using Qt-native embedding." << endl;
EMBED = true; EMBED_X11 = EMBED_WIN32 = false;
EMBED = true; EMBED_X11 = EMBED_WIN32 = HEADLESS = false;
}
else if ( embedMethod == "xembed" )
{
cerr << "Starting using X11Embed protocol." << endl;
EMBED = EMBED_X11 = true; EMBED_WIN32 = false;
EMBED = EMBED_X11 = true; EMBED_WIN32 = HEADLESS = false;
}
else if ( embedMethod == "headless" )
{
cerr << "Starting without UI." << endl;
HEADLESS = true; EMBED = EMBED_X11 = EMBED_WIN32 = false;
}
else
{
cerr << "Unknown embed method " << embedMethod << ". Starting detached instead." << endl;
EMBED = EMBED_X11 = EMBED_WIN32 = false;
EMBED = EMBED_X11 = EMBED_WIN32 = HEADLESS = false;
}
}

View File

@@ -88,7 +88,9 @@ public:
VstPlugin::VstPlugin( const QString & _plugin ) :
m_plugin( _plugin ),
m_pluginWindowID( 0 ),
m_embedMethod( ConfigManager::inst()->vstEmbedMethod() ),
m_embedMethod( gui
? ConfigManager::inst()->vstEmbedMethod()
: "headless" ),
m_badDllFormat( false ),
m_version( 0 ),
m_currentProgram()
@@ -306,6 +308,7 @@ void VstPlugin::updateSampleRate()
lock();
sendMessage( message( IdSampleRateInformation ).
addInt( Engine::mixer()->processingSampleRate() ) );
waitForMessage( IdInformationUpdated, true );
unlock();
}
@@ -574,7 +577,7 @@ void VstPlugin::showUI()
{
RemotePlugin::showUI();
}
else
else if ( m_embedMethod != "headless" )
{
if (! pluginWidget()) {
createUI( NULL, false );

View File

@@ -62,18 +62,11 @@ public:
waitForMessage( IdInitDone );
pthread_mutex_init( &m_guiMutex, NULL );
pthread_create( &m_guiThreadHandle, NULL, guiThread, this );
pthread_create( &m_messageThreadHandle, NULL, messageLoop, this );
}
virtual ~RemoteZynAddSubFx()
{
m_guiExit = true;
#ifdef LMMS_BUILD_WIN32
Sleep( m_guiSleepTime * 2 );
#else
usleep( m_guiSleepTime * 2 * 1000 );
#endif
Nio::stop();
}
@@ -87,7 +80,7 @@ public:
LocalZynAddSubFx::setBufferSize( bufferSize() );
}
void run()
void messageLoop()
{
message m;
while( ( m = receiveMessage() ).id != IdQuit )
@@ -96,6 +89,7 @@ public:
processMessage( m );
pthread_mutex_unlock( &m_master->mutex );
}
m_guiExit = true;
}
virtual bool processMessage( const message & _m )
@@ -151,23 +145,22 @@ public:
LocalZynAddSubFx::processAudio( _out );
}
static void * guiThread( void * _arg )
static void * messageLoop( void * _arg )
{
RemoteZynAddSubFx * _this =
static_cast<RemoteZynAddSubFx *>( _arg );
_this->guiThread();
_this->messageLoop();
return NULL;
}
void guiLoop();
private:
void guiThread();
const int m_guiSleepTime;
pthread_t m_guiThreadHandle;
pthread_t m_messageThreadHandle;
pthread_mutex_t m_guiMutex;
std::queue<RemotePluginClient::message> m_guiMessages;
bool m_guiExit;
@@ -177,7 +170,7 @@ private:
void RemoteZynAddSubFx::guiThread()
void RemoteZynAddSubFx::guiLoop()
{
int exitProgram = 0;
MasterUI * ui = NULL;
@@ -292,7 +285,7 @@ int main( int _argc, char * * _argv )
RemoteZynAddSubFx * remoteZASF = new RemoteZynAddSubFx( _argv[1] );
#endif
remoteZASF->run();
remoteZASF->guiLoop();
delete remoteZASF;

View File

@@ -114,7 +114,7 @@ IF(LMMS_BUILD_WIN32)
ENDIF()
IF(LMMS_BUILD_APPLE)
SET(EXTRA_LIBRARIES "-framework CoreMIDI")
SET(EXTRA_LIBRARIES "-framework CoreMIDI -framework CoreFoundation")
ENDIF()
if(LMMS_HAVE_OSS AND LMMS_BUILD_OPENBSD)

View File

@@ -189,7 +189,7 @@ MidiTime AutomationPattern::timeMapLength() const
{
if( m_timeMap.isEmpty() ) return 0;
timeMap::const_iterator it = m_timeMap.end();
return MidiTime( qMax( MidiTime( (it-1).key() ).getTact() + 1, 1 ), 0 );
return MidiTime( MidiTime( (it-1).key() ).nextFullTact(), 0 );
}

View File

@@ -225,9 +225,9 @@ bool ConfigManager::hasWorkingDir() const
}
void ConfigManager::setWorkingDir( const QString & _wd )
void ConfigManager::setWorkingDir( const QString & wd )
{
m_workingDir = ensureTrailingSlash( _wd );
m_workingDir = ensureTrailingSlash( QFileInfo( wd ).canonicalFilePath() );
}
@@ -553,6 +553,8 @@ void ConfigManager::loadConfigFile( const QString & configFile )
}
#endif
upgrade();
QStringList searchPaths;
if(! qgetenv("LMMS_THEME_PATH").isNull())
searchPaths << qgetenv("LMMS_THEME_PATH");
@@ -564,8 +566,6 @@ void ConfigManager::loadConfigFile( const QString & configFile )
{
createWorkingDir();
}
upgrade();
}

View File

@@ -579,8 +579,6 @@ void Mixer::setAudioDevice( AudioDevice * _dev )
{
stopProcessing();
m_oldAudioDev = m_audioDev;
if( _dev == NULL )
{
printf( "param _dev == NULL in Mixer::setAudioDevice(...). "
@@ -608,7 +606,6 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
stopProcessing();
m_qualitySettings = _qs;
m_oldAudioDev = m_audioDev;
if( _dev == NULL )
{
@@ -630,6 +627,17 @@ void Mixer::setAudioDevice( AudioDevice * _dev,
void Mixer::storeAudioDevice()
{
if( !m_oldAudioDev )
{
m_oldAudioDev = m_audioDev;
}
}
void Mixer::restoreAudioDevice()
{
if( m_oldAudioDev != NULL )

View File

@@ -83,7 +83,6 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings
QThread( Engine::mixer() ),
m_fileDev( NULL ),
m_qualitySettings( qualitySettings ),
m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ),
m_progress( 0 ),
m_abort( false )
{
@@ -109,8 +108,6 @@ ProjectRenderer::ProjectRenderer( const Mixer::qualitySettings & qualitySettings
ProjectRenderer::~ProjectRenderer()
{
Engine::mixer()->restoreAudioDevice(); // Also deletes audio dev.
Engine::mixer()->changeQuality( m_oldQualitySettings );
}

View File

@@ -37,21 +37,29 @@ RenderManager::RenderManager(
ProjectRenderer::ExportFileFormats fmt,
QString outputPath) :
m_qualitySettings(qualitySettings),
m_oldQualitySettings( Engine::mixer()->currentQualitySettings() ),
m_outputSettings(outputSettings),
m_format(fmt),
m_outputPath(outputPath),
m_activeRenderer(NULL)
{
Engine::mixer()->storeAudioDevice();
}
RenderManager::~RenderManager()
{
delete m_activeRenderer;
m_activeRenderer = NULL;
Engine::mixer()->restoreAudioDevice(); // Also deletes audio dev.
Engine::mixer()->changeQuality( m_oldQualitySettings );
}
void RenderManager::abortProcessing()
{
if ( m_activeRenderer ) {
disconnect( m_activeRenderer, SIGNAL( finished() ),
this, SLOT( renderNextTrack() ) );
m_activeRenderer->abortProcessing();
}
restoreMutedState();

View File

@@ -1415,7 +1415,8 @@ QString SampleBuffer::tryToMakeRelative( const QString & file )
{
if( QFileInfo( file ).isRelative() == false )
{
QString f = QString( file ).replace( QDir::separator(), '/' );
// Normalize the path
QString f = QFileInfo( file ).canonicalFilePath().replace( QDir::separator(), '/' );
// First, look in factory samples
// Isolate "samples/" from "data:/samples/"

View File

@@ -119,6 +119,8 @@ void ExportProjectDialog::accept()
{
m_renderManager.reset(nullptr);
QDialog::accept();
gui->mainWindow()->resetWindowTitle();
}

View File

@@ -427,7 +427,7 @@ void FileBrowserTreeWidget::mousePressEvent(QMouseEvent * me )
m_previewPlayHandle = s;
delete tf;
}
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "sf3" || f->extension() == "gig" ) &&
else if( ( f->extension ()== "xiz" || f->extension() == "sf2" || f->extension() == "sf3" || f->extension() == "gig" || f->extension() == "pat" ) &&
! pluginFactory->pluginSupportingExtension(f->extension()).isNull() )
{
m_previewPlayHandle = new PresetPreviewPlayHandle( f->fullName(), f->handling() == FileItem::LoadByPlugin );
@@ -492,6 +492,10 @@ void FileBrowserTreeWidget::mouseMoveEvent( QMouseEvent * me )
new StringPairDrag( "soundfontfile", f->fullName(),
embed::getIconPixmap( "soundfont_file" ), this );
break;
case FileItem::PatchFile:
new StringPairDrag( "patchfile", f->fullName(),
embed::getIconPixmap( "sample_file" ), this );
break;
case FileItem::VstPluginFile:
new StringPairDrag( "vstpluginfile", f->fullName(),
embed::getIconPixmap( "vst_plugin_file" ), this );

View File

@@ -340,7 +340,7 @@ void TrackContainerView::dragEnterEvent( QDragEnterEvent * _dee )
{
StringPairDrag::processDragEnterEvent( _dee,
QString( "presetfile,pluginpresetfile,samplefile,instrument,"
"importedproject,soundfontfile,vstpluginfile,projectfile,"
"importedproject,soundfontfile,patchfile,vstpluginfile,projectfile,"
"track_%1,track_%2" ).
arg( Track::InstrumentTrack ).
arg( Track::SampleTrack ) );
@@ -378,7 +378,8 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
_de->accept();
}
else if( type == "samplefile" || type == "pluginpresetfile"
|| type == "soundfontfile" || type == "vstpluginfile")
|| type == "soundfontfile" || type == "vstpluginfile"
|| type == "patchfile" )
{
InstrumentTrack * it = dynamic_cast<InstrumentTrack *>(
Track::create( Track::InstrumentTrack,

View File

@@ -2058,7 +2058,8 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
pauseTestNotes( false );
}
}
else if( ( edit_note || m_action == ActionChangeNoteProperty ) &&
else if( m_editMode != ModeErase &&
( edit_note || m_action == ActionChangeNoteProperty ) &&
( me->buttons() & Qt::LeftButton || me->buttons() & Qt::MiddleButton
|| ( me->buttons() & Qt::RightButton && me->modifiers() & Qt::ShiftModifier ) ) )
{
@@ -2120,9 +2121,14 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
bool isUnderPosition = n->withinRange( ticks_start, ticks_end );
// Play note under the cursor
if ( isUnderPosition ) { testPlayNote( n ); }
// If note is the one under the cursor or is selected when alt is
// not pressed
if ( ( isUnderPosition && !isSelection() ) || ( n->selected() && !altPressed ) )
// If note is:
// Under the cursor, when there is no selection
// Selected, and alt is not pressed
// Under the cursor, selected, and alt is pressed
if ( ( isUnderPosition && !isSelection() ) ||
( n->selected() && !altPressed ) ||
( isUnderPosition && n->selected() && altPressed )
)
{
if( m_noteEditMode == NoteEditVolume )
{
@@ -2248,9 +2254,11 @@ void PianoRoll::mouseMoveEvent( QMouseEvent * me )
--m_selectedKeys;
}
}
else if( m_editMode == ModeDraw && me->buttons() & Qt::RightButton )
else if( ( m_editMode == ModeDraw && me->buttons() & Qt::RightButton )
|| ( m_editMode == ModeErase && me->buttons() ) )
{
// holding down right-click to delete notes
// holding down right-click to delete notes or holding down
// any key if in erase mode
// get tick in which the user clicked
int pos_ticks = x * MidiTime::ticksPerTact() / m_ppt +
@@ -3403,6 +3411,7 @@ void PianoRoll::record()
return;
}
m_pattern->addJournalCheckPoint();
m_recording = true;
Engine::getSong()->playPattern( m_pattern, false );
@@ -3422,6 +3431,7 @@ void PianoRoll::recordAccompany()
return;
}
m_pattern->addJournalCheckPoint();
m_recording = true;
if( m_pattern->getTrack()->trackContainer() == Engine::getSong() )
@@ -3756,7 +3766,7 @@ void PianoRoll::pasteNotes()
// create the note
Note cur_note;
cur_note.restoreState( list.item( i ).toElement() );
cur_note.setPos( cur_note.pos() + m_timeLine->pos() );
cur_note.setPos( cur_note.pos() + Note::quantized( m_timeLine->pos(), quantization() ) );
// select it
cur_note.setSelected( true );

View File

@@ -188,6 +188,13 @@ void Fader::mousePressEvent( QMouseEvent* mouseEvent )
if( mouseEvent->button() == Qt::LeftButton &&
! ( mouseEvent->modifiers() & Qt::ControlModifier ) )
{
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->addJournalCheckPoint();
thisModel->saveJournallingState( false );
}
if( mouseEvent->y() >= knobPosY() - ( *m_knob ).height() && mouseEvent->y() < knobPosY() )
{
updateTextFloat();
@@ -245,8 +252,17 @@ void Fader::mouseDoubleClickEvent( QMouseEvent* mouseEvent )
void Fader::mouseReleaseEvent( QMouseEvent * _me )
void Fader::mouseReleaseEvent( QMouseEvent * mouseEvent )
{
if( mouseEvent && mouseEvent->button() == Qt::LeftButton )
{
AutomatableModel *thisModel = model();
if( thisModel )
{
thisModel->restoreJournallingState();
}
}
s_textFloat->hide();
}

View File

@@ -178,7 +178,8 @@ void LcdSpinBox::enterValue()
arg( model()->maxValue() ),
model()->value(),
model()->minValue(),
model()->maxValue(), 4, &ok );
model()->maxValue(),
model()->step<int>(), &ok );
if( ok )
{

View File

@@ -40,8 +40,11 @@ private slots:
QString absPath = fi.absoluteFilePath();
QString relPath = "drums/kick01.ogg";
QString fuzPath = absPath;
fuzPath.replace(relPath, "drums/.///kick01.ogg");
QCOMPARE(SampleBuffer::tryToMakeRelative(absPath), relPath);
QCOMPARE(SampleBuffer::tryToMakeAbsolute(relPath), absPath);
QCOMPARE(SampleBuffer::tryToMakeRelative(fuzPath), relPath);
}
} RelativePathTests;