Compare commits
211 Commits
v1.2.0-rc4
...
v1.2.0-rc6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1349d45d72 | ||
|
|
75a6502100 | ||
|
|
24ae559de5 | ||
|
|
235e8eef6f | ||
|
|
55d3fbc908 | ||
|
|
b808631975 | ||
|
|
8e9f74df37 | ||
|
|
fcc883f887 | ||
|
|
ee18011dc7 | ||
|
|
49dcd385f5 | ||
|
|
55da698d7c | ||
|
|
1220374a7f | ||
|
|
a2cb7e96ea | ||
|
|
3e8120d532 | ||
|
|
daa3f53515 | ||
|
|
68a621cc16 | ||
|
|
0caaebaecb | ||
|
|
bb43bfb961 | ||
|
|
5d90aecac9 | ||
|
|
03aa5fb3c7 | ||
|
|
511c7a64fe | ||
|
|
af61a82df8 | ||
|
|
9a52c7b901 | ||
|
|
08573fc96d | ||
|
|
ccd4ff3c2c | ||
|
|
84d3c935de | ||
|
|
832e87725a | ||
|
|
386c471ed7 | ||
|
|
fce9326192 | ||
|
|
e614711d29 | ||
|
|
d65fdd4ee6 | ||
|
|
50eada6b2b | ||
|
|
33368bd9d0 | ||
|
|
aaee2ecb15 | ||
|
|
22ca47abba | ||
|
|
18a4346fd5 | ||
|
|
07a23c4e3b | ||
|
|
e554a4c4b0 | ||
|
|
00f9590b18 | ||
|
|
d30a22487e | ||
|
|
b77027d6fb | ||
|
|
ee910d38fe | ||
|
|
1df461d64d | ||
|
|
3673e84ac1 | ||
|
|
ac543ffc75 | ||
|
|
87e6b48df7 | ||
|
|
fc5fc1cbaa | ||
|
|
0d1c874a60 | ||
|
|
7a8a925b83 | ||
|
|
6cd5317e09 | ||
|
|
b4e78065e7 | ||
|
|
a54c54097f | ||
|
|
e9b83378f9 | ||
|
|
ec0f47e9e3 | ||
|
|
38b69a7e3a | ||
|
|
788c990ae1 | ||
|
|
533f475943 | ||
|
|
1d63bd3b4e | ||
|
|
926b6542ae | ||
|
|
9f1c73bc12 | ||
|
|
063a505026 | ||
|
|
a8e8746011 | ||
|
|
31775752b4 | ||
|
|
33d2b71b01 | ||
|
|
fc9c3eadef | ||
|
|
edc8f43d5b | ||
|
|
3980e54667 | ||
|
|
0f0b08b852 | ||
|
|
a39ea2b163 | ||
|
|
c3b4767836 | ||
|
|
27007c258a | ||
|
|
a193ec25f2 | ||
|
|
e2c71e3369 | ||
|
|
d0b3be7f00 | ||
|
|
709fc7948b | ||
|
|
6e0dda692a | ||
|
|
46512fdf19 | ||
|
|
59eba30d33 | ||
|
|
bd8c27249f | ||
|
|
96c5f05120 | ||
|
|
a3d72def4d | ||
|
|
2c3df226ee | ||
|
|
7de9649b2f | ||
|
|
c3438a1b4e | ||
|
|
eb9b460925 | ||
|
|
481cb2e889 | ||
|
|
1279244e50 | ||
|
|
7c71bc657c | ||
|
|
19f48898a7 | ||
|
|
76766c4c85 | ||
|
|
5bad0ea8c0 | ||
|
|
54be88f536 | ||
|
|
5174bdaa0d | ||
|
|
a653d01ac8 | ||
|
|
06c40fc821 | ||
|
|
260c1843dd | ||
|
|
45d6b299ef | ||
|
|
dd4a73eb4b | ||
|
|
d711b8b55e | ||
|
|
6cc118c259 | ||
|
|
d146308c02 | ||
|
|
ee9b593e26 | ||
|
|
898e7999dc | ||
|
|
7ae348eb10 | ||
|
|
a446775c80 | ||
|
|
ae488b89cd | ||
|
|
d0194e6c64 | ||
|
|
72dcefc5f2 | ||
|
|
8c02495f27 | ||
|
|
238d6b627c | ||
|
|
7019cabb51 | ||
|
|
46ef3c6a11 | ||
|
|
23cb3852ac | ||
|
|
e95e3793b4 | ||
|
|
3d47344297 | ||
|
|
a8aa3e153f | ||
|
|
c6ae1dcba6 | ||
|
|
55076d0bb0 | ||
|
|
72e882af88 | ||
|
|
55ce90ec00 | ||
|
|
463d02e299 | ||
|
|
7da7a70d60 | ||
|
|
b0f64dea7f | ||
|
|
df3c07bbed | ||
|
|
514ae34df3 | ||
|
|
3de3ea6b16 | ||
|
|
b68dc572a3 | ||
|
|
01265ace66 | ||
|
|
601046aa03 | ||
|
|
de98781df4 | ||
|
|
7ed9bea9fb | ||
|
|
358a251cff | ||
|
|
f9f4d0cb9c | ||
|
|
a8311a7b49 | ||
|
|
0dbbdd9f4c | ||
|
|
43ae3c6376 | ||
|
|
d4d909cd9e | ||
|
|
48b9b6508e | ||
|
|
8baf42fca0 | ||
|
|
0dbdafc1f8 | ||
|
|
eb09ff6f25 | ||
|
|
6fd38fee9f | ||
|
|
2b6f366063 | ||
|
|
6eb447deb7 | ||
|
|
e3ba9ba9be | ||
|
|
421a85d2e1 | ||
|
|
e95fdcc37d | ||
|
|
472a74d252 | ||
|
|
134dae80d5 | ||
|
|
415316f722 | ||
|
|
6839746344 | ||
|
|
298f1ec335 | ||
|
|
a3c7328f9c | ||
|
|
0c31cf49c0 | ||
|
|
f15acb8620 | ||
|
|
88b940fa05 | ||
|
|
7e107f5914 | ||
|
|
60e9b2f474 | ||
|
|
9715da332b | ||
|
|
05971cac6a | ||
|
|
f9ab2dec02 | ||
|
|
de20d76c8e | ||
|
|
fbfcb43aeb | ||
|
|
9341acd129 | ||
|
|
8d6cb120b9 | ||
|
|
81966fa1a6 | ||
|
|
20ea945cee | ||
|
|
4594e7e237 | ||
|
|
9d560a3104 | ||
|
|
6fc4577f10 | ||
|
|
6e5d82f954 | ||
|
|
3e90e37352 | ||
|
|
c051e9bf34 | ||
|
|
221d0cb355 | ||
|
|
eaa7b0dd7c | ||
|
|
2930ef69cd | ||
|
|
2d07efd1dd | ||
|
|
54f3eccad7 | ||
|
|
f24f8c7b00 | ||
|
|
d0cd42ee5e | ||
|
|
2d583db990 | ||
|
|
6da87379b4 | ||
|
|
e7e24935b3 | ||
|
|
ffa1b63f05 | ||
|
|
df37833ca5 | ||
|
|
e7d06759b5 | ||
|
|
ddab534656 | ||
|
|
f7dab939ae | ||
|
|
bd33475534 | ||
|
|
0d3aaf667b | ||
|
|
def2b7d509 | ||
|
|
d9626e9e3b | ||
|
|
000fe2da7b | ||
|
|
dc4a3875a3 | ||
|
|
7ce60c247a | ||
|
|
8fdcc6ccac | ||
|
|
0e311ffd47 | ||
|
|
f097be6c40 | ||
|
|
adef05fb71 | ||
|
|
e661d26f42 | ||
|
|
47d0e66fcc | ||
|
|
7a9396d6ea | ||
|
|
d04fd9f542 | ||
|
|
2d35de4182 | ||
|
|
f87f3638e1 | ||
|
|
12f6ea5566 | ||
|
|
e3d3052e42 | ||
|
|
6395cd4c41 | ||
|
|
ebe63d1425 | ||
|
|
878dd94e8d | ||
|
|
a81f4ca8e9 |
11
.circleci/config.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# Dummy CircleCI Config File
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
branches:
|
||||
ignore: stable-1.2
|
||||
steps:
|
||||
- run:
|
||||
name: Dummy
|
||||
command: echo "Dummy command to prevent error"
|
||||
2
.github/no-response.yml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Label requiring a response
|
||||
responseRequiredLabel: "response required"
|
||||
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
[submodule "src/3rdparty/qt5-x11embed"]
|
||||
path = src/3rdparty/qt5-x11embed
|
||||
url = https://github.com/Lukas-W/qt5-x11embed.git
|
||||
[submodule "src/3rdparty/rpmalloc/rpmalloc"]
|
||||
path = src/3rdparty/rpmalloc/rpmalloc
|
||||
url = https://github.com/rampantpixels/rpmalloc.git
|
||||
@@ -12,10 +12,12 @@ matrix:
|
||||
- env: TARGET_OS=win64
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
- env: QT5=
|
||||
- env: QT5=True
|
||||
- env: QT5=True TARGET_OS=win32
|
||||
- env: QT5=True TARGET_OS=win64
|
||||
- os: osx
|
||||
osx_image: xcode8.2
|
||||
env: QT5=True
|
||||
before_install:
|
||||
- . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo add-apt-repository ppa:beineri/opt-qt592-trusty -y
|
||||
sudo add-apt-repository ppa:andrewrk/libgroove -y
|
||||
sudo sed -e "s/trusty/precise/" -i \
|
||||
/etc/apt/sources.list.d/andrewrk-libgroove-trusty.list
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGES="cmake libsndfile-dev fftw3-dev libvorbis-dev libogg-dev libmp3lame-dev
|
||||
libasound2-dev libjack-dev libsdl-dev libsamplerate0-dev libstk0-dev
|
||||
libfluidsynth-dev portaudio19-dev wine-dev g++-multilib libfltk1.3-dev
|
||||
libasound2-dev libjack-jackd2-dev libsdl-dev libsamplerate0-dev libstk0-dev stk
|
||||
libfluidsynth-dev portaudio19-dev g++-multilib libfltk1.3-dev
|
||||
libgig-dev libsoundio-dev"
|
||||
|
||||
VST_PACKAGES="wine-dev libqt5x11extras5-dev qtbase5-private-dev libxcb-util0-dev libxcb-keysyms1-dev"
|
||||
|
||||
# Help with unmet dependencies
|
||||
PACKAGES="$PACKAGES libjack0"
|
||||
PACKAGES="$PACKAGES $VST_PACKAGES libjack-jackd2-0"
|
||||
|
||||
if [ $QT5 ]; then
|
||||
PACKAGES="$PACKAGES qtbase5-dev qttools5-dev-tools qttools5-dev"
|
||||
PACKAGES="$PACKAGES qt59base qt59translations qt59tools"
|
||||
else
|
||||
PACKAGES="$PACKAGES libqt4-dev"
|
||||
fi
|
||||
|
||||
sudo apt-get install -y $PACKAGES
|
||||
|
||||
# kxstudio repo offers Carla; avoid package conflicts (wine, etc) by running last
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/libs
|
||||
sudo add-apt-repository -y ppa:kxstudio-debian/apps
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y carla-git
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
if [ $QT5 ]; then
|
||||
unset QTDIR QT_PLUGIN_PATH LD_LIBRARY_PATH
|
||||
source /opt/qt59/bin/qt59-env.sh
|
||||
fi
|
||||
|
||||
cmake -DUSE_WERROR=ON $CMAKE_FLAGS ..
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk portaudio node fltk"
|
||||
PACKAGES="cmake pkgconfig fftw libogg libvorbis lame libsndfile libsamplerate jack sdl libgig libsoundio stk fluid-synth portaudio node fltk"
|
||||
|
||||
if [ $QT5 ]; then
|
||||
PACKAGES="$PACKAGES homebrew/versions/qt55"
|
||||
PACKAGES="$PACKAGES qt5"
|
||||
else
|
||||
PACKAGES="$PACKAGES cartr/qt4/qt"
|
||||
fi
|
||||
|
||||
brew install $PACKAGES ccache
|
||||
|
||||
# Recompile fluid-synth without CoreAudio per issues #649
|
||||
# Changes to fluid-synth.rb must be pushed to URL prior to use
|
||||
url=$(git remote get-url origin)
|
||||
branch=$(git symbolic-ref --short HEAD)
|
||||
brew install --build-from-source $url/raw/$branch/cmake/apple/fluid-synth.rb
|
||||
|
||||
sudo npm install -g appdmg
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
if [ $QT5 ]; then
|
||||
# Workaround; No FindQt5.cmake module exists
|
||||
export CMAKE_PREFIX_PATH="$(brew --prefix qt55)"
|
||||
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)"
|
||||
fi
|
||||
|
||||
cmake $CMAKE_FLAGS -DUSE_WERROR=OFF ..
|
||||
|
||||
@@ -9,6 +9,7 @@ IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
IF (CMAKE_MAJOR_VERSION GREATER 2)
|
||||
CMAKE_POLICY(SET CMP0026 OLD)
|
||||
CMAKE_POLICY(SET CMP0045 NEW)
|
||||
CMAKE_POLICY(SET CMP0050 OLD)
|
||||
ENDIF()
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
@@ -19,8 +20,7 @@ INCLUDE(FindPkgConfig)
|
||||
|
||||
STRING(TOUPPER "${CMAKE_PROJECT_NAME}" PROJECT_NAME_UCASE)
|
||||
|
||||
# Updated by maintenance tasks
|
||||
SET(PROJECT_YEAR 2015)
|
||||
SET(PROJECT_YEAR 2018)
|
||||
|
||||
SET(PROJECT_AUTHOR "LMMS Developers")
|
||||
SET(PROJECT_URL "https://lmms.io")
|
||||
@@ -30,7 +30,7 @@ SET(PROJECT_COPYRIGHT "2008-${PROJECT_YEAR} ${PROJECT_AUTHOR}")
|
||||
SET(VERSION_MAJOR "1")
|
||||
SET(VERSION_MINOR "2")
|
||||
SET(VERSION_RELEASE "0")
|
||||
SET(VERSION_STAGE "rc4")
|
||||
SET(VERSION_STAGE "rc6")
|
||||
SET(VERSION_BUILD "0")
|
||||
SET(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}")
|
||||
IF(VERSION_STAGE)
|
||||
@@ -51,6 +51,7 @@ OPTION(WANT_CAPS "Include C* Audio Plugin Suite (LADSPA plugins)" ON)
|
||||
OPTION(WANT_CARLA "Include Carla plugin" ON)
|
||||
OPTION(WANT_CMT "Include Computer Music Toolkit LADSPA plugins" ON)
|
||||
OPTION(WANT_JACK "Include JACK (Jack Audio Connection Kit) support" ON)
|
||||
OPTION(WANT_WEAKJACK "Loosely link JACK libraries" ON)
|
||||
OPTION(WANT_MP3LAME "Include MP3/Lame support" ON)
|
||||
OPTION(WANT_OGGVORBIS "Include OGG/Vorbis support" ON)
|
||||
OPTION(WANT_PULSEAUDIO "Include PulseAudio support" ON)
|
||||
@@ -84,12 +85,14 @@ IF(LMMS_BUILD_WIN32)
|
||||
SET(WANT_ALSA OFF)
|
||||
SET(WANT_JACK OFF)
|
||||
SET(WANT_PULSEAUDIO OFF)
|
||||
SET(WANT_PORTAUDIO OFF)
|
||||
SET(WANT_SOUNDIO OFF)
|
||||
SET(WANT_WINMM ON)
|
||||
SET(LMMS_HAVE_WINMM TRUE)
|
||||
SET(STATUS_ALSA "<not supported on this platform>")
|
||||
SET(STATUS_JACK "<not supported on this platform>")
|
||||
SET(STATUS_PULSEAUDIO "<not supported on this platform>")
|
||||
SET(STATUS_PORTAUDIO "<disabled on this platform>")
|
||||
SET(STATUS_SOUNDIO "<disabled in this release>")
|
||||
SET(STATUS_WINMM "OK")
|
||||
SET(STATUS_APPLEMIDI "<not supported on this platform>")
|
||||
@@ -152,6 +155,14 @@ IF(WANT_QT5)
|
||||
Qt5::Xml
|
||||
)
|
||||
|
||||
IF(LMMS_BUILD_LINUX)
|
||||
FIND_PACKAGE(Qt5X11Extras REQUIRED)
|
||||
LIST(APPEND QT_LIBRARIES Qt5::X11Extras)
|
||||
ENDIF()
|
||||
|
||||
# Resolve Qt5::qmake to full path for use in packaging scripts
|
||||
GET_TARGET_PROPERTY(QT_QMAKE_EXECUTABLE "${Qt5Core_QMAKE_EXECUTABLE}" IMPORTED_LOCATION)
|
||||
|
||||
FIND_PACKAGE(Qt5Test)
|
||||
SET(QT_QTTEST_LIBRARY Qt5::Test)
|
||||
ELSE()
|
||||
@@ -364,8 +375,16 @@ ENDIF(NOT LMMS_HAVE_ALSA)
|
||||
IF(WANT_JACK)
|
||||
PKG_CHECK_MODULES(JACK jack>=0.77)
|
||||
IF(JACK_FOUND)
|
||||
IF(WANT_WEAKJACK)
|
||||
SET(LMMS_HAVE_WEAKJACK TRUE)
|
||||
SET(STATUS_JACK "OK (weak linking enabled)")
|
||||
SET(JACK_INCLUDE_DIRS "")
|
||||
# use dlsym instead
|
||||
SET(JACK_LIBRARIES ${CMAKE_DL_LIBS})
|
||||
ELSE()
|
||||
SET(STATUS_JACK "OK")
|
||||
ENDIF()
|
||||
SET(LMMS_HAVE_JACK TRUE)
|
||||
SET(STATUS_JACK "OK")
|
||||
ELSE(JACK_FOUND)
|
||||
SET(STATUS_JACK "not found, please install libjack0.100.0-dev (or similar) "
|
||||
"if you require JACK support")
|
||||
@@ -424,7 +443,11 @@ IF(WANT_VST)
|
||||
FIND_PACKAGE(Wine)
|
||||
IF(WINE_FOUND)
|
||||
SET(LMMS_SUPPORT_VST TRUE)
|
||||
SET(STATUS_VST "OK")
|
||||
IF(WINE_LIBRARY_FIX)
|
||||
SET(STATUS_VST "OK, with workaround linking ${WINE_LIBRARY_FIX}")
|
||||
ELSE()
|
||||
SET(STATUS_VST "OK")
|
||||
ENDIF()
|
||||
ELSEIF(WANT_VST_NOWINE)
|
||||
SET(LMMS_SUPPORT_VST TRUE)
|
||||
SET(STATUS_VST "OK")
|
||||
@@ -473,6 +496,22 @@ FILE(REMOVE include/lmmsconfig.h)
|
||||
FILE(GLOB LMMS_INCLUDES "${CMAKE_SOURCE_DIR}/include/*.h")
|
||||
LIST(SORT LMMS_INCLUDES)
|
||||
|
||||
# Get list of all committers from git history, ordered by number of commits.
|
||||
# The CONTRIBUTORS file is used by AboutDialog. This information can be provided
|
||||
# with -DCONTRIBUTORS=/path/to/CONTRIBUTORS instead. For instance, to generate
|
||||
# this file for version 1.1.3, the command is:
|
||||
# git shortlog -sne v1.1.3 | cut -c8-
|
||||
FIND_PACKAGE(Git)
|
||||
IF(GIT_FOUND AND NOT CONTRIBUTORS)
|
||||
SET(CONTRIBUTORS "${CMAKE_BINARY_DIR}/CONTRIBUTORS")
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND "${GIT_EXECUTABLE}" shortlog -sne
|
||||
COMMAND cut -c8-
|
||||
OUTPUT_FILE "${CONTRIBUTORS}"
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
TIMEOUT 1)
|
||||
ENDIF()
|
||||
|
||||
# embedded resources stuff
|
||||
IF(WIN32 OR WIN64)
|
||||
# compile buildtools native
|
||||
|
||||
71
buildtools/update_locales
Executable 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
|
||||
@@ -1,42 +0,0 @@
|
||||
# Copyright (c) 2009-present, Homebrew contributors
|
||||
# License: BSD 2-Clause
|
||||
|
||||
class FluidSynth < Formula
|
||||
desc "Real-time software synthesizer based on the SoundFont 2 specs"
|
||||
homepage "http://www.fluidsynth.org"
|
||||
url "https://downloads.sourceforge.net/project/fluidsynth/fluidsynth-1.1.6/fluidsynth-1.1.6.tar.gz"
|
||||
sha256 "50853391d9ebeda9b4db787efb23f98b1e26b7296dd2bb5d0d96b5bccee2171c"
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
rebuild 1
|
||||
sha256 "ee86f0e263db0610a340592d725bd2c05bc5ed1bfa6eb496ae304297de261ae0" => :sierra
|
||||
sha256 "dfe31491d27c3c29ff4686900984e5884f89cd249d82b3dba4ad077f7bbe9057" => :el_capitan
|
||||
sha256 "6938c03a61b696870de92435dc0a6e6118fbb0d68adcd0d17ec8d30c2f7eee20" => :yosemite
|
||||
sha256 "5c5e00f88e45dd661c15f0e13793f9cc96f285b08200145ce8b77982350a5625" => :mavericks
|
||||
sha256 "83b972cf7aec57e78dc1c1a6b3e286d8b9bf2a2622e174bca42efa8576e36e5f" => :mountain_lion
|
||||
end
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "cmake" => :build
|
||||
depends_on "glib"
|
||||
depends_on "libsndfile" => :optional
|
||||
depends_on "portaudio" => :optional
|
||||
|
||||
def install
|
||||
args = std_cmake_args
|
||||
args << "-Denable-framework=OFF" << "-DLIB_SUFFIX="
|
||||
args << "-Denable-portaudio=ON" if build.with? "portaudio"
|
||||
args << "-Denable-libsndfile=OFF" if build.without? "libsndfile"
|
||||
args << "-Denable-coreaudio=OFF" # Per lmms/issues/649
|
||||
|
||||
mkdir "build" do
|
||||
system "cmake", "..", *args
|
||||
system "make", "install"
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match /#{version}/, shell_output("#{bin}/fluidsynth --version")
|
||||
end
|
||||
end
|
||||
@@ -1,4 +1,19 @@
|
||||
INSTALL(FILES lmms.png DESTINATION "${DATA_DIR}/pixmaps")
|
||||
INSTALL(FILES lmms DESTINATION "${DATA_DIR}/menu")
|
||||
INSTALL(FILES lmms.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/apps")
|
||||
INSTALL(FILES project.svg DESTINATION "${DATA_DIR}/icons/hicolor/scalable/mimetypes/" RENAME "application-x-lmms-project.svg")
|
||||
INSTALL(FILES lmms.desktop DESTINATION "${DATA_DIR}/applications")
|
||||
INSTALL(FILES lmms.xml DESTINATION "${DATA_DIR}/mime/packages")
|
||||
|
||||
# AppImage creation target
|
||||
SET(APPIMAGE_FILE "${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}-${VERSION}-linux-${CMAKE_SYSTEM_PROCESSOR}.AppImage")
|
||||
|
||||
CONFIGURE_FILE("package_linux.sh.in" "${CMAKE_BINARY_DIR}/package_linux.sh" @ONLY)
|
||||
|
||||
FILE(REMOVE "${APPIMAGE_FILE}")
|
||||
ADD_CUSTOM_TARGET(removeappimage
|
||||
COMMAND rm -f "${APPIMAGE_FILE}"
|
||||
COMMENT "Removing old AppImage")
|
||||
ADD_CUSTOM_TARGET(appimage
|
||||
COMMAND chmod +x "${CMAKE_BINARY_DIR}/package_linux.sh"
|
||||
COMMAND "${CMAKE_BINARY_DIR}/package_linux.sh"
|
||||
COMMENT "Generating AppImage")
|
||||
ADD_DEPENDENCIES(appimage removeappimage)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
?package(lmms):needs="X11" section="Apps/Sound" \
|
||||
title="LMMS" hints="Audio" command="/usr/bin/lmms" \
|
||||
longtitle="LMMS" \
|
||||
icon="/usr/share/pixmaps/lmms.png"
|
||||
icon="/usr/share/icons/hicolor/scalable/apps/lmms.svg"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Name=LMMS
|
||||
GenericName=music production suite
|
||||
GenericName=Music production suite
|
||||
GenericName[ca]=Programari de producció musical
|
||||
GenericName[de]=Software zur Musik-Produktion
|
||||
GenericName[fr]=Ensemble pour la production musicale
|
||||
Comment=easy music production for everyone!
|
||||
Comment=Music sequencer and synthesizer
|
||||
Comment[ca]=Producció fàcil de música per a tothom!
|
||||
Comment[fr]=Production facile de musique pour tout le monde !
|
||||
Icon=lmms
|
||||
|
||||
1540
cmake/linux/lmms.svg
Normal file
|
After Width: | Height: | Size: 54 KiB |
@@ -4,11 +4,7 @@
|
||||
<sub-class-of type="application/xml"/>
|
||||
<comment>LMMS project</comment>
|
||||
<comment xml:lang="ca">Projecte LMMS</comment>
|
||||
<glob pattern="*.mmp"/>
|
||||
<glob pattern="*.mmpz"/>
|
||||
<magic priority="80">
|
||||
<match type="string" value="<!DOCTYPE multimedia-project" offset="0:256"/>
|
||||
<match type="string" value="<multimedia-project" offset="0:64"/>
|
||||
</magic>
|
||||
<glob pattern="*.mmp"/>
|
||||
</mime-type>
|
||||
</mime-info>
|
||||
|
||||
190
cmake/linux/package_linux.sh.in
Normal file
@@ -0,0 +1,190 @@
|
||||
#!/usr/bin/env bash
|
||||
# Creates Linux ".AppImage" for @PROJECT_NAME_UCASE@
|
||||
#
|
||||
# Depends: linuxdeployqt
|
||||
#
|
||||
# Notes: Will attempt to fetch linuxdeployqt automatically (x86_64 only)
|
||||
# See Also: https://github.com/probonopd/linuxdeployqt/blob/master/BUILDING.md
|
||||
|
||||
set -e
|
||||
|
||||
LINUXDEPLOYQT="@CMAKE_BINARY_DIR@/linuxdeployqt"
|
||||
VERBOSITY=2 # 3=debug
|
||||
LOGFILE="@CMAKE_BINARY_DIR@/appimage.log"
|
||||
APPDIR="@CMAKE_BINARY_DIR@/@PROJECT_NAME_UCASE@.AppDir/"
|
||||
DESKTOPFILE="${APPDIR}usr/share/applications/lmms.desktop"
|
||||
STRIP=""
|
||||
|
||||
# Don't strip for Debug|RelWithDebInfo builds
|
||||
if [[ "@CMAKE_BUILD_TYPE@" == *"Deb"* ]]; then
|
||||
STRIP="-no-strip"
|
||||
fi
|
||||
|
||||
# Console colors
|
||||
RED="\\x1B[1;31m"
|
||||
GREEN="\\x1B[1;32m"
|
||||
YELLOW="\\x1B[1;33m"
|
||||
PLAIN="\\x1B[0m"
|
||||
|
||||
function error {
|
||||
echo -e " ${PLAIN}[${RED}error${PLAIN}] ${1}"
|
||||
return 1
|
||||
}
|
||||
|
||||
function success {
|
||||
echo -e " ${PLAIN}[${GREEN}success${PLAIN}] ${1}"
|
||||
}
|
||||
|
||||
function skipped {
|
||||
echo -e " ${PLAIN}[${YELLOW}skipped${PLAIN}] ${1}"
|
||||
}
|
||||
|
||||
# Blindly assume system arch is appimage arch
|
||||
ARCH=$(arch)
|
||||
export ARCH
|
||||
|
||||
# Check for problematic install locations
|
||||
INSTALL=$(echo "@CMAKE_INSTALL_PREFIX@" | sed 's/\/*$//g')
|
||||
if [ "$INSTALL" == "/usr/local" ] || [ "$INSTALL" == "/usr" ] ; then
|
||||
error "Incompatible CMAKE_INSTALL_PREFIX for creating AppImage: @CMAKE_INSTALL_PREFIX@"
|
||||
fi
|
||||
|
||||
echo -e "\nWriting verbose output to \"${LOGFILE}\""
|
||||
|
||||
# Ensure linuxdeployqt uses the same qmake version as cmake
|
||||
export PATH="$(pwd -P)/squashfs-root/usr/bin:$(dirname "@QT_QMAKE_EXECUTABLE@")":$PATH
|
||||
|
||||
# Fetch portable linuxdeployqt if cache is older than $DAYSOLD
|
||||
echo -e "\nDownloading linuxdeployqt to ${LINUXDEPLOYQT}..."
|
||||
mkdir -p "$HOME/bin"
|
||||
DAYSOLD=2
|
||||
if env -i which linuxdeployqt > /dev/null 2>&1; then
|
||||
skipped "System already provides this utility"
|
||||
elif ! find "$LINUXDEPLOYQT" -mtime -$DAYSOLD 2>/dev/null|grep -q "." > /dev/null 2>&1; then
|
||||
url="https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -p).AppImage"
|
||||
echo " [.......] Couldn't find linuxdeployqt newer than $DAYSOLD days old"
|
||||
echo " [.......] Downloading ($(uname -p)): ${url}"
|
||||
wget "$url" -O "$LINUXDEPLOYQT" -q || (rm "$LINUXDEPLOYQT" && false)
|
||||
chmod +x "$LINUXDEPLOYQT"
|
||||
touch "$LINUXDEPLOYQT"
|
||||
success "Downloaded $LINUXDEPLOYQT"
|
||||
"$LINUXDEPLOYQT" --appimage-extract > /dev/null 2>&1
|
||||
APPIMAGETOOL="squashfs-root/usr/bin/appimagetool"
|
||||
success "Extracted $APPIMAGETOOL"
|
||||
else
|
||||
skipped "$LINUXDEPLOYQT is less than $DAYSOLD days old"
|
||||
fi
|
||||
|
||||
# Make skeleton AppDir
|
||||
echo -e "\nCreating ${APPDIR}..."
|
||||
rm -rf "${APPDIR}"
|
||||
mkdir -p "${APPDIR}usr"
|
||||
success "Created ${APPDIR}"
|
||||
|
||||
# Clone install to AppDir
|
||||
echo -e "\nCopying @CMAKE_INSTALL_PREFIX@ to ${APPDIR}..."
|
||||
cp -R "@CMAKE_INSTALL_PREFIX@/." "${APPDIR}usr"
|
||||
rm -rf "${APPDIR}usr/include"
|
||||
success "${APPDIR}"
|
||||
|
||||
# Copy rawwaves directory for stk/mallets
|
||||
mkdir -p "${APPDIR}usr/share/stk/"
|
||||
cp -R /usr/share/stk/rawwaves/ "${APPDIR}usr/share/stk/"
|
||||
|
||||
# Create a wrapper script which calls the lmms executable
|
||||
mv "${APPDIR}usr/bin/lmms" "${APPDIR}usr/bin/lmms.real"
|
||||
# shellcheck disable=SC1083
|
||||
cat >"${APPDIR}usr/bin/lmms" <<EOL
|
||||
#!/usr/bin/env bash
|
||||
DIR="\$( cd "\$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
|
||||
if which carla > /dev/null 2>&1; then
|
||||
CARLAPATH="$(which carla)"
|
||||
CARLAPREFIX="\${CARLAPATH%/bin*}"
|
||||
echo "Carla appears to be installed on this system at \$CARLAPREFIX/lib[64]/carla so we'll use it."
|
||||
export LD_LIBRARY_PATH=\$CARLAPREFIX/lib/carla:\$CARLAPREFIX/lib64/carla:\$LD_LIBRARY_PATH
|
||||
else
|
||||
echo "Carla does not appear to be installed. That's OK, please ignore any related library errors."
|
||||
fi
|
||||
export LD_LIBRARY_PATH=\$DIR/usr/lib/:\$DIR/usr/lib/lmms:\$LD_LIBRARY_PATH
|
||||
# Prevent segfault on VirualBox
|
||||
if lsmod |grep vboxguest > /dev/null 2>&1; then
|
||||
echo "VirtualBox detected. Forcing libgl software rendering."
|
||||
export LIBGL_ALWAYS_SOFTWARE=1;
|
||||
fi
|
||||
if ldconfig -p | grep libjack.so.0 > /dev/null 2>&1; then
|
||||
echo "Jack appears to be installed on this system, so we'll use it."
|
||||
else
|
||||
echo "Jack does not appear to be installed. That's OK, we'll use a dummy version instead."
|
||||
export LD_LIBRARY_PATH=\$DIR/usr/lib/lmms/optional:\$LD_LIBRARY_PATH
|
||||
fi
|
||||
QT_X11_NO_NATIVE_MENUBAR=1 \$DIR/usr/bin/lmms.real "\$@"
|
||||
EOL
|
||||
|
||||
chmod +x "${APPDIR}usr/bin/lmms"
|
||||
|
||||
# Per https://github.com/probonopd/linuxdeployqt/issues/129
|
||||
unset LD_LIBRARY_PATH
|
||||
|
||||
# Ensure linuxdeployqt can find shared objects
|
||||
export LD_LIBRARY_PATH="${APPDIR}usr/lib/lmms/":$LD_LIBRARY_PATH
|
||||
|
||||
# Handle wine linking
|
||||
if [ -d "@WINE_LIBRARY_FIX@" ]; then
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:@WINE_LIBRARY_FIX@:@WINE_LIBRARY_FIX@wine/
|
||||
fi
|
||||
|
||||
# Move executables so linuxdeployqt can find them
|
||||
ZYNLIB="${APPDIR}usr/lib/lmms/RemoteZynAddSubFx"
|
||||
VSTLIB="${APPDIR}usr/lib/lmms/RemoteVstPlugin.exe.so"
|
||||
|
||||
ZYNBIN="${APPDIR}usr/bin/RemoteZynAddSubFx"
|
||||
VSTBIN="${APPDIR}usr/bin/RemoteVstPlugin.exe.so"
|
||||
|
||||
mv "$ZYNLIB" "$ZYNBIN"
|
||||
mv "$VSTLIB" "$VSTBIN"
|
||||
|
||||
# Patch the desktop file
|
||||
sed -i 's/.*Exec=.*/Exec=lmms.real/' "$DESKTOPFILE"
|
||||
|
||||
# Fix linking for soft-linked plugins
|
||||
for file in "${APPDIR}usr/lib/lmms/"*.so; do
|
||||
thisfile="${APPDIR}usr/lib/lmms/${file##*/}"
|
||||
executables="${executables} -executable=$thisfile"
|
||||
done
|
||||
executables="${executables} -executable=${ZYNBIN}"
|
||||
executables="${executables} -executable=${VSTBIN}"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imp_1199.so"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/imbeq_1197.so"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale_1193.so"
|
||||
executables="${executables} -executable=${APPDIR}usr/lib/lmms/ladspa/pitch_scale_1194.so"
|
||||
|
||||
# Bundle both qt and non-qt dependencies into appimage format
|
||||
echo -e "\nBundling and relinking system dependencies..."
|
||||
echo -e ">>>>> linuxdeployqt" > "$LOGFILE"
|
||||
# shellcheck disable=SC2086
|
||||
"$LINUXDEPLOYQT" "$DESKTOPFILE" $executables -bundle-non-qt-libs -verbose=$VERBOSITY $STRIP >> "$LOGFILE" 2>&1
|
||||
success "Bundled and relinked dependencies"
|
||||
|
||||
# Link to original location so lmms can find them
|
||||
ln -sr "$ZYNBIN" "$ZYNLIB"
|
||||
ln -sr "$VSTBIN" "$VSTLIB"
|
||||
|
||||
# Remove wine library conflict
|
||||
rm -f "${APPDIR}/usr/lib/libwine.so.1"
|
||||
|
||||
# Use system-provided carla
|
||||
rm -f "${APPDIR}usr/lib/"libcarla*.so
|
||||
|
||||
# Move jack out of LD_LIBRARY_PATH
|
||||
if [ -e "${APPDIR}/usr/lib/libjack.so.0" ]; then
|
||||
mkdir -p "${APPDIR}usr/lib/lmms/optional/"
|
||||
mv "${APPDIR}/usr/lib/libjack.so.0" "${APPDIR}usr/lib/lmms/optional/"
|
||||
fi
|
||||
|
||||
# Create AppImage
|
||||
echo -e "\nFinishing the AppImage..."
|
||||
echo -e "\n\n>>>>> appimagetool" >> "$LOGFILE"
|
||||
"$APPIMAGETOOL" "${APPDIR}" "@APPIMAGE_FILE@" >> "$LOGFILE" 2>&1
|
||||
success "Created @APPIMAGE_FILE@"
|
||||
|
||||
echo -e "\nFinished"
|
||||
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
@@ -7,13 +7,35 @@
|
||||
# WINE_DEFINITIONS - Compiler switches required for using wine
|
||||
#
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine)
|
||||
LIST(APPEND CMAKE_PREFIX_PATH /opt/wine-stable /opt/wine-devel /opt/wine-staging)
|
||||
|
||||
FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine wine/wine)
|
||||
FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine i386-linux-gnu/wine)
|
||||
FIND_PROGRAM(WINE_CXX NAMES wineg++ winegcc winegcc64 winegcc32)
|
||||
|
||||
set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} )
|
||||
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}")
|
||||
|
||||
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)
|
||||
|
||||
|
||||
7083
data/locale/en.ts
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -20,21 +20,12 @@
|
||||
<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"/>
|
||||
<pianoroll visible="0" width="640" height="480" x="1" y="1" maximized="0" minimized="0"/>
|
||||
<automationeditor visible="0" width="640" height="400" x="56" y="255" maximized="0" minimized="0"/>
|
||||
<projectnotes visible="0" width="640" height="400" x="1" y="1" maximized="0" minimized="0"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Verdana'; font-size:11pt; font-weight:600; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Droid Sans'; font-size:10pt; font-weight:400; color:#e0e0e0;">Put down your project notes here.</span></p></body></html>]]></projectnotes>
|
||||
<projectnotes visible="0" width="640" height="400" x="1" y="1" maximized="0" minimized="0"></projectnotes>
|
||||
<timeline lp0pos="0" lp1pos="192" lpstate="0"/>
|
||||
<controllers/>
|
||||
</song>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -78,11 +78,7 @@
|
||||
<ControllerRackView width="350" x="680" y="310" maximized="0" height="200" visible="1" minimized="0"/>
|
||||
<pianoroll width="640" x="5" y="5" maximized="0" height="480" visible="0" minimized="0"/>
|
||||
<automationeditor width="640" x="-36" y="0" maximized="0" height="400" visible="0" minimized="0"/>
|
||||
<projectnotes width="640" x="700" y="10" maximized="0" height="400" visible="0" minimized="0"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Noto Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#e0e0e0;">Enter project notes here</span></p></body></html>]]></projectnotes>
|
||||
<projectnotes width="640" x="700" y="10" maximized="0" height="400" visible="0" minimized="0"></projectnotes>
|
||||
<timeline lp1pos="192" lp0pos="0" lpstate="0"/>
|
||||
<controllers/>
|
||||
</song>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -127,7 +127,7 @@ PianoRoll {
|
||||
qproperty-noteBorders: true; /* boolean property, set false to have borderless notes */
|
||||
qproperty-selectedNoteColor: rgb( 0, 125, 255 );
|
||||
qproperty-barColor: #4afd85;
|
||||
qproperty-markedSemitoneColor: rgba( 40, 40, 40, 200 );
|
||||
qproperty-markedSemitoneColor: rgba( 0, 255, 200, 60 );
|
||||
/* Grid colors */
|
||||
qproperty-lineColor: rgba( 128, 128, 128, 80 );
|
||||
qproperty-beatLineColor: rgba( 128, 128, 128, 160 );
|
||||
|
||||
BIN
data/themes/default/closed_branch.png
Executable file
|
After Width: | Height: | Size: 288 B |
|
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 808 B |
|
Before Width: | Height: | Size: 637 B After Width: | Height: | Size: 799 B |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 803 B |
BIN
data/themes/default/open_branch.png
Executable file
|
After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 111 KiB |
@@ -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;
|
||||
}
|
||||
@@ -122,9 +144,9 @@ PianoRoll {
|
||||
qproperty-noteColor: #0bd556;
|
||||
qproperty-noteOpacity: 165;
|
||||
qproperty-noteBorders: false; /* boolean property, set false to have borderless notes */
|
||||
qproperty-selectedNoteColor: #006b65;
|
||||
qproperty-selectedNoteColor: #064d79;
|
||||
qproperty-barColor: #078f3a;
|
||||
qproperty-markedSemitoneColor: #06170E;
|
||||
qproperty-markedSemitoneColor: rgba(255, 255, 255, 30);
|
||||
/* Grid colors */
|
||||
qproperty-lineColor: #292929;
|
||||
qproperty-beatLineColor: #2d6b45;
|
||||
|
||||
@@ -28,11 +28,16 @@
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifdef LMMS_HAVE_JACK
|
||||
#ifndef LMMS_HAVE_WEAKJACK
|
||||
#include <jack/jack.h>
|
||||
#else
|
||||
#include "AudioWeakJack.h"
|
||||
#endif
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <QMutexLocker>
|
||||
|
||||
#include "AudioDevice.h"
|
||||
#include "AudioDeviceSetupWidget.h"
|
||||
@@ -103,6 +108,7 @@ private:
|
||||
|
||||
bool m_active;
|
||||
bool m_stopped;
|
||||
QMutex m_processingMutex;
|
||||
|
||||
MidiJack *m_midiClient;
|
||||
QVector<jack_port_t *> m_outputPorts;
|
||||
|
||||
@@ -72,6 +72,8 @@ private:
|
||||
|
||||
struct sio_hdl *m_hdl;
|
||||
struct sio_par m_par;
|
||||
|
||||
bool m_convertEndian;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
162
include/AudioWeakJack.def
Normal file
@@ -0,0 +1,162 @@
|
||||
/* macro-absraction of the JACK API
|
||||
*
|
||||
* see weak_libjack.c for details, in general arguments are:
|
||||
*
|
||||
* [required], [return type], [name], [arguments], [code or return value]
|
||||
*
|
||||
* This file is included multiple times with different macro definitions
|
||||
* do not add header guards.
|
||||
* see https://en.wikibooks.org/wiki/C_Programming/Preprocessor#X-Macros
|
||||
*/
|
||||
|
||||
#ifdef USE_WEAK_JACK
|
||||
|
||||
/* <jack/jack.h> */
|
||||
JCFUN(1, int, client_close, 0)
|
||||
JCFUN(1, char*, get_client_name, NULL)
|
||||
JVFUN(0, on_shutdown, (jack_client_t *c, JackShutdownCallback s, void *a), (c,s,a),)
|
||||
JVFUN(0, on_info_shutdown, (jack_client_t *c, JackInfoShutdownCallback s, void *a), (c,s,a),)
|
||||
|
||||
JPFUN(1, int, set_process_callback, (jack_client_t *c, JackProcessCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_freewheel_callback, (jack_client_t *c, JackFreewheelCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_buffer_size_callback, (jack_client_t *c, JackBufferSizeCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_sample_rate_callback, (jack_client_t *c, JackSampleRateCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_port_registration_callback, (jack_client_t *c, JackPortRegistrationCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_port_connect_callback, (jack_client_t *c, JackPortConnectCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_graph_order_callback, (jack_client_t *c, JackGraphOrderCallback g, void *a), (c,g,a), -1)
|
||||
JPFUN(1, int, set_xrun_callback, (jack_client_t *c, JackXRunCallback g, void *a), (c,g,a), -1)
|
||||
JPFUN(1, int, set_latency_callback, (jack_client_t *c, JackLatencyCallback g, void *a), (c,g,a), -1)
|
||||
JVFUN(1, set_error_function, (void (*f)(const char *)), (f),)
|
||||
JVFUN(1, set_info_function, (void (*f)(const char *)), (f),)
|
||||
|
||||
JCFUN(1, int, activate, -1)
|
||||
JCFUN(1, int, deactivate, -1)
|
||||
|
||||
JPFUN(1, int, client_name_size, (), (), 32)
|
||||
|
||||
JCFUN(1, jack_nframes_t, get_sample_rate, 0)
|
||||
JCFUN(1, jack_nframes_t, get_buffer_size, 0)
|
||||
JPFUN(1, jack_nframes_t, frames_since_cycle_start, (const jack_client_t *c), (c), 0)
|
||||
JPFUN(1, jack_nframes_t, frame_time, (const jack_client_t *c), (c), 0)
|
||||
JPFUN(1, jack_nframes_t, last_frame_time, (const jack_client_t *c), (c), 0)
|
||||
JPFUN(1, jack_time_t, get_time, (void), (), 0)
|
||||
JCFUN(1, float, cpu_load, 0)
|
||||
JCFUN(1, int, is_realtime, 0)
|
||||
|
||||
JPFUN(1, int, set_freewheel, (jack_client_t *c, int o), (c,o), 0)
|
||||
JPFUN(1, int, set_buffer_size, (jack_client_t *c, jack_nframes_t b), (c,b), 0)
|
||||
|
||||
JCFUN(0, int, recompute_total_latencies, 0)
|
||||
JPFUN(0, jack_nframes_t, port_get_total_latency, (jack_client_t *c, jack_port_t *p), (c,p), 0)
|
||||
JVFUN(0, port_get_latency_range, (jack_port_t *p, jack_latency_callback_mode_t m, jack_latency_range_t *r), (p,m,r), if (r) {r->min = r->max = 0;})
|
||||
JVFUN(0, port_set_latency_range, (jack_port_t *p, jack_latency_callback_mode_t m, jack_latency_range_t *r), (p,m,r),)
|
||||
|
||||
JPFUN(1, void*, port_get_buffer, (jack_port_t *p, jack_nframes_t n), (p,n), NULL)
|
||||
JPFUN(1, int, port_request_monitor, (jack_port_t *p, int o), (p,o), 0)
|
||||
JPFUN(1, int, port_ensure_monitor, (jack_port_t *p, int o), (p,o), 0)
|
||||
JPFUN(1, int, port_monitoring_input, (jack_port_t *p), (p), 0)
|
||||
|
||||
JPFUN(1, const char*, port_name, (const jack_port_t *p), (p), NULL)
|
||||
JPFUN(1, const char*, port_short_name, (const jack_port_t *p), (p), NULL)
|
||||
JPFUN(1, int, port_flags, (const jack_port_t *p), (p), 0)
|
||||
JPFUN(1, const char**, get_ports,(jack_client_t *c, const char *p, const char *t, unsigned long f), (c,p,t,f), NULL)
|
||||
JPFUN(1, int, port_name_size, (void), (), 0)
|
||||
JPFUN(1, int, port_type_size, (void), (), 0)
|
||||
JPFUN(1, size_t, port_type_get_buffer_size, (jack_client_t *c, const char *t), (c,t), 0)
|
||||
JPFUN(1, jack_port_t*, port_by_name, (jack_client_t *c, const char *n), (c,n), NULL)
|
||||
JPFUN(1, jack_port_t*, port_by_id, (jack_client_t *c, jack_port_id_t i), (c,i), NULL)
|
||||
JPFUN(1, jack_port_t*, port_register, (jack_client_t *c, const char *n, const char *t, unsigned long f, unsigned long b), (c,n,t,f,b), NULL)
|
||||
JPFUN(1, int, port_unregister, (jack_client_t *c, jack_port_t *p), (c,p), 0)
|
||||
JPFUN(1, const char *, port_type, (const jack_port_t *p), (p), 0)
|
||||
JPFUN(1, const char **, port_get_connections, (const jack_port_t *p), (p), 0)
|
||||
JPFUN(1, const char **, port_get_all_connections, (const jack_client_t *c, const jack_port_t *p), (c,p), 0)
|
||||
JPFUN(1, int, port_set_name, (jack_port_t *p, const char *n), (p,n), -1)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
JXFUN(0, int, port_rename, (jack_client_t *c, jack_port_t *p, const char *n), (c,p,n), return jack_port_set_name (p,n);)
|
||||
#pragma GCC diagnostic pop
|
||||
JPFUN(1, int, port_get_aliases, (const jack_port_t *port, char* const aliases[2]), (port,aliases), 0)
|
||||
JPFUN(1, int, port_disconnect, (jack_client_t *c, jack_port_t *p), (c,p), 0)
|
||||
JPFUN(1, int, connect, (jack_client_t *c, const char *s, const char *d), (c,s,d), -1)
|
||||
JPFUN(1, int, disconnect, (jack_client_t *c, const char *s, const char *d), (c,s,d), -1)
|
||||
JVFUN(0, free, (void *p), (p), free(p);)
|
||||
|
||||
JCFUN(1, jack_nframes_t, cycle_wait, 0)
|
||||
JVFUN(1, cycle_signal, (jack_client_t *c, int s), (c,s),)
|
||||
JPFUN(1, int, set_process_thread, (jack_client_t *c, JackThreadCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_thread_init_callback, (jack_client_t *c, JackThreadInitCallback p, void *a), (c,p,a), -1)
|
||||
|
||||
JPFUN(1, int, transport_locate, (jack_client_t *c, jack_nframes_t f), (c,f), 0)
|
||||
JVFUN(1, transport_start, (jack_client_t *c), (c),)
|
||||
JVFUN(1, transport_stop, (jack_client_t *c), (c),)
|
||||
JPFUN(1, jack_nframes_t, get_current_transport_frame, (const jack_client_t *c), (c), 0)
|
||||
JXFUN(1, jack_transport_state_t, transport_query, (const jack_client_t *c, jack_position_t *p), (c,p), memset(p, 0, sizeof(jack_position_t)); return JackTransportStopped;)
|
||||
JPFUN(1, int, set_sync_callback, (jack_client_t *c, JackSyncCallback p, void *a), (c,p,a), -1)
|
||||
JPFUN(1, int, set_timebase_callback, (jack_client_t *c, int l, JackTimebaseCallback p, void *a), (c,l,p,a), -1)
|
||||
JCFUN(1, int, release_timebase, 0)
|
||||
|
||||
/* <jack/midiport.h> */
|
||||
JPFUN(1, uint32_t, midi_get_event_count, (void* p), (p), 0)
|
||||
JPFUN(1, int, midi_event_get, (jack_midi_event_t *e, void *p, uint32_t i), (e,p,i), -1)
|
||||
JPFUN(1, int, midi_event_write, (void *b, jack_nframes_t t, const jack_midi_data_t *d, size_t s), (b,t,d,s), -1)
|
||||
JVFUN(1, midi_clear_buffer, (void *b), (b),)
|
||||
|
||||
/* <jack/session.h> */
|
||||
JPFUN(0, int, set_session_callback, (jack_client_t *c, JackSessionCallback s, void *a), (c,s,a), -1)
|
||||
JPFUN(0, int, session_reply, (jack_client_t *c, jack_session_event_t *e), (c,e), -1)
|
||||
JVFUN(0, session_event_free, (jack_session_event_t *e), (e), )
|
||||
|
||||
/* <jack/ringbuffer.h> */
|
||||
JPFUN(1, jack_ringbuffer_t *, ringbuffer_create, (size_t s), (s), NULL)
|
||||
JVFUN(1, ringbuffer_free, (jack_ringbuffer_t *rb), (rb), )
|
||||
JVFUN(1, ringbuffer_reset, (jack_ringbuffer_t *rb), (rb), )
|
||||
JVFUN(1, ringbuffer_read_advance, (jack_ringbuffer_t *rb, size_t c), (rb,c), )
|
||||
JVFUN(1, ringbuffer_write_advance, (jack_ringbuffer_t *rb, size_t c), (rb,c), )
|
||||
JPFUN(1, size_t, ringbuffer_read_space, (const jack_ringbuffer_t *rb), (rb), 0)
|
||||
JPFUN(1, size_t, ringbuffer_write_space, (const jack_ringbuffer_t *rb), (rb), 0)
|
||||
JPFUN(1, size_t, ringbuffer_read, (jack_ringbuffer_t *rb, char *d, size_t c), (rb,d,c), 0)
|
||||
JPFUN(1, size_t, ringbuffer_write, (jack_ringbuffer_t *rb, const char *s, size_t c), (rb,s,c), 0)
|
||||
JPFUN(0, int, ringbuffer_mlock, (jack_ringbuffer_t *rb), (rb), 0)
|
||||
JVFUN(0, ringbuffer_get_read_vector, (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *v), (rb,v), if (v) {v->buf=NULL; v->len=0;} )
|
||||
JVFUN(0, ringbuffer_get_write_vector, (const jack_ringbuffer_t *rb, jack_ringbuffer_data_t *v), (rb,v), if (v) {v->buf=NULL; v->len=0;} )
|
||||
JPFUN(0, size_t, ringbuffer_peek, (jack_ringbuffer_t *rb, char *d, size_t c), (rb,d,c), 0)
|
||||
|
||||
/* <jack/thread.h> */
|
||||
JCFUN(0, int, client_real_time_priority, 0)
|
||||
JCFUN(0, int, client_max_real_time_priority, 0)
|
||||
JPFUN(0, int, acquire_real_time_scheduling, (jack_native_thread_t t, int p), (t,p), 0)
|
||||
JPFUN(0, int, drop_real_time_scheduling, (jack_native_thread_t t), (t), 0)
|
||||
JPFUN(0, int, client_stop_thread, (jack_client_t* c, jack_native_thread_t t), (c,t), 0)
|
||||
JPFUN(0, int, client_kill_thread, (jack_client_t* c, jack_native_thread_t t), (c,t), 0)
|
||||
#ifndef _WIN32
|
||||
JVFUN(0, set_thread_creator, (jack_thread_creator_t c), (c),)
|
||||
#endif
|
||||
JPFUN(1, int, client_create_thread, \
|
||||
(jack_client_t* c, jack_native_thread_t *t, int p, int r, void *(*f)(void*), void *a), (c,t,p,r,f,a), 0)
|
||||
|
||||
#ifndef NO_JACK_METADATA
|
||||
/* <jack/uuid.h> - TODO*/
|
||||
|
||||
/* <jack/jack.h> */
|
||||
JPFUN(0, char *, get_uuid_for_client_name, (jack_client_t* c, const char* n), (c,n), NULL)
|
||||
JPFUN(0, char *, get_client_name_by_uuid, (jack_client_t* c, const char* u), (c,u), NULL)
|
||||
JPFUN(0, jack_uuid_t, port_uuid, (const jack_port_t *p), (p), 0)
|
||||
|
||||
/* <jack/metadata.h> */
|
||||
JPFUN(0, int, set_property, (jack_client_t* c, jack_uuid_t s, const char* k, const char* v, const char* t), (c,s,k,v,t), -1)
|
||||
JXFUN(0, int, get_property, (jack_uuid_t s, const char* k, char** v, char** t), (s,k,v,t), if (v) *v=NULL; if (t) *t=NULL; return -1;)
|
||||
JVFUN(0, free_description, (jack_description_t* d, int f), (d,f),)
|
||||
JXFUN(0, int, get_properties, (jack_uuid_t s, jack_description_t* d), (s,d), if (d) {d->properties = NULL; d->property_cnt = 0;} return -1;)
|
||||
JXFUN(0, int, get_all_properties, (jack_description_t** d), (d), if (d) *d=NULL; return -1;)
|
||||
JPFUN(0, int, remove_property, (jack_client_t* c, jack_uuid_t s, const char* k), (c,s,k), -1)
|
||||
JPFUN(0, int, remove_properties, (jack_client_t* c, jack_uuid_t s), (c,s), -1)
|
||||
JPFUN(0, int, remove_all_properties, (jack_client_t* c), (c), -1)
|
||||
JPFUN(0, int, set_property_change_callback, (jack_client_t *c, JackPropertyChangeCallback s, void *a), (c,s,a), -1)
|
||||
#endif
|
||||
|
||||
/* <jack/statistics.h> */
|
||||
JCFUN(1, float, get_max_delayed_usecs, 0.0)
|
||||
JCFUN(1, float, get_xrun_delayed_usecs, 0.0)
|
||||
JVFUN(0, reset_max_delayed_usecs, (jack_client_t *c), (c),)
|
||||
|
||||
#endif // end USE_WEAK_JACK
|
||||
237
include/AudioWeakJack.h
Normal file
@@ -0,0 +1,237 @@
|
||||
/* runtime/weak dynamic JACK linking
|
||||
*
|
||||
* (C) 2014 Robin Gareus <robin@gareus.org>
|
||||
*
|
||||
* The wrapped jack API itself is
|
||||
* (C) 2001 Paul Davis
|
||||
* (C) 2004 Jack O'Quin
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef _WEAK_JACK_H
|
||||
#define _WEAK_JACK_H
|
||||
|
||||
// LMMS uses LMMS_HAVE_WEAKJACK instead
|
||||
#ifndef USE_WEAK_JACK
|
||||
#define USE_WEAK_JACK
|
||||
#endif
|
||||
|
||||
// LMMS doesn't use metadata.h
|
||||
#ifndef NO_JACK_METADATA
|
||||
#define NO_JACK_METADATA
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/** check if libjack is available
|
||||
*
|
||||
* return 0 if libjack is dynamically linked of was
|
||||
* successfully dl-opened. Otherwise:
|
||||
*
|
||||
* -1: library was not initialized
|
||||
* -2: libjack was not found
|
||||
* > 0 bitwise flags:
|
||||
* 1: a required function was not found in libjack
|
||||
* 2: jack_client_open was not found in libjack
|
||||
*/
|
||||
int have_libjack(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_WEAK_JACK
|
||||
|
||||
/* <jack/jack.h> */
|
||||
#define jack_client_close WJACK_client_close
|
||||
#define jack_get_client_name WJACK_get_client_name
|
||||
#define jack_get_sample_rate WJACK_get_sample_rate
|
||||
#define jack_get_buffer_size WJACK_get_buffer_size
|
||||
#define jack_frames_since_cycle_start WJACK_frames_since_cycle_start
|
||||
#define jack_frame_time WJACK_frame_time
|
||||
#define jack_last_frame_time WJACK_last_frame_time
|
||||
#define jack_get_time WJACK_get_time
|
||||
#define jack_cpu_load WJACK_cpu_load
|
||||
#define jack_is_realtime WJACK_is_realtime
|
||||
|
||||
#define jack_client_name_size WJACK_client_name_size
|
||||
|
||||
#define jack_set_freewheel WJACK_set_freewheel
|
||||
#define jack_set_buffer_size WJACK_set_buffer_size
|
||||
|
||||
#define jack_on_shutdown WJACK_on_shutdown
|
||||
#define jack_on_info_shutdown WJACK_on_info_shutdown
|
||||
#define jack_set_process_callback WJACK_set_process_callback
|
||||
#define jack_set_freewheel_callback WJACK_set_freewheel_callback
|
||||
#define jack_set_buffer_size_callback WJACK_set_buffer_size_callback
|
||||
#define jack_set_sample_rate_callback WJACK_set_sample_rate_callback
|
||||
#define jack_set_port_registration_callback WJACK_set_port_registration_callback
|
||||
#define jack_set_port_connect_callback WJACK_set_port_connect_callback
|
||||
#define jack_set_graph_order_callback WJACK_set_graph_order_callback
|
||||
#define jack_set_xrun_callback WJACK_set_xrun_callback
|
||||
#define jack_set_latency_callback WJACK_set_latency_callback
|
||||
#define jack_set_error_function WJACK_set_error_function
|
||||
#define jack_set_info_function WJACK_set_info_function
|
||||
|
||||
#define jack_activate WJACK_activate
|
||||
#define jack_deactivate WJACK_deactivate
|
||||
|
||||
#define jack_recompute_total_latencies WJACK_recompute_total_latencies
|
||||
#define jack_port_get_total_latency WJACK_port_get_total_latency
|
||||
#define jack_port_get_latency_range WJACK_port_get_latency_range
|
||||
#define jack_port_set_latency_range WJACK_port_set_latency_range
|
||||
#define jack_port_get_buffer WJACK_port_get_buffer
|
||||
#define jack_port_request_monitor WJACK_port_request_monitor
|
||||
#define jack_port_ensure_monitor WJACK_port_ensure_monitor
|
||||
#define jack_port_monitoring_input WJACK_port_monitoring_input
|
||||
|
||||
#define jack_port_name WJACK_port_name
|
||||
#define jack_port_short_name WJACK_port_short_name
|
||||
#define jack_port_flags WJACK_port_flags
|
||||
#define jack_get_ports WJACK_get_ports
|
||||
#define jack_port_name_size WJACK_port_name_size
|
||||
#define jack_port_type_size WJACK_port_type_size
|
||||
#define jack_port_type_get_buffer_size WJACK_port_type_get_buffer_size
|
||||
#define jack_port_by_name WJACK_port_by_name
|
||||
#define jack_port_by_id WJACK_port_by_id
|
||||
#define jack_port_set_name WJACK_port_set_name
|
||||
#define jack_port_get_aliases WJACK_port_get_aliases
|
||||
#define jack_port_rename WJACK_port_rename
|
||||
#define jack_port_disconnect WJACK_port_disconnect
|
||||
#define jack_port_register WJACK_port_register
|
||||
#define jack_port_unregister WJACK_port_unregister
|
||||
#define jack_port_type WJACK_port_type
|
||||
#define jack_port_get_connections WJACK_port_get_connections
|
||||
#define jack_port_get_all_connections WJACK_port_get_all_connections
|
||||
#define jack_connect WJACK_connect
|
||||
#define jack_disconnect WJACK_disconnect
|
||||
#define jack_free WJACK_free
|
||||
|
||||
#define jack_cycle_wait WJACK_cycle_wait
|
||||
#define jack_cycle_signal WJACK_cycle_signal
|
||||
#define jack_set_process_thread WJACK_set_process_thread
|
||||
#define jack_set_thread_init_callback WJACK_set_thread_init_callback
|
||||
|
||||
/* <jack/transport.h> */
|
||||
#define jack_get_current_transport_frame WJACK_get_current_transport_frame
|
||||
#define jack_transport_locate WJACK_transport_locate
|
||||
#define jack_transport_start WJACK_transport_start
|
||||
#define jack_transport_stop WJACK_transport_stop
|
||||
#define jack_transport_query WJACK_transport_query
|
||||
#define jack_set_sync_callback WJACK_set_sync_callback
|
||||
#define jack_set_timebase_callback WJACK_set_timebase_callback
|
||||
#define jack_release_timebase WJACK_release_timebase
|
||||
|
||||
/* <jack/midiport.h> */
|
||||
#define jack_midi_get_event_count WJACK_midi_get_event_count
|
||||
#define jack_midi_event_get WJACK_midi_event_get
|
||||
#define jack_midi_event_write WJACK_midi_event_write
|
||||
#define jack_midi_clear_buffer WJACK_midi_clear_buffer
|
||||
|
||||
/* <jack/session.h> */
|
||||
#define jack_set_session_callback WJACK_set_session_callback
|
||||
#define jack_session_reply WJACK_session_reply
|
||||
#define jack_session_event_free WJACK_session_event_free
|
||||
|
||||
/* <jack/ringbuffer.h> */
|
||||
#define jack_ringbuffer_create WJACK_ringbuffer_create
|
||||
#define jack_ringbuffer_free WJACK_ringbuffer_free
|
||||
#define jack_ringbuffer_reset WJACK_ringbuffer_reset
|
||||
#define jack_ringbuffer_read_advance WJACK_ringbuffer_read_advance
|
||||
#define jack_ringbuffer_write_advance WJACK_ringbuffer_write_advance
|
||||
#define jack_ringbuffer_read_space WJACK_ringbuffer_read_space
|
||||
#define jack_ringbuffer_write_space WJACK_ringbuffer_write_space
|
||||
#define jack_ringbuffer_read WJACK_ringbuffer_read
|
||||
#define jack_ringbuffer_write WJACK_ringbuffer_write
|
||||
#define jack_ringbuffer_mlock WJACK_ringbuffer_mlock
|
||||
#define jack_ringbuffer_get_read_vector WJACK_ringbuffer_get_read_vector
|
||||
#define jack_ringbuffer_get_write_vector WJACK_ringbuffer_get_write_vector
|
||||
#define jack_ringbuffer_peek WJACK_ringbuffer_peek
|
||||
|
||||
/* <jack/thread.h> */
|
||||
#define jack_client_real_time_priority WJACK_client_real_time_priority
|
||||
#define jack_client_max_real_time_priority WJACK_client_max_real_time_priority
|
||||
#define jack_acquire_real_time_scheduling WJACK_acquire_real_time_scheduling
|
||||
#define jack_client_create_thread WJACK_client_create_thread
|
||||
#define jack_drop_real_time_scheduling WJACK_drop_real_time_scheduling
|
||||
#define jack_client_stop_thread WJACK_client_stop_thread
|
||||
#define jack_client_kill_thread WJACK_client_kill_thread
|
||||
#define jack_set_thread_creator WJACK_set_thread_creator
|
||||
|
||||
#define jack_client_open WJACK_client_client_openXXX
|
||||
|
||||
#ifndef NO_JACK_METADATA
|
||||
/* <jack/metadata.h> */
|
||||
#define jack_get_uuid_for_client_name WJACK_get_uuid_for_client_name
|
||||
#define jack_get_client_name_by_uuid WJACK_get_client_name_by_uuid
|
||||
#define jack_port_uuid WJACK_port_uuid
|
||||
|
||||
#define jack_set_property WJACK_set_property
|
||||
#define jack_get_property WJACK_get_property
|
||||
#define jack_free_description WJACK_free_description
|
||||
#define jack_get_properties WJACK_get_properties
|
||||
#define jack_get_all_properties WJACK_get_all_properties
|
||||
#define jack_remove_property WJACK_remove_property
|
||||
#define jack_remove_properties WJACK_remove_properties
|
||||
#define jack_remove_all_properties WJACK_remove_all_properties
|
||||
#define jack_set_property_change_callback WJACK_set_property_change_callback
|
||||
#endif
|
||||
|
||||
/* <jack/statistics.h> */
|
||||
#define jack_get_max_delayed_usecs WJACK_get_max_delayed_usecs
|
||||
#define jack_get_xrun_delayed_usecs WJACK_get_xrun_delayed_usecs
|
||||
#define jack_reset_max_delayed_usecs WJACK_reset_max_delayed_usecs
|
||||
|
||||
#endif // end USE_WEAK_JACK
|
||||
|
||||
#include <jack/jack.h>
|
||||
#include <jack/transport.h>
|
||||
#include <jack/ringbuffer.h>
|
||||
#include <jack/midiport.h>
|
||||
#include <jack/session.h>
|
||||
#include <jack/thread.h>
|
||||
|
||||
#ifndef NO_JACK_METADATA
|
||||
#include <jack/metadata.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_WEAK_JACK
|
||||
|
||||
#undef jack_client_open
|
||||
|
||||
/* var-args hack */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void (* WJACK_get_client_open (void)) (void);
|
||||
jack_client_t * WJACK_no_client_open (const char *client_name, jack_options_t options, jack_status_t *status, ...);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define jack_client_open(...) \
|
||||
( \
|
||||
(WJACK_get_client_open() != NULL) \
|
||||
? ((jack_client_t* (*)(const char *, jack_options_t, jack_status_t *, ...))(WJACK_get_client_open()))(__VA_ARGS__) \
|
||||
: WJACK_no_client_open(__VA_ARGS__) \
|
||||
)
|
||||
|
||||
#endif // end USE_WEAK_JACK
|
||||
|
||||
#endif // _WEAK_JACK_H
|
||||
@@ -25,6 +25,7 @@
|
||||
#ifndef AUTOMATABLE_MODEL_H
|
||||
#define AUTOMATABLE_MODEL_H
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "JournallingObject.h"
|
||||
|
||||
@@ -132,6 +132,7 @@ protected:
|
||||
void getSelectedValues(timeMap & selected_values );
|
||||
|
||||
void drawLine( int x0, float y0, int x1, float y1 );
|
||||
void removePoints( int x0, int x1 );
|
||||
|
||||
protected slots:
|
||||
void play();
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
MidiTime putValue( const MidiTime & time,
|
||||
const float value,
|
||||
const bool quantPos = true,
|
||||
const bool ignoreSurroundingPoints = false );
|
||||
const bool ignoreSurroundingPoints = true );
|
||||
|
||||
void removeValue( const MidiTime & time );
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ public:
|
||||
virtual bool play( MidiTime _start, const fpp_t _frames,
|
||||
const f_cnt_t _frame_base, int _tco_num = -1 );
|
||||
|
||||
virtual void updateAfterTrackAdd();
|
||||
virtual void updateAfterTrackAdd() override;
|
||||
|
||||
inline virtual QString nodeName() const
|
||||
inline virtual QString nodeName() const override
|
||||
{
|
||||
return "bbtrackcontainer";
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "export.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class LmmsCore;
|
||||
|
||||
@@ -44,16 +44,16 @@ const QString TEMPLATE_PATH = "templates/";
|
||||
const QString PRESETS_PATH = "presets/";
|
||||
const QString SAMPLES_PATH = "samples/";
|
||||
const QString GIG_PATH = "samples/gig/";
|
||||
const QString SF2_PATH = "samples/sf2/";
|
||||
const QString SF2_PATH = "samples/soundfonts/";
|
||||
const QString LADSPA_PATH ="plugins/ladspa/";
|
||||
const QString DEFAULT_THEME_PATH = "themes/default/";
|
||||
const QString TRACK_ICON_PATH = "track_icons/";
|
||||
const QString LOCALE_PATH = "locale/";
|
||||
|
||||
|
||||
class EXPORT ConfigManager
|
||||
class EXPORT ConfigManager : public QObject
|
||||
{
|
||||
MM_OPERATORS
|
||||
Q_OBJECT
|
||||
public:
|
||||
static inline ConfigManager * inst()
|
||||
{
|
||||
@@ -210,6 +210,9 @@ public:
|
||||
return m_recentlyOpenedProjects;
|
||||
}
|
||||
|
||||
static QStringList availabeVstEmbedMethods();
|
||||
QString vstEmbedMethod() const;
|
||||
|
||||
// returns true if the working dir (e.g. ~/lmms) exists on disk
|
||||
bool hasWorkingDir() const;
|
||||
|
||||
@@ -242,6 +245,8 @@ public:
|
||||
// creates the working directory & subdirectories on disk.
|
||||
void createWorkingDir();
|
||||
|
||||
signals:
|
||||
void valueChanged( QString cls, QString attribute, QString value );
|
||||
|
||||
private:
|
||||
static ConfigManager * s_instanceOfMe;
|
||||
|
||||
@@ -31,15 +31,26 @@
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000
|
||||
class MainApplication : public QApplication, public QAbstractNativeEventFilter
|
||||
#else
|
||||
class MainApplication : public QApplication
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
MainApplication(int& argc, char** argv);
|
||||
bool event(QEvent* event);
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
bool winEventFilter(MSG* msg, long* result);
|
||||
#if QT_VERSION >= 0x050000
|
||||
bool nativeEventFilter(const QByteArray& eventType, void* message,
|
||||
long* result);
|
||||
#endif
|
||||
#endif
|
||||
inline QString& queuedFile()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* MemoryManager.h - A lightweight, generic memory manager for LMMS
|
||||
* MemoryManager.h
|
||||
*
|
||||
* Copyright (c) 2017 Lukas W <lukaswhl/at/gmail.com>
|
||||
* Copyright (c) 2014 Vesa Kivimäki
|
||||
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
@@ -26,81 +27,22 @@
|
||||
#ifndef MEMORY_MANAGER_H
|
||||
#define MEMORY_MANAGER_H
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QHash>
|
||||
#include "MemoryHelper.h"
|
||||
#include <cstddef>
|
||||
#include <vector>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
class QReadWriteLock;
|
||||
|
||||
const int MM_CHUNK_SIZE = 64; // granularity of managed memory
|
||||
const int MM_INITIAL_CHUNKS = 1024 * 1024; // how many chunks to allocate at startup - TODO: make configurable
|
||||
const int MM_INCREMENT_CHUNKS = 16 * 1024; // min. amount of chunks to increment at a time
|
||||
|
||||
struct MemoryPool
|
||||
{
|
||||
void * m_pool;
|
||||
char * m_free;
|
||||
size_t m_chunks;
|
||||
QMutex m_mutex;
|
||||
|
||||
MemoryPool() :
|
||||
m_pool( NULL ),
|
||||
m_free( NULL ),
|
||||
m_chunks( 0 )
|
||||
{}
|
||||
|
||||
MemoryPool( size_t chunks ) :
|
||||
m_chunks( chunks )
|
||||
{
|
||||
m_free = reinterpret_cast<char*>( MemoryHelper::alignedMalloc( chunks ) );
|
||||
memset( m_free, 1, chunks );
|
||||
}
|
||||
|
||||
MemoryPool( const MemoryPool & mp ) :
|
||||
m_pool( mp.m_pool ),
|
||||
m_free( mp.m_free ),
|
||||
m_chunks( mp.m_chunks ),
|
||||
m_mutex()
|
||||
{}
|
||||
|
||||
MemoryPool & operator = ( const MemoryPool & mp )
|
||||
{
|
||||
m_pool = mp.m_pool;
|
||||
m_free = mp.m_free;
|
||||
m_chunks = mp.m_chunks;
|
||||
return *this;
|
||||
}
|
||||
|
||||
void * getChunks( int chunksNeeded );
|
||||
void releaseChunks( void * ptr, int chunks );
|
||||
};
|
||||
|
||||
struct PtrInfo
|
||||
{
|
||||
int chunks;
|
||||
MemoryPool * memPool;
|
||||
};
|
||||
|
||||
typedef QVector<MemoryPool> MemoryPoolVector;
|
||||
typedef QHash<void*, PtrInfo> PointerInfoMap;
|
||||
|
||||
class EXPORT MemoryManager
|
||||
{
|
||||
public:
|
||||
static bool init();
|
||||
struct ThreadGuard
|
||||
{
|
||||
ThreadGuard();
|
||||
~ThreadGuard();
|
||||
};
|
||||
|
||||
static void * alloc( size_t size );
|
||||
static void free( void * ptr );
|
||||
static int extend( int chunks ); // returns index of created pool (for use by alloc)
|
||||
static void cleanup();
|
||||
|
||||
private:
|
||||
static MemoryPoolVector s_memoryPools;
|
||||
static QReadWriteLock s_poolMutex;
|
||||
|
||||
static PointerInfoMap s_pointerInfo;
|
||||
static QMutex s_pointerMutex;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@@ -147,32 +89,4 @@ static void operator delete[] ( void * ptr ) \
|
||||
// and just for symmetry...
|
||||
#define MM_FREE( ptr ) MemoryManager::free( ptr )
|
||||
|
||||
|
||||
|
||||
// for debugging purposes
|
||||
|
||||
#define MM_OPERATORS_DEBUG \
|
||||
public: \
|
||||
static void * operator new ( size_t size ) \
|
||||
{ \
|
||||
qDebug( "MM_OPERATORS_DEBUG: new called for %d bytes", size ); \
|
||||
return MemoryManager::alloc( size ); \
|
||||
} \
|
||||
static void * operator new[] ( size_t size ) \
|
||||
{ \
|
||||
qDebug( "MM_OPERATORS_DEBUG: new[] called for %d bytes", size ); \
|
||||
return MemoryManager::alloc( size ); \
|
||||
} \
|
||||
static void operator delete ( void * ptr ) \
|
||||
{ \
|
||||
qDebug( "MM_OPERATORS_DEBUG: delete called for %p", ptr ); \
|
||||
MemoryManager::free( ptr ); \
|
||||
} \
|
||||
static void operator delete[] ( void * ptr ) \
|
||||
{ \
|
||||
qDebug( "MM_OPERATORS_DEBUG: delete[] called for %p", ptr ); \
|
||||
MemoryManager::free( ptr ); \
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,8 +28,12 @@
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifdef LMMS_HAVE_JACK
|
||||
#ifndef LMMS_HAVE_WEAKJACK
|
||||
#include <jack/jack.h>
|
||||
#include <jack/midiport.h>
|
||||
#else
|
||||
#include "AudioWeakJack.h"
|
||||
#endif
|
||||
|
||||
#include <QtCore/QThread>
|
||||
#include <QMutex>
|
||||
|
||||
@@ -124,6 +124,8 @@ public:
|
||||
return m_writablePorts;
|
||||
}
|
||||
|
||||
void invalidateCilent();
|
||||
|
||||
MidiPortMenu* m_readablePortsMenu;
|
||||
MidiPortMenu* m_writablePortsMenu;
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ public:
|
||||
|
||||
void initDevices();
|
||||
void clear();
|
||||
void clearNewPlayHandles();
|
||||
|
||||
|
||||
// audio-device-stuff
|
||||
@@ -174,6 +175,7 @@ public:
|
||||
void setAudioDevice( AudioDevice * _dev,
|
||||
const struct qualitySettings & _qs,
|
||||
bool _needs_fifo );
|
||||
void storeAudioDevice();
|
||||
void restoreAudioDevice();
|
||||
inline AudioDevice * audioDev()
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
JobQueue() :
|
||||
m_items(),
|
||||
m_queueSize( 0 ),
|
||||
m_writeIndex( 0 ),
|
||||
m_itemsDone( 0 ),
|
||||
m_opMode( Static )
|
||||
{
|
||||
@@ -62,9 +62,9 @@ public:
|
||||
void wait();
|
||||
|
||||
private:
|
||||
#define JOB_QUEUE_SIZE 1024
|
||||
#define JOB_QUEUE_SIZE 8192
|
||||
QAtomicPointer<ThreadableJob> m_items[JOB_QUEUE_SIZE];
|
||||
AtomicInt m_queueSize;
|
||||
AtomicInt m_writeIndex;
|
||||
AtomicInt m_itemsDone;
|
||||
OperationMode m_opMode;
|
||||
|
||||
|
||||
@@ -113,11 +113,19 @@ public:
|
||||
void quantizeLength( const int qGrid );
|
||||
void quantizePos( const int qGrid );
|
||||
|
||||
static inline bool lessThan( Note * &lhs, Note * &rhs )
|
||||
static inline bool lessThan( const Note * lhs, const Note * rhs )
|
||||
{
|
||||
// function to compare two notes - must be called explictly when
|
||||
// using qSort
|
||||
return (bool) ((int) ( *lhs ).pos() < (int) ( *rhs ).pos());
|
||||
if( (int)( *lhs ).pos() < (int)( *rhs ).pos() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( (int)( *lhs ).pos() > (int)( *rhs ).pos() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return ( (int)( *lhs ).key() > (int)( *rhs ).key() );
|
||||
}
|
||||
|
||||
inline bool selected() const
|
||||
|
||||
@@ -66,8 +66,7 @@ public:
|
||||
NotePlayHandle* parent = NULL,
|
||||
int midiEventChannel = -1,
|
||||
Origin origin = OriginPattern );
|
||||
virtual ~NotePlayHandle() {}
|
||||
void done();
|
||||
virtual ~NotePlayHandle();
|
||||
|
||||
void * operator new ( size_t size, void * p )
|
||||
{
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QList>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
@@ -88,7 +88,6 @@ private:
|
||||
|
||||
AudioFileDevice * m_fileDev;
|
||||
Mixer::qualitySettings m_qualitySettings;
|
||||
Mixer::qualitySettings m_oldQualitySettings;
|
||||
|
||||
volatile int m_progress;
|
||||
volatile bool m_abort;
|
||||
|
||||
@@ -414,10 +414,12 @@ private:
|
||||
enum RemoteMessageIDs
|
||||
{
|
||||
IdUndefined,
|
||||
IdHostInfoGotten,
|
||||
IdInitDone,
|
||||
IdQuit,
|
||||
IdSampleRateInformation,
|
||||
IdBufferSizeInformation,
|
||||
IdInformationUpdated,
|
||||
IdMidiEvent,
|
||||
IdStartProcessing,
|
||||
IdProcessingDone,
|
||||
@@ -427,6 +429,8 @@ enum RemoteMessageIDs
|
||||
IdChangeInputOutputCount,
|
||||
IdShowUI,
|
||||
IdHideUI,
|
||||
IdToggleUI,
|
||||
IdIsUIVisible,
|
||||
IdSaveSettingsToString,
|
||||
IdSaveSettingsToFile,
|
||||
IdLoadSettingsFromString,
|
||||
@@ -781,7 +785,13 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg );
|
||||
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg, QStringList extraArgs = {} );
|
||||
|
||||
inline void waitForHostInfoGotten()
|
||||
{
|
||||
m_failed = waitForMessage( IdHostInfoGotten ).id
|
||||
!= IdHostInfoGotten;
|
||||
}
|
||||
|
||||
inline void waitForInitDone( bool _busyWaiting = true )
|
||||
{
|
||||
@@ -798,21 +808,25 @@ public:
|
||||
{
|
||||
lock();
|
||||
sendMessage( message( IdSampleRateInformation ).addInt( _sr ) );
|
||||
waitForMessage( IdInformationUpdated, true );
|
||||
unlock();
|
||||
}
|
||||
|
||||
void showUI()
|
||||
|
||||
virtual void toggleUI()
|
||||
{
|
||||
lock();
|
||||
sendMessage( IdShowUI );
|
||||
sendMessage( IdToggleUI );
|
||||
unlock();
|
||||
}
|
||||
|
||||
void hideUI()
|
||||
int isUIVisible()
|
||||
{
|
||||
lock();
|
||||
sendMessage( IdHideUI );
|
||||
sendMessage( IdIsUIVisible );
|
||||
unlock();
|
||||
message m = waitForMessage( IdIsUIVisible );
|
||||
return m.id != IdIsUIVisible ? -1 : m.getInt() ? 1 : 0;
|
||||
}
|
||||
|
||||
inline bool failed() const
|
||||
@@ -830,6 +844,9 @@ public:
|
||||
m_commMutex.unlock();
|
||||
}
|
||||
|
||||
public slots:
|
||||
virtual void showUI();
|
||||
virtual void hideUI();
|
||||
|
||||
protected:
|
||||
inline void setSplittedChannels( bool _on )
|
||||
@@ -1206,6 +1223,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
|
||||
m_vstSyncData = (VstSyncData *) m_shmQtID.data();
|
||||
m_bufferSize = m_vstSyncData->m_bufferSize;
|
||||
m_sampleRate = m_vstSyncData->m_sampleRate;
|
||||
sendMessage( IdHostInfoGotten );
|
||||
return;
|
||||
}
|
||||
#else
|
||||
@@ -1233,6 +1251,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
|
||||
{
|
||||
m_bufferSize = m_vstSyncData->m_bufferSize;
|
||||
m_sampleRate = m_vstSyncData->m_sampleRate;
|
||||
sendMessage( IdHostInfoGotten );
|
||||
|
||||
// detach segment
|
||||
if( shmdt(m_vstSyncData) == -1 )
|
||||
@@ -1248,6 +1267,12 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
|
||||
// if attaching shared memory fails
|
||||
sendMessage( IdSampleRateInformation );
|
||||
sendMessage( IdBufferSizeInformation );
|
||||
if( waitForMessage( IdBufferSizeInformation ).id
|
||||
!= IdBufferSizeInformation )
|
||||
{
|
||||
fprintf( stderr, "Could not get buffer size information\n" );
|
||||
}
|
||||
sendMessage( IdHostInfoGotten );
|
||||
}
|
||||
|
||||
|
||||
@@ -1295,9 +1320,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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -204,7 +204,8 @@ private:
|
||||
MswMap m_midiIfaceSetupWidgets;
|
||||
trMap m_midiIfaceNames;
|
||||
|
||||
|
||||
QComboBox* m_vstEmbedComboBox;
|
||||
QString m_vstEmbedMethod;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "TrackContainer.h"
|
||||
#include "Controller.h"
|
||||
#include "MeterModel.h"
|
||||
#include "Mixer.h"
|
||||
#include "VstSyncController.h"
|
||||
|
||||
|
||||
@@ -229,6 +230,17 @@ public:
|
||||
return m_loadingProject;
|
||||
}
|
||||
|
||||
void loadingCancelled()
|
||||
{
|
||||
m_isCancelled = true;
|
||||
Engine::mixer()->clearNewPlayHandles();
|
||||
}
|
||||
|
||||
bool isCancelled()
|
||||
{
|
||||
return m_isCancelled;
|
||||
}
|
||||
|
||||
bool isModified() const
|
||||
{
|
||||
return m_modified;
|
||||
@@ -358,6 +370,7 @@ private:
|
||||
volatile bool m_paused;
|
||||
|
||||
bool m_loadingProject;
|
||||
bool m_isCancelled;
|
||||
|
||||
QStringList m_errors;
|
||||
|
||||
|
||||
@@ -290,8 +290,6 @@ private:
|
||||
|
||||
TextFloat * m_hint;
|
||||
|
||||
MidiTime m_oldTime;// used for undo/redo while mouse-button is pressed
|
||||
|
||||
// qproperty fields
|
||||
QColor m_mutedColor;
|
||||
QColor m_mutedBackgroundColor;
|
||||
|
||||
@@ -34,7 +34,9 @@
|
||||
#ifdef LMMS_DEBUG
|
||||
#include <assert.h>
|
||||
#else
|
||||
#define assert(x) ((void)(x))
|
||||
#ifndef assert
|
||||
#define assert(x) ((void)(x))
|
||||
#endif
|
||||
#endif
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
@@ -229,11 +229,12 @@ static inline float logToLinearScale( float min, float max, float value )
|
||||
static inline float linearToLogScale( float min, float max, float value )
|
||||
{
|
||||
static const float EXP = 1.0f / F_E;
|
||||
const float val = ( value - min ) / ( max - min );
|
||||
const float valueLimited = qBound( min, value, max);
|
||||
const float val = ( valueLimited - min ) / ( max - min );
|
||||
if( min < 0 )
|
||||
{
|
||||
const float mmax = qMax( qAbs( min ), qAbs( max ) );
|
||||
float result = signedPowf( value / mmax, EXP ) * mmax;
|
||||
float result = signedPowf( valueLimited / mmax, EXP ) * mmax;
|
||||
return isnan( result ) ? 0 : result;
|
||||
}
|
||||
float result = powf( val, EXP ) * ( max - min ) + min;
|
||||
|
||||
@@ -32,8 +32,7 @@ EqHandle::EqHandle( int num, int x, int y ):
|
||||
m_width( x ),
|
||||
m_heigth( y ),
|
||||
m_mousePressed( false ),
|
||||
m_active( false ),
|
||||
m_handleMoved( false )
|
||||
m_active( false )
|
||||
{
|
||||
setFlag( ItemIsMovable );
|
||||
setFlag( ItemSendsGeometryChanges );
|
||||
@@ -41,7 +40,6 @@ EqHandle::EqHandle( int num, int x, int y ):
|
||||
float totalHeight = 36;
|
||||
m_pixelsPerUnitHeight = ( m_heigth ) / ( totalHeight );
|
||||
setMouseHover( false );
|
||||
connect( this, SIGNAL( positionChanged() ), this, SLOT( handleMoved() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -93,14 +91,6 @@ float EqHandle::yPixelToGain(float y , int h, float pixelPerUnitHeight )
|
||||
|
||||
|
||||
|
||||
void EqHandle::handleMoved()
|
||||
{
|
||||
m_handleMoved = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void EqHandle::paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget )
|
||||
{
|
||||
painter->setRenderHint( QPainter::Antialiasing, true );
|
||||
@@ -189,6 +179,11 @@ void EqHandle::loadPixmap()
|
||||
m_circlePixmap = PLUGIN_NAME::getIconPixmap( fileName.toLatin1() );
|
||||
}
|
||||
|
||||
bool EqHandle::mousePressed() const
|
||||
{
|
||||
return m_mousePressed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -463,22 +458,6 @@ void EqHandle::setHandleActive( bool a )
|
||||
|
||||
|
||||
|
||||
void EqHandle::setHandleMoved( bool a )
|
||||
{
|
||||
m_handleMoved = a;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
bool EqHandle::getHandleMoved()
|
||||
{
|
||||
return m_handleMoved;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void EqHandle::sethp12()
|
||||
{
|
||||
m_hp12 = true;
|
||||
|
||||
@@ -71,8 +71,7 @@ public:
|
||||
void setMouseHover( bool d );
|
||||
bool isActiveHandle();
|
||||
void setHandleActive( bool a );
|
||||
void setHandleMoved(bool a);
|
||||
bool getHandleMoved();
|
||||
bool mousePressed() const;
|
||||
void sethp12();
|
||||
void sethp24();
|
||||
void sethp48();
|
||||
@@ -95,7 +94,6 @@ protected:
|
||||
private:
|
||||
double calculateGain( const double freq, const double a1, const double a2, const double b0, const double b1, const double b2 );
|
||||
void loadPixmap();
|
||||
|
||||
float m_pixelsPerUnitWidth;
|
||||
float m_pixelsPerUnitHeight;
|
||||
float m_scale;
|
||||
@@ -111,11 +109,7 @@ private:
|
||||
float m_resonance;
|
||||
bool m_mousePressed;
|
||||
bool m_active;
|
||||
bool m_handleMoved;
|
||||
QPixmap m_circlePixmap;
|
||||
private slots:
|
||||
void handleMoved();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ void EqParameterWidget::updateHandle()
|
||||
m_eqcurve->setModelChanged( true );
|
||||
for( int i = 0 ; i < bandCount(); i++ )
|
||||
{
|
||||
if ( m_handleList->at( i )->getHandleMoved() == false ) //prevents a short circuit between handle and data model
|
||||
if ( !m_handleList->at( i )->mousePressed() ) //prevents a short circuit between handle and data model
|
||||
{
|
||||
//sets the band on active if a fader or a knob is moved
|
||||
bool hover = false; // prevents an action if handle is moved
|
||||
@@ -126,7 +126,6 @@ void EqParameterWidget::updateHandle()
|
||||
else
|
||||
{
|
||||
m_handleList->at( i )->setHandleActive( m_bands[i].active->value() );
|
||||
m_handleList->at( i )->setHandleMoved( false );
|
||||
}
|
||||
}
|
||||
if ( m_bands[0].hp12->value() ) m_handleList->at( 0 )->sethp12();
|
||||
|
||||
@@ -43,6 +43,7 @@ FlangerControls::FlangerControls( FlangerEffect *effect ) :
|
||||
|
||||
{
|
||||
connect( Engine::mixer(), SIGNAL( sampleRateChanged() ), this, SLOT( changedSampleRate() ) );
|
||||
connect( Engine::getSong(), SIGNAL( playbackStateChanged() ), this, SLOT( changedPlaybackState() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -81,3 +82,9 @@ void FlangerControls::changedSampleRate()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void FlangerControls::changedPlaybackState()
|
||||
{
|
||||
m_effect->restartLFO();
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void changedSampleRate();
|
||||
void changedPlaybackState();
|
||||
|
||||
private:
|
||||
FlangerEffect* m_effect;
|
||||
|
||||
@@ -68,7 +68,7 @@ FlangerEffect::~FlangerEffect()
|
||||
{
|
||||
delete m_rDelay;
|
||||
}
|
||||
if(m_lfo )
|
||||
if( m_lfo )
|
||||
{
|
||||
delete m_lfo;
|
||||
}
|
||||
@@ -139,6 +139,15 @@ void FlangerEffect::changeSampleRate()
|
||||
|
||||
|
||||
|
||||
|
||||
void FlangerEffect::restartLFO()
|
||||
{
|
||||
m_lfo->restart();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
return &m_flangerControls;
|
||||
}
|
||||
void changeSampleRate();
|
||||
void restartLFO();
|
||||
|
||||
private:
|
||||
FlangerControls m_flangerControls;
|
||||
|
||||
@@ -53,6 +53,14 @@ public:
|
||||
|
||||
|
||||
|
||||
inline void restart()
|
||||
{
|
||||
m_phase = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
inline void setSampleRate ( int samplerate )
|
||||
{
|
||||
m_samplerate = samplerate;
|
||||
|
||||
@@ -2,6 +2,10 @@ INCLUDE(BuildPlugin)
|
||||
|
||||
# Disable C++11
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
# Enable C++11 for CXXFLAGS only and not for Windows
|
||||
IF(NOT LMMS_BUILD_WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
ENDIF()
|
||||
|
||||
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
|
||||
|
||||
|
||||
@@ -731,6 +731,7 @@ void lookahead_limiter::process(float &left, float &right, float * multi_buffer)
|
||||
_peak = fabs(buffer[nextpos[j]]) > fabs(buffer[nextpos[j] + 1]) ? fabs(buffer[nextpos[j]]) : fabs(buffer[nextpos[j] + 1]);
|
||||
// calc a delta to use to reach our incoming peak from the
|
||||
// stored position
|
||||
_peak = std::max( _peak, 0.000001f );
|
||||
_delta = (_limit / peak - (limit * _multi_coeff * weight) / _peak) / (((buffer_size - nextpos[j] + pos) % buffer_size) / channels);
|
||||
if(_delta < nextdelta[j]) {
|
||||
// if the buffered delta is more important than the delta
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
02111-1307, USA or point your web browser to http://www.gnu.org.
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "basics.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "SweepVF.h"
|
||||
#include "Descriptor.h"
|
||||
|
||||
|
||||
@@ -836,7 +836,7 @@ static void __attribute__((constructor)) swh_init() {
|
||||
D_("Release time (s)");
|
||||
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].HintDescriptor =
|
||||
LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_LOW;
|
||||
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0;
|
||||
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0.0000001;
|
||||
port_range_hints[DYSONCOMPRESS_RELEASE_TIME].UpperBound = 1;
|
||||
|
||||
/* Parameters for Fast compression ratio */
|
||||
|
||||
@@ -73,7 +73,7 @@ typedef struct {
|
||||
float *op; // pointer to output value
|
||||
} sv_filter;
|
||||
|
||||
inline float soft_clip(float sc_in) {
|
||||
float soft_clip(float sc_in) {
|
||||
if ((sc_in < CLIP) && (sc_in > -CLIP)) {
|
||||
return sc_in;
|
||||
} else if (sc_in > 0.0f) {
|
||||
@@ -86,7 +86,7 @@ inline float soft_clip(float sc_in) {
|
||||
/* Store data in SVF struct, takes the sampling frequency, cutoff frequency
|
||||
and Q, and fills in the structure passed */
|
||||
|
||||
inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
|
||||
void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
|
||||
sv->f = 2.0f * sinf(M_PI * fc / (float)(fs * F_R));
|
||||
sv->q = 2.0f * cosf(powf(q, 0.1f) * M_PI * 0.5f);
|
||||
sv->qnrm = sqrtf(sv->q*0.5f + 0.01f);
|
||||
@@ -111,7 +111,7 @@ inline void setup_svf(sv_filter *sv, float fs, float fc, float q, int t) {
|
||||
|
||||
/* Change the frequency of a running SVF */
|
||||
|
||||
inline void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
|
||||
void setup_f_svf(sv_filter *sv, const float fs, const float fc) {
|
||||
sv->f = 2.0f * sin(M_PI * fc / ((float)(fs * F_R)));
|
||||
}
|
||||
|
||||
|
||||
@@ -115,8 +115,8 @@ static void runShaper(LADSPA_Handle instance, unsigned long sample_count) {
|
||||
|
||||
if (shapep < 1.0f && shapep > -1.0f) {
|
||||
shape = 1.0f;
|
||||
} else if (shape < 0) {
|
||||
shape = -1.0f / shape;
|
||||
} else if (shapep < 0) {
|
||||
shape = -1.0f / shapep;
|
||||
} else {
|
||||
shape = shapep;
|
||||
}
|
||||
@@ -160,8 +160,8 @@ static void runAddingShaper(LADSPA_Handle instance, unsigned long sample_count)
|
||||
|
||||
if (shapep < 1.0f && shapep > -1.0f) {
|
||||
shape = 1.0f;
|
||||
} else if (shape < 0) {
|
||||
shape = -1.0f / shape;
|
||||
} else if (shapep < 0) {
|
||||
shape = -1.0f / shapep;
|
||||
} else {
|
||||
shape = shapep;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ static void __attribute__((constructor)) swh_init(); // forward declaration
|
||||
|
||||
#define MAX_BSIZE 1000
|
||||
|
||||
inline int partition(LADSPA_Data array[], int left, int right);
|
||||
int partition(LADSPA_Data array[], int left, int right);
|
||||
|
||||
void q_sort(LADSPA_Data array[], int left, int right) {
|
||||
float pivot = partition(array, left, right);
|
||||
@@ -44,7 +44,7 @@ void q_sort(LADSPA_Data array[], int left, int right) {
|
||||
}
|
||||
}
|
||||
|
||||
inline int partition(LADSPA_Data array[], int left, int right) {
|
||||
int partition(LADSPA_Data array[], int left, int right) {
|
||||
float pivot = array[left];
|
||||
|
||||
while (left < right) {
|
||||
|
||||
@@ -35,7 +35,7 @@ waveguide_nl *waveguide_nl_new(int size, float fc, float da, float db)
|
||||
return wg;
|
||||
}
|
||||
|
||||
inline void waveguide_nl_reset(waveguide_nl *wg)
|
||||
void waveguide_nl_reset(waveguide_nl *wg)
|
||||
{
|
||||
memset(wg->buffer[0], 0, wg->size * sizeof(float));
|
||||
memset(wg->buffer[1], 0, wg->size * sizeof(float));
|
||||
@@ -45,7 +45,7 @@ inline void waveguide_nl_reset(waveguide_nl *wg)
|
||||
wg->zm1[1] = 0.0f;
|
||||
}
|
||||
|
||||
inline void waveguide_nl_free(waveguide_nl *wg)
|
||||
void waveguide_nl_free(waveguide_nl *wg)
|
||||
{
|
||||
if (!wg) {
|
||||
return;
|
||||
@@ -55,7 +55,7 @@ inline void waveguide_nl_free(waveguide_nl *wg)
|
||||
free(wg);
|
||||
}
|
||||
|
||||
inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
|
||||
void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
|
||||
{
|
||||
if (delay > wg->size) {
|
||||
wg->delay = wg->size;
|
||||
@@ -66,18 +66,18 @@ inline void waveguide_nl_set_delay(waveguide_nl *wg, int delay)
|
||||
}
|
||||
}
|
||||
|
||||
inline void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
|
||||
void waveguide_nl_set_fc(waveguide_nl *wg, float fc)
|
||||
{
|
||||
wg->fc = fc;
|
||||
}
|
||||
|
||||
inline void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
|
||||
void waveguide_nl_set_ap(waveguide_nl *wg, float da, float db)
|
||||
{
|
||||
wg->a1a = (1.0f - da) / (1.0f + da);
|
||||
wg->a1b = (1.0f - db) / (1.0f + db);
|
||||
}
|
||||
|
||||
inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
|
||||
void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
|
||||
{
|
||||
float tmp;
|
||||
|
||||
@@ -103,7 +103,7 @@ inline void waveguide_nl_process_lin(waveguide_nl *wg, float in0, float in1, flo
|
||||
}
|
||||
}
|
||||
|
||||
inline void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
|
||||
void waveguide_nl_process(waveguide_nl *wg, float in0, float in1, float *out0, float *out1)
|
||||
{
|
||||
float tmp;
|
||||
float a1;
|
||||
|
||||
@@ -47,7 +47,7 @@ struct bandpasses
|
||||
LADSPA_Data y[MAX_BANDS];
|
||||
};
|
||||
|
||||
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
|
||||
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands);
|
||||
|
||||
struct bands_out{
|
||||
LADSPA_Data decay[MAX_BANDS];
|
||||
@@ -65,7 +65,7 @@ const LADSPA_Data decay_table[] =
|
||||
1/250.0, 1/250.0, 1/250.0
|
||||
};
|
||||
|
||||
void inline doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
|
||||
void doBandpasses(struct bandpasses *bands, LADSPA_Data sample, int num_bands)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i < num_bands; i++)
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "VstEffect.h"
|
||||
|
||||
#include "GuiApplication.h"
|
||||
#include "Song.h"
|
||||
#include "TextFloat.h"
|
||||
#include "VstSubPluginFeatures.h"
|
||||
@@ -55,7 +57,6 @@ Plugin::Descriptor PLUGIN_EXPORT vsteffect_plugin_descriptor =
|
||||
VstEffect::VstEffect( Model * _parent,
|
||||
const Descriptor::SubPluginFeatures::Key * _key ) :
|
||||
Effect( &vsteffect_plugin_descriptor, _parent, _key ),
|
||||
m_plugin( NULL ),
|
||||
m_pluginMutex(),
|
||||
m_key( *_key ),
|
||||
m_vstControls( this )
|
||||
@@ -73,7 +74,6 @@ VstEffect::VstEffect( Model * _parent,
|
||||
|
||||
VstEffect::~VstEffect()
|
||||
{
|
||||
closePlugin();
|
||||
}
|
||||
|
||||
|
||||
@@ -124,26 +124,28 @@ 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 );
|
||||
m_pluginMutex.lock();
|
||||
m_plugin = new VstPlugin( _plugin );
|
||||
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 ));
|
||||
if( m_plugin->failed() )
|
||||
{
|
||||
m_pluginMutex.unlock();
|
||||
closePlugin();
|
||||
m_plugin.clear();
|
||||
delete tf;
|
||||
collectErrorForUI( VstPlugin::tr( "The VST plugin %1 could not be loaded." ).arg( _plugin ) );
|
||||
return;
|
||||
}
|
||||
|
||||
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin, SLOT( setTempo( bpm_t ) ) );
|
||||
VstPlugin::connect( Engine::getSong(), SIGNAL( tempoChanged( bpm_t ) ), m_plugin.data(), SLOT( setTempo( bpm_t ) ) );
|
||||
m_plugin->setTempo( Engine::getSong()->getTempo() );
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
delete tf;
|
||||
|
||||
m_key.attributes["file"] = _plugin;
|
||||
@@ -151,21 +153,6 @@ void VstEffect::openPlugin( const QString & _plugin )
|
||||
|
||||
|
||||
|
||||
void VstEffect::closePlugin()
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
if( m_plugin && m_plugin->pluginWidget() != NULL )
|
||||
{
|
||||
delete m_plugin->pluginWidget();
|
||||
}
|
||||
delete m_plugin;
|
||||
m_plugin = NULL;
|
||||
m_pluginMutex.unlock();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -25,13 +25,14 @@
|
||||
#ifndef _VST_EFFECT_H
|
||||
#define _VST_EFFECT_H
|
||||
|
||||
#include <QMutex>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QSharedPointer>
|
||||
|
||||
#include "Effect.h"
|
||||
#include "VstPlugin.h"
|
||||
#include "VstEffectControlDialog.h"
|
||||
#include "VstEffectControls.h"
|
||||
|
||||
class VstPlugin;
|
||||
|
||||
class VstEffect : public Effect
|
||||
{
|
||||
@@ -58,7 +59,7 @@ private:
|
||||
void openPlugin( const QString & _plugin );
|
||||
void closePlugin();
|
||||
|
||||
VstPlugin * m_plugin;
|
||||
QSharedPointer<VstPlugin> m_plugin;
|
||||
QMutex m_pluginMutex;
|
||||
EffectKey m_key;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "VstEffectControlDialog.h"
|
||||
#include "VstEffect.h"
|
||||
|
||||
#include "ConfigManager.h"
|
||||
#include "PixmapButton.h"
|
||||
#include "embed.h"
|
||||
#include "ToolTip.h"
|
||||
@@ -40,10 +41,10 @@
|
||||
#include <QToolBar>
|
||||
#include <QLabel>
|
||||
|
||||
|
||||
VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
EffectControlDialog( _ctl ),
|
||||
m_pluginWidget( NULL ),
|
||||
|
||||
m_plugin( NULL ),
|
||||
tbLabel( NULL )
|
||||
{
|
||||
@@ -52,37 +53,43 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
l->setVerticalSpacing( 2 );
|
||||
l->setHorizontalSpacing( 2 );
|
||||
|
||||
bool embed_vst = false;
|
||||
|
||||
if( _ctl != NULL && _ctl->m_effect != NULL &&
|
||||
_ctl->m_effect->m_plugin != NULL )
|
||||
{
|
||||
m_plugin = _ctl->m_effect->m_plugin;
|
||||
m_plugin->showEditor( NULL, true );
|
||||
m_pluginWidget = m_plugin->pluginWidget();
|
||||
embed_vst = m_plugin->embedMethod() != "none";
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
|
||||
if( !m_pluginWidget )
|
||||
{
|
||||
m_pluginWidget = m_plugin->pluginWidget( false );
|
||||
if (embed_vst) {
|
||||
if (m_plugin->hasEditor() && ! m_plugin->pluginWidget()) {
|
||||
m_plugin->createUI(this);
|
||||
}
|
||||
m_pluginWidget = m_plugin->pluginWidget();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if( m_pluginWidget )
|
||||
if (m_plugin)
|
||||
{
|
||||
setWindowTitle( m_pluginWidget->windowTitle() );
|
||||
setMinimumWidth( 250 );
|
||||
setWindowTitle( m_plugin->name() );
|
||||
|
||||
QPushButton * btn = new QPushButton( tr( "Show/hide" ) );
|
||||
btn->setCheckable( true );
|
||||
connect( btn, SIGNAL( toggled( bool ) ),
|
||||
m_pluginWidget, SLOT( setVisible( bool ) ) );
|
||||
emit btn->click();
|
||||
QPushButton * btn = new QPushButton( tr( "Show/hide" ));
|
||||
|
||||
if (embed_vst) {
|
||||
btn->setCheckable( true );
|
||||
btn->setChecked( true );
|
||||
connect( btn, SIGNAL( toggled( bool ) ),
|
||||
SLOT( togglePluginUI( bool ) ) );
|
||||
} else {
|
||||
connect( btn, SIGNAL( clicked() ),
|
||||
m_plugin.data(), SLOT( toggleUI() ) );
|
||||
}
|
||||
|
||||
btn->setMinimumWidth( 78 );
|
||||
btn->setMaximumWidth( 78 );
|
||||
btn->setMinimumHeight( 24 );
|
||||
btn->setMaximumHeight( 24 );
|
||||
m_togglePluginButton = btn;
|
||||
|
||||
m_managePluginButton = new PixmapButton( this, "" );
|
||||
m_managePluginButton->setCheckable( false );
|
||||
@@ -180,7 +187,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 );
|
||||
@@ -206,8 +216,13 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
m_savePresetButton->setMinimumHeight( 21 );
|
||||
m_savePresetButton->setMaximumHeight( 21 );
|
||||
|
||||
int newSize = m_pluginWidget->width() + 20;
|
||||
newSize = (newSize < 250) ? 250 : newSize;
|
||||
int newSize = 0;
|
||||
|
||||
if (m_pluginWidget) {
|
||||
newSize = m_pluginWidget->width() + 20;
|
||||
}
|
||||
newSize = std::max(newSize, 250);
|
||||
|
||||
QWidget* resize = new QWidget(this);
|
||||
resize->resize( newSize, 10 );
|
||||
QWidget* space0 = new QWidget(this);
|
||||
@@ -219,7 +234,9 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
|
||||
l->addItem( new QSpacerItem( newSize - 20, 30, QSizePolicy::Fixed,
|
||||
QSizePolicy::Fixed ), 1, 0 );
|
||||
l->addWidget( resize, 2, 0, 1, 1, Qt::AlignCenter );
|
||||
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
|
||||
if (m_pluginWidget) {
|
||||
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
|
||||
}
|
||||
l->setRowStretch( 5, 1 );
|
||||
l->setColumnStretch( 1, 1 );
|
||||
|
||||
@@ -256,11 +273,47 @@ void VstEffectControlDialog::paintEvent( QPaintEvent * )
|
||||
}
|
||||
}
|
||||
|
||||
void VstEffectControlDialog::showEvent(QShowEvent *_se)
|
||||
{
|
||||
EffectControlDialog::showEvent( _se );
|
||||
// Workaround for a (unexplained) bug where on project-load the effect
|
||||
// control window has size 0 and would only restore to the proper size upon
|
||||
// moving the window or interacting with it.
|
||||
if (parentWidget()) {
|
||||
parentWidget()->adjustSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
VstEffectControlDialog::~VstEffectControlDialog()
|
||||
{
|
||||
//delete m_pluginWidget;
|
||||
#if !(QT_VERSION < 0x050000 && defined(LMMS_BUILD_LINUX))
|
||||
if (m_pluginWidget && layout()) {
|
||||
layout()->removeWidget(m_pluginWidget);
|
||||
m_pluginWidget->setParent(nullptr);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void VstEffectControlDialog::togglePluginUI( bool checked )
|
||||
{
|
||||
if( !m_plugin ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_togglePluginButton->isChecked() != checked ) {
|
||||
m_togglePluginButton->setChecked( checked );
|
||||
}
|
||||
|
||||
if ( checked ) {
|
||||
m_plugin->showUI();
|
||||
} else {
|
||||
m_plugin->hideUI();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QLabel>
|
||||
#include <QSharedPointer>
|
||||
|
||||
|
||||
class VstEffectControls;
|
||||
@@ -49,19 +50,24 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void showEvent( QShowEvent* _se ) override;
|
||||
|
||||
private:
|
||||
QWidget * m_pluginWidget;
|
||||
|
||||
QPushButton * m_togglePluginButton;
|
||||
PixmapButton * m_openPresetButton;
|
||||
PixmapButton * m_rolLPresetButton;
|
||||
PixmapButton * m_rolRPresetButton;
|
||||
PixmapButton * m_managePluginButton;
|
||||
PixmapButton * m_savePresetButton;
|
||||
|
||||
VstPlugin * m_plugin;
|
||||
QSharedPointer<VstPlugin> m_plugin;
|
||||
|
||||
QLabel * tbLabel;
|
||||
|
||||
public slots:
|
||||
void togglePluginUI( bool checked );
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -39,13 +39,11 @@ VstEffectControls::VstEffectControls( VstEffect * _eff ) :
|
||||
m_effect( _eff ),
|
||||
m_subWindow( NULL ),
|
||||
knobFModel( NULL ),
|
||||
vstKnobs( NULL ),
|
||||
ctrHandle( NULL ),
|
||||
lastPosInMenu (0)
|
||||
lastPosInMenu (0),
|
||||
m_vstGuiVisible ( true )
|
||||
// m_presetLabel ( NULL )
|
||||
{
|
||||
menu = new QMenu;
|
||||
connect( menu, SIGNAL( aboutToShow() ), this, SLOT( updateMenu() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -67,24 +65,20 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
|
||||
m_effect->m_pluginMutex.lock();
|
||||
if( m_effect->m_plugin != NULL )
|
||||
{
|
||||
m_vstGuiVisible = _this.attribute( "guivisible" ).toInt();
|
||||
|
||||
m_effect->m_plugin->loadSettings( _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 +90,6 @@ void VstEffectControls::loadSettings( const QDomElement & _this )
|
||||
}
|
||||
|
||||
connect( knobFModel[i], SIGNAL( dataChanged() ), this, SLOT( setParameter() ) );
|
||||
|
||||
vstKnobs[i]->setModel( knobFModel[i] );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -149,8 +141,16 @@ void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
|
||||
|
||||
int VstEffectControls::controlCount()
|
||||
{
|
||||
return m_effect->m_plugin != NULL &&
|
||||
m_effect->m_plugin->hasEditor() ? 1 : 0;
|
||||
return m_effect->m_plugin != NULL ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
EffectControlDialog *VstEffectControls::createView()
|
||||
{
|
||||
auto dialog = new VstEffectControlDialog( this );
|
||||
dialog->togglePluginUI( m_vstGuiVisible );
|
||||
return dialog;
|
||||
}
|
||||
|
||||
|
||||
@@ -317,7 +317,7 @@ manageVSTEffectView::manageVSTEffectView( VstEffect * _eff, VstEffectControls *
|
||||
m_vi->m_subWindow->setWidget(m_vi->m_scrollArea);
|
||||
m_vi->m_subWindow->setWindowTitle( _eff->m_plugin->name() + tr( " - VST parameter control" ) );
|
||||
m_vi->m_subWindow->setWindowIcon( PLUGIN_NAME::getIconPixmap( "logo" ) );
|
||||
//m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m_vi->m_subWindow->setAttribute(Qt::WA_DeleteOnClose, false);
|
||||
|
||||
|
||||
l->setContentsMargins( 20, 10, 10, 10 );
|
||||
@@ -358,37 +358,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 +396,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 +464,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 +500,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 )
|
||||
|
||||
@@ -59,10 +59,7 @@ public:
|
||||
|
||||
virtual int controlCount();
|
||||
|
||||
virtual EffectControlDialog * createView()
|
||||
{
|
||||
return new VstEffectControlDialog( this );
|
||||
}
|
||||
virtual EffectControlDialog * createView();
|
||||
|
||||
|
||||
protected slots:
|
||||
@@ -82,12 +79,10 @@ private:
|
||||
VstEffect * m_effect;
|
||||
|
||||
QPushButton * m_selPresetButton;
|
||||
QMenu *menu;
|
||||
|
||||
QMdiSubWindow * m_subWindow;
|
||||
QScrollArea * m_scrollArea;
|
||||
FloatModel ** knobFModel;
|
||||
Knob ** vstKnobs;
|
||||
int paramCount;
|
||||
|
||||
QObject * ctrHandle;
|
||||
@@ -98,6 +93,7 @@ private:
|
||||
friend class VstEffectControlDialog;
|
||||
friend class manageVSTEffectView;
|
||||
|
||||
bool m_vstGuiVisible;
|
||||
} ;
|
||||
|
||||
|
||||
@@ -133,6 +129,7 @@ private:
|
||||
QPushButton * m_syncButton;
|
||||
QPushButton * m_displayAutomatedOnly;
|
||||
QPushButton * m_closeButton;
|
||||
Knob ** vstKnobs;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFileDialog>
|
||||
#include <QFileInfo>
|
||||
#include <QPushButton>
|
||||
#include <QTimerEvent>
|
||||
#include <QVBoxLayout>
|
||||
@@ -150,15 +151,22 @@ CarlaInstrument::CarlaInstrument(InstrumentTrack* const instrumentTrack, const D
|
||||
fHost.uiName = NULL;
|
||||
fHost.uiParentId = 0;
|
||||
|
||||
// figure out prefix from dll filename
|
||||
// carla/resources contains PyQt scripts required for launch
|
||||
QString dllName(carla_get_library_filename());
|
||||
|
||||
QString resourcesPath;
|
||||
#if defined(CARLA_OS_LINUX)
|
||||
fHost.resourceDir = strdup(QString(dllName.split("/lib/carla")[0] + "/share/carla/resources/").toUtf8().constData());
|
||||
#else
|
||||
fHost.resourceDir = NULL;
|
||||
// parse prefix from dll filename
|
||||
QDir path = QFileInfo(dllName).dir();
|
||||
path.cdUp();
|
||||
path.cdUp();
|
||||
resourcesPath = path.absolutePath() + "/share/carla/resources";
|
||||
#elif defined(CARLA_OS_MAC)
|
||||
// assume standard install location
|
||||
resourcesPath = "/Applications/Carla.app/Contents/MacOS/resources";
|
||||
#elif defined(CARLA_OS_WIN32) || defined(CARLA_OS_WIN64)
|
||||
// not yet supported
|
||||
#endif
|
||||
|
||||
fHost.resourceDir = strdup(resourcesPath.toUtf8().constData());
|
||||
fHost.get_buffer_size = host_get_buffer_size;
|
||||
fHost.get_sample_rate = host_get_sample_rate;
|
||||
fHost.is_offline = host_is_offline;
|
||||
@@ -252,21 +260,14 @@ intptr_t CarlaInstrument::handleDispatcher(const NativeHostDispatcherOpcode opco
|
||||
|
||||
switch (opcode)
|
||||
{
|
||||
case NATIVE_HOST_OPCODE_NULL:
|
||||
break;
|
||||
case NATIVE_HOST_OPCODE_UPDATE_PARAMETER:
|
||||
case NATIVE_HOST_OPCODE_UPDATE_MIDI_PROGRAM:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_PARAMETERS:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_MIDI_PROGRAMS:
|
||||
case NATIVE_HOST_OPCODE_RELOAD_ALL:
|
||||
// nothing
|
||||
break;
|
||||
case NATIVE_HOST_OPCODE_UI_UNAVAILABLE:
|
||||
handleUiClosed();
|
||||
break;
|
||||
case NATIVE_HOST_OPCODE_HOST_IDLE:
|
||||
qApp->processEvents();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#ifndef CARLA_H
|
||||
#define CARLA_H
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "CarlaNative.h"
|
||||
|
||||
#include "Instrument.h"
|
||||
|
||||
@@ -339,7 +339,6 @@ lb302Synth::lb302Synth( InstrumentTrack * _instrumentTrack ) :
|
||||
|
||||
// Experimenting with a0 between original (0.5) and 1.0
|
||||
vca_a0 = 0.5;
|
||||
vca_a = 9;
|
||||
vca_mode = 3;
|
||||
|
||||
vcfs[0] = new lb302FilterIIR2(&fs);
|
||||
|
||||