@@ -14,9 +14,9 @@ Features | |||
* GIG, SF2 and SFZ sound banks | |||
* Internal audio and midi file player | |||
* Automation of plugin parameters via MIDI CC | |||
* Full OSC control | |||
* Rack and Patchbay engine modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio) and low-latency (ASIO and JACK) | |||
* Remote control over OSC | |||
* Rack and Patchbay processing modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio, etc) and JACK | |||
In experimental phase / work in progress: | |||
* Export any Carla loadable plugin or sound bank as an LV2 plugin | |||
@@ -13,9 +13,9 @@ Features | |||
* GIG, SF2 and SFZ sound banks | |||
* Internal audio and midi file player | |||
* Automation of plugin parameters via MIDI CC | |||
* Full OSC control | |||
* Rack and Patchbay engine modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio) and low-latency (ASIO and JACK) | |||
* Remote control over OSC | |||
* Rack and Patchbay processing modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio, etc) and JACK | |||
In experimental phase / work in progress: | |||
* Export any Carla loadable plugin or sound bank as an LV2 plugin | |||
@@ -25,6 +25,7 @@ source common.env | |||
CHROOT_CARLA_DIR="/tmp/carla-src" | |||
PKG_FOLDER="Carla_2.0-beta6-linux" | |||
export MAKE_ARGS="${MAKE_ARGS} SKIP_ZYN_SYNTH=true" | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# function to remove old stuff | |||
@@ -95,6 +96,7 @@ if [ ! -f /tmp/setup-repo-packages ]; then | |||
apt-get install -y build-essential libglib2.0-dev uuid-dev git-core | |||
apt-get install -y autoconf libtool | |||
apt-get install -y bison flex libxml-libxml-perl libxml-parser-perl | |||
apt-get install -y libgl1-mesa-dev libglu1-mesa-dev | |||
apt-get clean | |||
rm /usr/lib/libuuid.so | |||
touch /tmp/setup-repo-packages | |||
@@ -175,6 +177,7 @@ chroot_build_carla() | |||
{ | |||
CHROOT_DIR=${TARGETDIR}/chroot${ARCH} | |||
CHROOT_TARGET_DIR=/root/builds | |||
cat <<EOF | sudo chroot ${CHROOT_DIR} | |||
export HOME=/root | |||
@@ -184,21 +187,21 @@ unset LC_TIME | |||
set -e | |||
export CFLAGS="-I${TARGETDIR}/carla${ARCH}/include" | |||
export CFLAGS="-I${CHROOT_TARGET_DIR}/carla${ARCH}/include" | |||
export CXXFLAGS=${CFLAGS} | |||
export LDFLAGS="-L${TARGETDIR}/carla${ARCH}/lib" | |||
export PKG_CONFIG_PATH=${TARGETDIR}/carla${ARCH}/lib/pkgconfig | |||
export LDFLAGS="-L${CHROOT_TARGET_DIR}/carla${ARCH}/lib" | |||
export PKG_CONFIG_PATH=${CHROOT_TARGET_DIR}/carla${ARCH}/lib/pkgconfig | |||
export RCC_QT4=/usr/bin/rcc | |||
export LINUX="true" | |||
cd ${CHROOT_CARLA_DIR} | |||
make EXTERNAL_PLUGINS=false ${MAKE_ARGS} | |||
make ${MAKE_ARGS} | |||
if [ x"${ARCH}" != x"32" ]; then | |||
export CFLAGS="-I${TARGETDIR}/carla32/include -m32" | |||
export CFLAGS="-I${CHROOT_TARGET_DIR}/carla32/include -m32" | |||
export CXXFLAGS=${CFLAGS} | |||
export LDFLAGS="-L${TARGETDIR}/carla32/lib -m32" | |||
export PKG_CONFIG_PATH=${TARGETDIR}/carla32/lib/pkgconfig | |||
export LDFLAGS="-L${CHROOT_TARGET_DIR}/carla32/lib -m32" | |||
export PKG_CONFIG_PATH=${CHROOT_TARGET_DIR}/carla32/lib/pkgconfig | |||
make posix32 ${MAKE_ARGS} | |||
fi | |||
@@ -292,7 +295,7 @@ unset LC_TIME | |||
set -e | |||
export PKG_CONFIG_PATH=${TARGETDIR}/carla${ARCH}/lib/pkgconfig | |||
export PKG_CONFIG_PATH=${CHROOT_TARGET_DIR}/carla${ARCH}/lib/pkgconfig | |||
export RCC_QT4=/usr/bin/rcc | |||
export LINUX="true" | |||
@@ -301,6 +301,58 @@ if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# mxml | |||
if [ ! -d mxml-${MXML_VERSION} ]; then | |||
wget --no-check-certificate https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz -O mxml-${MXML_VERSION}.tar.gz | |||
mkdir mxml-${MXML_VERSION} | |||
cd mxml-${MXML_VERSION} | |||
tar -xf ../mxml-${MXML_VERSION}.tar.gz | |||
cd .. | |||
fi | |||
if [ ! -f mxml-${MXML_VERSION}/build-done ]; then | |||
cd mxml-${MXML_VERSION} | |||
./configure --disable-shared --prefix=$PREFIX | |||
make libmxml.a | |||
cp *.a $PREFIX/lib/ | |||
cp *.pc $PREFIX/lib/pkgconfig/ | |||
cp mxml.h $PREFIX/include/ | |||
touch build-done | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# fftw3 (needs to be last as it modifies C[XX]FLAGS) | |||
if [ ! -d fftw-${FFTW3_VERSION} ]; then | |||
wget --no-check-certificate http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz | |||
tar -xf fftw-${FFTW3_VERSION}.tar.gz | |||
fi | |||
if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then | |||
export CFLAGS="${CFLAGS} -ffast-math" | |||
export CXXFLAGS="${CXXFLAGS} -ffast-math" | |||
cd fftw-${FFTW3_VERSION} | |||
./configure --enable-static --disable-shared --prefix=${PREFIX} \ | |||
--enable-sse2 \ | |||
--disable-debug --disable-alloca --disable-fortran \ | |||
--with-our-malloc | |||
make | |||
make install | |||
make clean | |||
./configure --enable-static --disable-shared --prefix=${PREFIX} \ | |||
--enable-sse2 --enable-sse --enable-single \ | |||
--disable-debug --disable-alloca --disable-fortran \ | |||
--with-our-malloc | |||
make | |||
make install | |||
make clean | |||
touch build-done | |||
cd .. | |||
fi | |||
} | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
@@ -11,6 +11,8 @@ LIBSNDFILE_VERSION=1.0.28 | |||
LIBGIG_VERSION=4.0.0 | |||
LINUXSAMPLER_VERSION=2.0.0 | |||
FLUIDSYNTH_VERSION=1.1.6 | |||
MXML_VERSION=2.11 | |||
FFTW3_VERSION=3.3.7 | |||
MAKE_ARGS="-j 8" | |||
TARGETDIR=$HOME/builds |
@@ -13,9 +13,9 @@ Features | |||
* GIG, SF2 and SFZ sound banks | |||
* Internal audio and midi file player | |||
* Automation of plugin parameters via MIDI CC | |||
* Full OSC control | |||
* Rack and Patchbay engine modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio) and low-latency (ASIO and JACK) | |||
* Remote control over OSC | |||
* Rack and Patchbay processing modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio, etc) and JACK | |||
In experimental phase / work in progress: | |||
* Export any Carla loadable plugin or sound bank as an LV2 plugin | |||
@@ -4,12 +4,12 @@ | |||
# automake, autoconf, bison, flex, libtool | |||
# p5-libxml-perl, p5-xml-libxml, p7zip, pkgconfig | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# stop on error | |||
set -e | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# cd to correct path | |||
if [ -f Makefile ]; then | |||
@@ -21,7 +21,7 @@ fi | |||
source common.env | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# function to remove old stuff | |||
cleanup() | |||
@@ -59,7 +59,7 @@ exit 0 | |||
} | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# function to build base libs | |||
build_base() | |||
@@ -79,7 +79,7 @@ export CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" | |||
export LDFLAGS="-fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs" | |||
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib -m${ARCH}" | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# pkgconfig | |||
if [ ! -d pkg-config-${PKG_CONFIG_VERSION} ]; then | |||
@@ -97,7 +97,7 @@ if [ ! -f pkg-config-${PKG_CONFIG_VERSION}_$ARCH/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# liblo | |||
if [ ! -d liblo-${LIBLO_VERSION} ]; then | |||
@@ -117,13 +117,30 @@ if [ ! -f liblo-${LIBLO_VERSION}_$ARCH/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
if [ x"${ARCH}" = x"32" ]; then | |||
return | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# zlib | |||
if [ ! -d zlib-${ZLIB_VERSION} ]; then | |||
curl -L https://github.com/madler/zlib/archive/v${ZLIB_VERSION}.tar.gz -o zlib-${ZLIB_VERSION}.tar.gz | |||
tar -xf zlib-${ZLIB_VERSION}.tar.gz | |||
fi | |||
if [ ! -f zlib-${ZLIB_VERSION}/build-done ]; then | |||
cd zlib-${ZLIB_VERSION} | |||
./configure --static --prefix=${PREFIX} | |||
make | |||
make install | |||
touch build-done | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# file/magic | |||
if [ ! -d file-${FILE_VERSION} ]; then | |||
@@ -140,7 +157,7 @@ if [ ! -f file-${FILE_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# libogg | |||
if [ ! -d libogg-${LIBOGG_VERSION} ]; then | |||
@@ -157,7 +174,7 @@ if [ ! -f libogg-${LIBOGG_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# libvorbis | |||
if [ ! -d libvorbis-${LIBVORBIS_VERSION} ]; then | |||
@@ -174,7 +191,7 @@ if [ ! -f libvorbis-${LIBVORBIS_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# flac | |||
if [ ! -d flac-${FLAC_VERSION} ]; then | |||
@@ -194,7 +211,7 @@ if [ ! -f flac-${FLAC_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# libsndfile | |||
if [ ! -d libsndfile-${LIBSNDFILE_VERSION} ]; then | |||
@@ -212,7 +229,7 @@ if [ ! -f libsndfile-${LIBSNDFILE_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# libgig | |||
if [ ! -d libgig-${LIBGIG_VERSION} ]; then | |||
@@ -233,7 +250,7 @@ if [ ! -f libgig-${LIBGIG_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# linuxsampler | |||
if [ ! -d linuxsampler-${LINUXSAMPLER_VERSION} ]; then | |||
@@ -249,8 +266,6 @@ if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then | |||
sed -i -e "s|HAVE_AU|HAVE_VST|" src/hostplugins/Makefile.am | |||
touch patched | |||
fi | |||
#rm -f configure | |||
#env PATH=/opt/local/bin:$PATH make -f Makefile.svn configure | |||
env PATH=/opt/local/bin:$PATH /opt/local/bin/aclocal -I /opt/local/share/aclocal | |||
env PATH=/opt/local/bin:$PATH /opt/local/bin/glibtoolize --force --copy | |||
env PATH=/opt/local/bin:$PATH /opt/local/bin/autoheader | |||
@@ -272,7 +287,7 @@ if [ ! -f linuxsampler-${LINUXSAMPLER_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# libffi | |||
if [ ! -d libffi-${LIBFFI_VERSION} ]; then | |||
@@ -282,14 +297,14 @@ fi | |||
if [ ! -f libffi-${LIBFFI_VERSION}/build-done ]; then | |||
cd libffi-${LIBFFI_VERSION} | |||
./configure --enable-static --disable-shared --prefix=$PREFIX | |||
./configure --enable-static --disable-shared --prefix=${PREFIX} | |||
make ${MAKE_ARGS} | |||
make install | |||
touch build-done | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# gettext | |||
if [ ! -d gettext-${GETTEXT_VERSION} ]; then | |||
@@ -306,7 +321,7 @@ if [ ! -f gettext-${GETTEXT_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# glib | |||
if [ ! -d glib-${GLIB_VERSION} ]; then | |||
@@ -323,13 +338,13 @@ if [ ! -f glib-${GLIB_VERSION}/build-done ]; then | |||
env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} || true | |||
touch gio/gio-querymodules gio/glib-compile-resources gio/gsettings gio/gdbus gio/gresource gio/gapplication | |||
env PATH=/opt/local/bin:$PATH make ${MAKE_ARGS} | |||
touch $PREFIX/bin/gtester-report | |||
touch ${PREFIX}/bin/gtester-report | |||
env PATH=/opt/local/bin:$PATH make install | |||
touch build-done | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# fluidsynth | |||
if [ ! -d fluidsynth-${FLUIDSYNTH_VERSION} ]; then | |||
@@ -353,9 +368,55 @@ if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# mxml | |||
if [ ! -d mxml-${MXML_VERSION} ]; then | |||
curl -L https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz -o mxml-${MXML_VERSION}.tar.gz | |||
mkdir mxml-${MXML_VERSION} | |||
cd mxml-${MXML_VERSION} | |||
tar -xf ../mxml-${MXML_VERSION}.tar.gz | |||
cd .. | |||
fi | |||
if [ ! -f mxml-${MXML_VERSION}/build-done ]; then | |||
cd mxml-${MXML_VERSION} | |||
./configure --disable-shared --prefix=${PREFIX} | |||
make libmxml.a | |||
cp *.a ${PREFIX}/lib/ | |||
cp *.pc ${PREFIX}/lib/pkgconfig/ | |||
cp mxml.h ${PREFIX}/include/ | |||
touch build-done | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# fftw3 (needs to be last as it modifies C[XX]FLAGS) | |||
if [ ! -d fftw-${FFTW3_VERSION} ]; then | |||
curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz | |||
tar -xf fftw-${FFTW3_VERSION}.tar.gz | |||
fi | |||
if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then | |||
export CFLAGS="${CFLAGS} -ffast-math" | |||
export CXXFLAGS="${CXXFLAGS} -ffast-math" | |||
cd fftw-${FFTW3_VERSION} | |||
./configure --enable-static --enable-sse2 --disable-shared --disable-debug --prefix=${PREFIX} | |||
make | |||
make install | |||
make clean | |||
./configure --enable-static --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=${PREFIX} | |||
make | |||
make install | |||
make clean | |||
touch build-done | |||
cd .. | |||
fi | |||
} | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# build base libs | |||
export ARCH=32 | |||
@@ -364,7 +425,7 @@ build_base | |||
export ARCH=64 | |||
build_base | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# set flags for qt stuff | |||
export PREFIX=${TARGETDIR}/carla | |||
@@ -381,7 +442,7 @@ export MAKE=/usr/bin/make | |||
export CFG_ARCH=x86_64 | |||
export QMAKESPEC=macx-clang | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# qt5-base download | |||
if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then | |||
@@ -390,22 +451,27 @@ if [ ! -d qtbase-opensource-src-${QT5_VERSION} ]; then | |||
/opt/local/bin/7z x qtbase-opensource-src-${QT5_VERSION}.tar | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# qt5-base (64bit, shared, framework) | |||
if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then | |||
cd qtbase-opensource-src-${QT5_VERSION} | |||
if [ ! -f configured ]; then | |||
sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure | |||
if [ ! -f carla-patched ]; then | |||
sed -i -e "s|PNG_WARNINGS_SUPPORTED|PNG_WARNINGS_NOT_SUPPORTED|" src/3rdparty/libpng/pnglibconf.h | |||
sed -i -e "s|AWK=.*|AWK=/opt/local/bin/gawk|" configure | |||
patch -p1 -i ../patches/qt55-newosx-fix.patch | |||
touch carla-patched | |||
fi | |||
chmod +x configure | |||
chmod -R 777 config.tests/unix/ | |||
./configure -release -shared -opensource -confirm-license -force-pkg-config -platform macx-clang -framework \ | |||
-prefix $PREFIX -plugindir $PREFIX/lib/qt5/plugins -headerdir $PREFIX/include/qt5 \ | |||
-prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -headerdir ${PREFIX}/include/qt5 \ | |||
-qt-freetype -qt-libjpeg -qt-libpng -qt-pcre -opengl desktop -qpa cocoa \ | |||
-no-directfb -no-eglfs -no-kms -no-linuxfb -no-mtdev -no-xcb -no-xcb-xlib \ | |||
-no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-avx2 -no-mips_dsp -no-mips_dspr2 \ | |||
-no-cups -no-dbus -no-evdev -no-fontconfig -no-harfbuzz -no-gif -no-glib -no-nis -no-openssl -no-pch -no-sql-ibase -no-sql-odbc \ | |||
-no-audio-backend -no-qml-debug -no-separate-debug-info \ | |||
-no-audio-backend -no-qml-debug -no-separate-debug-info -no-use-gold-linker \ | |||
-no-compile-examples -nomake examples -nomake tests -make libs -make tools | |||
touch configured | |||
fi | |||
@@ -415,12 +481,12 @@ if [ ! -f qtbase-opensource-src-${QT5_VERSION}/build-done ]; then | |||
ln -s ${PREFIX}/lib/QtGui.framework/Headers ${PREFIX}/include/qt5/QtGui | |||
ln -s ${PREFIX}/lib/QtWidgets.framework/Headers ${PREFIX}/include/qt5/QtWidgets | |||
sed -i -e "s/ -lqtpcre/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Core.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Core.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Gui.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Gui.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Widgets.pc | |||
sed -i -e "s/ '/ /" $PREFIX/lib/pkgconfig/Qt5Widgets.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Core.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Gui.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc | |||
sed -i -e "s/ '/ /" ${PREFIX}/lib/pkgconfig/Qt5Widgets.pc | |||
touch build-done | |||
cd .. | |||
fi | |||
@@ -462,7 +528,7 @@ QT59_ARGS="./configure -prefix ${PREFIX} -plugindir ${PREFIX}/lib/qt5/plugins -h | |||
-qt-sqlite | |||
" | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# qt5-mac-extras | |||
if [ ! -d qtmacextras-opensource-src-${QT5_VERSION} ]; then | |||
@@ -480,7 +546,7 @@ if [ ! -f qtmacextras-opensource-src-${QT5_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# qt5-svg | |||
if [ ! -d qtsvg-opensource-src-${QT5_VERSION} ]; then | |||
@@ -498,7 +564,7 @@ if [ ! -f qtsvg-opensource-src-${QT5_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# python | |||
if [ ! -d Python-${PYTHON_VERSION} ]; then | |||
@@ -508,14 +574,14 @@ fi | |||
if [ ! -f Python-${PYTHON_VERSION}/build-done ]; then | |||
cd Python-${PYTHON_VERSION} | |||
./configure --prefix=$PREFIX | |||
./configure --prefix=${PREFIX} | |||
make | |||
make install | |||
touch build-done | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# sip | |||
if [ ! -d sip-${SIP_VERSION} ]; then | |||
@@ -532,7 +598,7 @@ if [ ! -f sip-${SIP_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# pyqt5 | |||
if [ ! -d PyQt-gpl-${PYQT5_VERSION} ]; then | |||
@@ -549,7 +615,7 @@ if [ ! -f PyQt-gpl-${PYQT5_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# pyliblo | |||
if [ ! -d pyliblo-${PYLIBLO_VERSION} ]; then | |||
@@ -561,12 +627,12 @@ if [ ! -f pyliblo-${PYLIBLO_VERSION}/build-done ]; then | |||
cd pyliblo-${PYLIBLO_VERSION} | |||
env CFLAGS="${CFLAGS} -I${TARGETDIR}/carla64/include" LDFLAGS="${LDFLAGS} -L${TARGETDIR}/carla64/lib" \ | |||
python3 setup.py build | |||
python3 setup.py install --prefix=$PREFIX | |||
python3 setup.py install --prefix=${PREFIX} | |||
touch build-done | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# cxfreeze | |||
if [ ! -d cx_Freeze-${CXFREEZE_VERSION} ]; then | |||
@@ -578,9 +644,9 @@ if [ ! -f cx_Freeze-${CXFREEZE_VERSION}/build-done ]; then | |||
cd cx_Freeze-${CXFREEZE_VERSION} | |||
sed -i -e 's/"python%s.%s"/"python%s.%sm"/' setup.py | |||
python3 setup.py build | |||
python3 setup.py install --prefix=$PREFIX | |||
python3 setup.py install --prefix=${PREFIX} | |||
touch build-done | |||
cd .. | |||
fi | |||
# ------------------------------------------------------------------------------------ | |||
# --------------------------------------------------------------------------------------------------------------------- |
@@ -17,10 +17,11 @@ fi | |||
source data/macos/common.env | |||
MAKE_ARGS="${MAKE_ARGS} EXTERNAL_PLUGINS=false" | |||
export MACOS="true" | |||
export MACOS_OLD="true" | |||
if [ $(clang -v 2>&1 | sed -n 's/.*version \([0-9]\).*/\1/p') -lt 9 ]; then | |||
export MACOS_OLD="true" | |||
fi | |||
export CC=clang | |||
export CXX=clang++ | |||
@@ -15,6 +15,9 @@ GETTEXT_VERSION=0.18.3.2 | |||
GLIB_VERSION=2.44.1 | |||
GLIB_MVERSION=2.44 | |||
FLUIDSYNTH_VERSION=1.1.6 | |||
ZLIB_VERSION=1.2.11 | |||
MXML_VERSION=2.11 | |||
FFTW3_VERSION=3.3.7 | |||
QT5_VERSION=5.5.1 | |||
QT5_MVERSION=5.5 | |||
PYTHON_VERSION=3.4.7 | |||
@@ -5,13 +5,14 @@ | |||
source data/macos/common.env | |||
export MACOS="true" | |||
export MACOS_OLD="true" | |||
export CC=clang | |||
export CXX=clang++ | |||
export MACOS="true" | |||
export MACOS_OLD="true" | |||
if [ $(clang -v 2>&1 | sed -n 's/.*version \([0-9]\).*/\1/p') -lt 9 ]; then | |||
export MACOS_OLD="true" | |||
fi | |||
export CC=clang | |||
export CXX=clang++ | |||
@@ -0,0 +1,71 @@ | |||
From 0707260a4f8e64dfadf1df5f935e74cabb7c7d27 Mon Sep 17 00:00:00 2001 | |||
From: Jake Petroules <jake.petroules@qt.io> | |||
Date: Sun, 1 Oct 2017 21:48:17 -0700 | |||
Subject: [PATCH] Fix build error with macOS 10.13 SDK | |||
MIME-Version: 1.0 | |||
Content-Type: text/plain; charset=utf8 | |||
Content-Transfer-Encoding: 8bit | |||
Several of these variables/macros are no longer defined. We didn't | |||
validate the preconditions on iOS, tvOS, or watchOS, so no | |||
need to bother validating them on macOS either. Nor did we check the | |||
OSStatus result on any platform anyways. | |||
Task-number: QTBUG-63401 | |||
Change-Id: Ife64dff767cf6d3f4b839fc53ec486181c176bf3 | |||
(cherry-picked from 861544583511d4e6f7745d2339b26ff1cd44132b) | |||
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> | |||
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> | |||
--- | |||
src/plugins/platforms/cocoa/qcocoahelpers.h | 2 +- | |||
src/plugins/platforms/cocoa/qcocoahelpers.mm | 13 +------------ | |||
2 files changed, 2 insertions(+), 13 deletions(-) | |||
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h | |||
index bbb3793..74371d5 100644 | |||
--- a/src/plugins/platforms/cocoa/qcocoahelpers.h | |||
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.h | |||
@@ -80,7 +80,7 @@ QColor qt_mac_toQColor(CGColorRef color); | |||
// Creates a mutable shape, it's the caller's responsibility to release. | |||
HIMutableShapeRef qt_mac_QRegionToHIMutableShape(const QRegion ®ion); | |||
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); | |||
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage); | |||
NSDragOperation qt_mac_mapDropAction(Qt::DropAction action); | |||
NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions); | |||
diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm | |||
index cd73148..3f8429e 100644 | |||
--- a/src/plugins/platforms/cocoa/qcocoahelpers.mm | |||
+++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm | |||
@@ -544,15 +544,8 @@ NSRect qt_mac_flipRect(const QRect &rect) | |||
return NSMakeRect(rect.x(), flippedY, rect.width(), rect.height()); | |||
} | |||
-OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage) | |||
+void qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGImageRef inImage) | |||
{ | |||
- // Verbatim copy if HIViewDrawCGImage (as shown on Carbon-Dev) | |||
- OSStatus err = noErr; | |||
- | |||
- require_action(inContext != NULL, InvalidContext, err = paramErr); | |||
- require_action(inBounds != NULL, InvalidBounds, err = paramErr); | |||
- require_action(inImage != NULL, InvalidImage, err = paramErr); | |||
- | |||
CGContextSaveGState( inContext ); | |||
CGContextTranslateCTM (inContext, 0, inBounds->origin.y + CGRectGetMaxY(*inBounds)); | |||
CGContextScaleCTM(inContext, 1, -1); | |||
@@ -560,10 +553,6 @@ OSStatus qt_mac_drawCGImage(CGContextRef inContext, const CGRect *inBounds, CGIm | |||
CGContextDrawImage(inContext, *inBounds, inImage); | |||
CGContextRestoreGState(inContext); | |||
-InvalidImage: | |||
-InvalidBounds: | |||
-InvalidContext: | |||
- return err; | |||
} | |||
Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) | |||
-- | |||
2.7.4 | |||
@@ -13,9 +13,9 @@ Features | |||
* GIG, SF2 and SFZ sound banks | |||
* Internal audio and midi file player | |||
* Automation of plugin parameters via MIDI CC | |||
* Full OSC control | |||
* Rack and Patchbay engine modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio) and low-latency (ASIO and JACK) | |||
* Remote control over OSC | |||
* Rack and Patchbay processing modes, plus Single and Multi-Client if using JACK | |||
* Native audio drivers (ALSA, DirectSound, CoreAudio, etc) and JACK | |||
In experimental phase / work in progress: | |||
* Export any Carla loadable plugin or sound bank as an LV2 plugin | |||
@@ -74,7 +74,7 @@ unset CXXFLAGS | |||
unset LDFLAGS | |||
export PREFIX=${TARGETDIR}/carla-w${ARCH} | |||
export PATH=${PREFIX}/bin/usr/sbin:/usr/bin:/sbin:/bin | |||
export PATH=${PREFIX}/bin:/usr/sbin:/usr/bin:/sbin:/bin | |||
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
@@ -352,11 +352,68 @@ if [ ! -f fluidsynth-${FLUIDSYNTH_VERSION}/build-done ]; then | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# mxml | |||
if [ ! -d mxml-${MXML_VERSION} ]; then | |||
wget -c https://github.com/michaelrsweet/mxml/releases/download/v${MXML_VERSION}/mxml-${MXML_VERSION}.tar.gz -O mxml-${MXML_VERSION}.tar.gz | |||
mkdir mxml-${MXML_VERSION} | |||
cd mxml-${MXML_VERSION} | |||
tar -xf ../mxml-${MXML_VERSION}.tar.gz | |||
cd .. | |||
fi | |||
if [ ! -f mxml-${MXML_VERSION}/build-done ]; then | |||
cd mxml-${MXML_VERSION} | |||
./configure --disable-shared --prefix=${PREFIX} \ | |||
--target=${MINGW_PREFIX} --host=${MINGW_PREFIX} --build=${HOST_ARCH} | |||
make libmxml.a | |||
cp *.a ${PREFIX}/lib/ | |||
cp *.pc ${PREFIX}/lib/pkgconfig/ | |||
cp mxml.h ${PREFIX}/include/ | |||
touch build-done | |||
cd .. | |||
fi | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# fftw3 (needs to be last as it modifies C[XX]FLAGS) | |||
if [ ! -d fftw-${FFTW3_VERSION} ]; then | |||
curl -O http://www.fftw.org/fftw-${FFTW3_VERSION}.tar.gz | |||
tar -xf fftw-${FFTW3_VERSION}.tar.gz | |||
fi | |||
if [ ! -f fftw-${FFTW3_VERSION}/build-done ]; then | |||
export CFLAGS="${CFLAGS} -ffast-math" | |||
export CXXFLAGS="${CXXFLAGS} -ffast-math" | |||
cd fftw-${FFTW3_VERSION} | |||
./configure --enable-static --disable-shared --prefix=${PREFIX} \ | |||
--target=${MINGW_PREFIX} --host=${MINGW_PREFIX} --build=${HOST_ARCH} \ | |||
--enable-sse2 \ | |||
--disable-debug --disable-alloca --disable-fortran \ | |||
--with-our-malloc | |||
make | |||
make install | |||
make clean | |||
./configure --enable-static --disable-shared --prefix=${PREFIX} \ | |||
--target=${MINGW_PREFIX} --host=${MINGW_PREFIX} --build=${HOST_ARCH} \ | |||
--enable-sse2 --enable-sse --enable-single \ | |||
--disable-debug --disable-alloca --disable-fortran \ | |||
--with-our-malloc | |||
make | |||
make install | |||
make clean | |||
touch build-done | |||
cd .. | |||
fi | |||
} | |||
# --------------------------------------------------------------------------------------------------------------------- | |||
# build base libs | |||
cleanup_prefix | |||
export ARCH=32 | |||
build_base | |||
cleanup_pkgs | |||
@@ -27,8 +27,8 @@ fi | |||
source data/windows/common.env | |||
MAKE_ARGS="${MAKE_ARGS} HAVE_QT4=false HAVE_QT5=false HAVE_PYQT5=true HAVE_FFMPEG=false" | |||
MAKE_ARGS="${MAKE_ARGS} BUILDING_FOR_WINDOWS=true EXTERNAL_PLUGINS=false" | |||
MAKE_ARGS="${MAKE_ARGS} HAVE_QT4=false HAVE_QT5=false HAVE_PYQT5=true HAVE_FFMPEG=false HAVE_PROJECTM=false" | |||
MAKE_ARGS="${MAKE_ARGS} BUILDING_FOR_WINDOWS=true" | |||
if [ x"${ARCH}" != x"32" ]; then | |||
CPUARCH="x86_64" | |||
@@ -15,6 +15,8 @@ GETTEXT_VERSION=0.18.3.2 | |||
GLIB_VERSION=2.22.5 | |||
GLIB_MVERSION=2.22 | |||
FLUIDSYNTH_VERSION=1.1.6 | |||
MXML_VERSION=2.11 | |||
FFTW3_VERSION=3.3.7 | |||
QT5_VERSION=5.5.1 | |||
QT5_MVERSION=5.5 | |||
PYTHON_VERSION=3.4.7 | |||
@@ -8,6 +8,7 @@ rm -rf ~/.winepy3_x64 | |||
export WINEARCH=win32 | |||
export WINEPREFIX=~/.winepy3_x32 | |||
wineboot | |||
winetricks winxp | |||
winetricks vcrun2010 | |||
winetricks corefonts | |||
winetricks fontsmooth=rgb | |||
@@ -21,6 +22,7 @@ winetricks fontsmooth=rgb | |||
export WINEARCH=win64 | |||
export WINEPREFIX=~/.winepy3_x64 | |||
wineboot | |||
winetricks win7 | |||
winetricks vcrun2010 | |||
winetricks corefonts | |||
winetricks fontsmooth=rgb | |||
@@ -35,12 +35,9 @@ GENERAL: | |||
- implement midi-learn (new dialog) | |||
- implement favorite plugins, add in new tab near file-browser | |||
- blender style canvas theme | |||
- make it possible to use backend as fake standalone app (using pipes) instead of a shared library | |||
- artwork about tab | |||
- NSM rework | |||
FRONTEND: | |||
- options for UIs on top of carla (managed) | |||
- make always-on-top depend on it^ | |||
- complete zynfx, knob values on top | |||
- synth skin | |||
@@ -49,13 +46,10 @@ FRONTEND: | |||
ENGINE: | |||
- allow to change position of plugins (up/down) | |||
- allow to add plugins when engine is stopped | |||
- complete RtAudio+RtMidi support (only MIDI out missing) | |||
- complete Juce engine driver support | |||
- implement Haiku Media support (based from JACK?, LATER) | |||
- implement latency in continuous-rack mode | |||
- handle sample-rate changes in JACK (made possible by switch-master) | |||
- add MIDI-bank change type (GM, GS, XG and MMA). See fluidsynth and los docs | |||
- allow to use static OSC ports | |||
~ allow to use static OSC ports | |||
- switch engine modes when opening project | |||
- don't pass audio buffers to plugin process, make them request via ports | |||
@@ -66,10 +60,6 @@ PLUGINS: | |||
- implement LSCP file support (new native plugin?) | |||
- implement Csound file support | |||
Native: | |||
- Cleanup API | |||
- Document API from daz | |||
- update zynaddsubfx | |||
LADSPA: | |||
@@ -103,8 +93,6 @@ misc | |||
-allow in-line edit window (i.e. right of rack/canvas) -> shows as soon as plugin/instr. is selected | |||
-indicate engine at work top right | |||
-if engine is jack, show load top right (percent and/or gauge) | |||
-don't show jack transport on start | |||
-allow to re-open jack transport, i.e. settings/show ... and/or via toolbar | |||
-warn on quit if unsaved | |||
patchbay | |||
@@ -7,7 +7,7 @@ | |||
<x>0</x> | |||
<y>0</y> | |||
<width>612</width> | |||
<height>587</height> | |||
<height>507</height> | |||
</rect> | |||
</property> | |||
<property name="minimumSize"> | |||
@@ -708,7 +708,7 @@ | |||
</layout> | |||
</widget> | |||
<widget class="QWidget" name="page_engine"> | |||
<layout class="QVBoxLayout" name="verticalLayout_18"> | |||
<layout class="QVBoxLayout" name="verticalLayout_6"> | |||
<property name="margin"> | |||
<number>2</number> | |||
</property> | |||
@@ -924,7 +924,7 @@ | |||
</property> | |||
<layout class="QGridLayout" name="gridLayout_8"> | |||
<item row="5" column="0"> | |||
<widget class="QLabel" name="label_12"> | |||
<widget class="QLabel" name="label_engine_ui_bridges_timeout"> | |||
<property name="toolTip"> | |||
<string>How much time to wait for OSC GUIs to ping back the host</string> | |||
</property> | |||
@@ -989,6 +989,13 @@ | |||
</property> | |||
</widget> | |||
</item> | |||
<item row="6" column="0" colspan="3"> | |||
<widget class="QLabel" name="label_engine_ui_bridges_mac_note"> | |||
<property name="text"> | |||
<string>NOTE: Plugin-bridge UIs cannot be managed by Carla on macOS</string> | |||
</property> | |||
</widget> | |||
</item> | |||
</layout> | |||
</widget> | |||
</item> | |||
@@ -1006,9 +1013,9 @@ | |||
</widget> | |||
</item> | |||
<item> | |||
<layout class="QHBoxLayout" name="horizontalLayout_8"> | |||
<layout class="QHBoxLayout" name="horizontalLayout_13"> | |||
<item> | |||
<spacer name="horizontalSpacer_10"> | |||
<spacer name="horizontalSpacer_20"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
@@ -1021,7 +1028,7 @@ | |||
</spacer> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_13"> | |||
<widget class="QLabel" name="label_22"> | |||
<property name="maximumSize"> | |||
<size> | |||
<width>22</width> | |||
@@ -1040,14 +1047,14 @@ | |||
</widget> | |||
</item> | |||
<item> | |||
<widget class="QLabel" name="label_14"> | |||
<widget class="QLabel" name="label_23"> | |||
<property name="text"> | |||
<string>Restart the engine to load the new settings</string> | |||
</property> | |||
</widget> | |||
</item> | |||
<item> | |||
<spacer name="horizontalSpacer_13"> | |||
<spacer name="horizontalSpacer_21"> | |||
<property name="orientation"> | |||
<enum>Qt::Horizontal</enum> | |||
</property> | |||
@@ -1069,7 +1076,7 @@ | |||
<property name="sizeHint" stdset="0"> | |||
<size> | |||
<width>20</width> | |||
<height>225</height> | |||
<height>300</height> | |||
</size> | |||
</property> | |||
</spacer> | |||
@@ -1893,6 +1900,9 @@ This mode is not available for VST plugins.</string> | |||
</item> | |||
<item> | |||
<widget class="QCheckBox" name="ch_engine_prefer_plugin_bridges"> | |||
<property name="enabled"> | |||
<bool>false</bool> | |||
</property> | |||
<property name="toolTip"> | |||
<string>Whenever possible, run the plugins in bridge mode.</string> | |||
</property> | |||
@@ -2085,5 +2095,21 @@ This mode is not available for VST plugins.</string> | |||
</hint> | |||
</hints> | |||
</connection> | |||
<connection> | |||
<sender>cb_exp_plugin_bridges</sender> | |||
<signal>toggled(bool)</signal> | |||
<receiver>ch_engine_prefer_plugin_bridges</receiver> | |||
<slot>setEnabled(bool)</slot> | |||
<hints> | |||
<hint type="sourcelabel"> | |||
<x>402</x> | |||
<y>145</y> | |||
</hint> | |||
<hint type="destinationlabel"> | |||
<x>402</x> | |||
<y>433</y> | |||
</hint> | |||
</hints> | |||
</connection> | |||
</connections> | |||
</ui> |
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin Host | |||
* Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -2323,6 +2323,7 @@ const EngineDriverDeviceInfo* CarlaEngine::getRtAudioDeviceInfo(const uint, cons | |||
CARLA_BACKEND_END_NAMESPACE | |||
#define CARLA_PLUGIN_UI_CLASS_PREFIX EngineNative | |||
#include "CarlaHostCommon.cpp" | |||
#include "CarlaPluginUI.cpp" | |||
#include "CarlaDssiUtils.cpp" | |||
@@ -478,6 +478,7 @@ public: | |||
} | |||
// MIDI In | |||
try | |||
{ | |||
RtMidiIn midiIn(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), "carla-discovery-in"); | |||
@@ -488,9 +489,10 @@ public: | |||
extGraph.midiPorts.ins.append(portNameToId); | |||
} | |||
} | |||
} CARLA_SAFE_EXCEPTION("RtMidiIn discovery"); | |||
// MIDI Out | |||
try | |||
{ | |||
RtMidiOut midiOut(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), "carla-discovery-out"); | |||
@@ -501,7 +503,7 @@ public: | |||
extGraph.midiPorts.outs.append(portNameToId); | |||
} | |||
} | |||
} CARLA_SAFE_EXCEPTION("RtMidiOut discovery"); | |||
// --------------------------------------------------------------- | |||
// now refresh | |||
@@ -789,7 +791,12 @@ protected: | |||
newRtMidiPortName += ":"; | |||
newRtMidiPortName += portName; | |||
RtMidiIn* const rtMidiIn(new RtMidiIn(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), newRtMidiPortName.buffer(), 512)); | |||
RtMidiIn* rtMidiIn; | |||
try { | |||
rtMidiIn = new RtMidiIn(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), newRtMidiPortName.buffer(), 512); | |||
} CARLA_SAFE_EXCEPTION_RETURN("new RtMidiIn", false); | |||
rtMidiIn->ignoreTypes(); | |||
rtMidiIn->setCallback(carla_rtmidi_callback, this); | |||
@@ -836,7 +843,11 @@ protected: | |||
newRtMidiPortName += ":"; | |||
newRtMidiPortName += portName; | |||
RtMidiOut* const rtMidiOut(new RtMidiOut(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), newRtMidiPortName.buffer())); | |||
RtMidiOut* rtMidiOut; | |||
try { | |||
rtMidiOut = new RtMidiOut(getMatchedAudioMidiAPI(fAudio.getCurrentApi()), newRtMidiPortName.buffer()); | |||
} CARLA_SAFE_EXCEPTION_RETURN("new RtMidiOut", false); | |||
bool found = false; | |||
uint rtMidiPortIndex; | |||
@@ -2328,6 +2328,7 @@ void CarlaPlugin::uiIdle() | |||
pData->postUiEvents.data.clear(); | |||
} | |||
#ifndef BUILD_BRIDGE | |||
if (pData->transientTryCounter == 0) | |||
return; | |||
if (++pData->transientTryCounter % 10 != 0) | |||
@@ -2340,8 +2341,13 @@ void CarlaPlugin::uiIdle() | |||
CarlaString uiTitle(pData->name); | |||
uiTitle += " (GUI)"; | |||
if (CarlaPluginUI::tryTransientWinIdMatch(getUiBridgeProcessId(), uiTitle, pData->engine->getOptions().frontendWinId, true)) | |||
if (CarlaPluginUI::tryTransientWinIdMatch(getUiBridgeProcessId(), uiTitle, | |||
pData->engine->getOptions().frontendWinId, pData->transientFirstTry)) | |||
{ | |||
pData->transientTryCounter = 0; | |||
pData->transientFirstTry = false; | |||
} | |||
#endif | |||
} | |||
void CarlaPlugin::uiParameterChange(const uint32_t index, const float value) noexcept | |||
@@ -391,9 +391,11 @@ public: | |||
{ | |||
carla_debug("CarlaPluginBridge::~CarlaPluginBridge()"); | |||
#ifndef BUILD_BRIDGE | |||
// close UI | |||
if (pData->hints & PLUGIN_HAS_CUSTOM_UI) | |||
pData->transientTryCounter = 0; | |||
#endif | |||
pData->singleMutex.lock(); | |||
pData->masterMutex.lock(); | |||
@@ -2189,7 +2191,9 @@ public: | |||
break; | |||
case kPluginBridgeNonRtServerUiClosed: | |||
#ifndef BUILD_BRIDGE | |||
pData->transientTryCounter = 0; | |||
#endif | |||
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | |||
break; | |||
@@ -697,7 +697,9 @@ public: | |||
} | |||
else | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
pData->transientTryCounter = 0; | |||
#endif | |||
if (fOscData.target != nullptr) | |||
{ | |||
@@ -2357,8 +2359,10 @@ public: | |||
for (uint32_t i=0; i < pData->param.count; ++i) | |||
osc_send_control(fOscData, pData->param.data[i].rindex, getParameterValue(i)); | |||
#ifndef BUILD_BRIDGE | |||
if (pData->engine->getOptions().frontendWinId != 0) | |||
pData->transientTryCounter = 1; | |||
#endif | |||
carla_stdout("CarlaPluginDSSI::updateOscData() - done"); | |||
} | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin | |||
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -600,7 +600,10 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||
uiLib(nullptr), | |||
ctrlChannel(0), | |||
extraHints(0x0), | |||
#ifndef BUILD_BRIDGE | |||
transientTryCounter(0), | |||
transientFirstTry(true), | |||
#endif | |||
name(nullptr), | |||
filename(nullptr), | |||
iconName(nullptr), | |||
@@ -628,7 +631,9 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||
CarlaPlugin::ProtectedData::~ProtectedData() noexcept | |||
{ | |||
CARLA_SAFE_ASSERT(! (active && needsReset)); | |||
#ifndef BUILD_BRIDGE | |||
CARLA_SAFE_ASSERT(transientTryCounter == 0); | |||
#endif | |||
{ | |||
// mutex MUST have been locked before | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin | |||
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -227,7 +227,10 @@ struct CarlaPlugin::ProtectedData { | |||
// misc | |||
int8_t ctrlChannel; | |||
uint extraHints; | |||
#ifndef BUILD_BRIDGE | |||
uint transientTryCounter; | |||
bool transientFirstTry; | |||
#endif | |||
// data 1 | |||
const char* name; | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin JACK | |||
* Copyright (C) 2016-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2016-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -221,9 +221,11 @@ public: | |||
{ | |||
carla_debug("CarlaPluginJack::~CarlaPluginJack()"); | |||
#ifndef BUILD_BRIDGE | |||
// close UI | |||
if (pData->hints & PLUGIN_HAS_CUSTOM_UI) | |||
pData->transientTryCounter = 0; | |||
#endif | |||
pData->singleMutex.lock(); | |||
pData->masterMutex.lock(); | |||
@@ -1322,8 +1322,10 @@ public: | |||
const uintptr_t frontendWinId(pData->engine->getOptions().frontendWinId); | |||
#ifndef BUILD_BRIDGE | |||
if (! yesNo) | |||
pData->transientTryCounter = 0; | |||
#endif | |||
if (fUI.type == UI::TYPE_BRIDGE) | |||
{ | |||
@@ -1613,7 +1615,9 @@ public: | |||
fPipeServer.stopPipeServer(2000); | |||
// fall through | |||
case CarlaPipeServerLV2::UiCrashed: | |||
#ifndef BUILD_BRIDGE | |||
pData->transientTryCounter = 0; | |||
#endif | |||
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); | |||
break; | |||
} | |||
@@ -229,7 +229,9 @@ public: | |||
if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) | |||
fDescriptor->ui_show(fHandle, false); | |||
#ifndef BUILD_BRIDGE | |||
pData->transientTryCounter = 0; | |||
#endif | |||
} | |||
pData->singleMutex.lock(); | |||
@@ -800,7 +802,9 @@ public: | |||
if (! yesNo) | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
pData->transientTryCounter = 0; | |||
#endif | |||
return; | |||
} | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Bridge UI | |||
* Copyright (C) 2014-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2014-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -68,8 +68,7 @@ public: | |||
fHostUI->setTitle(options.windowTitle.buffer()); | |||
#ifdef HAVE_X11 | |||
// Out-of-process reparenting only possible on X11 | |||
#if (defined(CARLA_OS_WIN) && defined(BRIDGE_HWND)) || (defined(HAVE_X11) && defined(BRIDGE_X11)) | |||
if (options.transientWindowId != 0) | |||
{ | |||
fHostUI->setTransientWinId(options.transientWindowId); | |||
@@ -225,6 +224,7 @@ CarlaBridgeToolkit* CarlaBridgeToolkit::createNew(CarlaBridgeFormat* const forma | |||
CARLA_BRIDGE_UI_END_NAMESPACE | |||
#define CARLA_PLUGIN_UI_CLASS_PREFIX ToolkitNative | |||
#include "CarlaPluginUI.cpp" | |||
// ------------------------------------------------------------------------- |
@@ -309,6 +309,9 @@ class HostWindow(QMainWindow): | |||
self.ui.cb_transport_link.setEnabled(False) | |||
self.ui.dsb_transport_bpm.setEnabled(False) | |||
if MACOS: | |||
self.ui.cb_transport_link.setEnabled(False) | |||
self.ui.w_transport.setEnabled(False) | |||
# ---------------------------------------------------------------------------------------------------- | |||
@@ -243,10 +243,6 @@ class CarlaSettingsW(QDialog): | |||
self.ui.ch_main_show_logs.setEnabled(False) | |||
self.ui.ch_main_show_logs.setVisible(False) | |||
if WINDOWS: | |||
self.ui.ch_engine_manage_uis.setEnabled(False) | |||
self.ui.ch_engine_manage_uis.setVisible(False) | |||
if host.isControl: | |||
self.ui.lw_page.hideRow(self.TAB_INDEX_CANVAS) | |||
self.ui.lw_page.hideRow(self.TAB_INDEX_ENGINE) | |||
@@ -287,11 +283,16 @@ class CarlaSettingsW(QDialog): | |||
self.ui.ch_exp_prevent_bad_behaviour.setVisible(False) | |||
self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) | |||
if not MACOS: | |||
self.ui.label_engine_ui_bridges_mac_note.setVisible(False) | |||
# FIXME, pipes on win32 not working, and mis-behaving on macOS | |||
if MACOS or WINDOWS: | |||
self.ui.ch_engine_prefer_ui_bridges.setChecked(False) | |||
self.ui.ch_engine_prefer_ui_bridges.setEnabled(False) | |||
self.ui.ch_engine_prefer_ui_bridges.setVisible(False) | |||
self.ui.label_engine_ui_bridges_timeout.setEnabled(False) | |||
self.ui.label_engine_ui_bridges_timeout.setVisible(False) | |||
self.ui.sb_engine_ui_bridges_timeout.setEnabled(False) | |||
self.ui.sb_engine_ui_bridges_timeout.setVisible(False) | |||
@@ -328,8 +329,10 @@ class CarlaSettingsW(QDialog): | |||
self.ui.ch_main_experimental.toggled.connect(self.slot_enableExperimental) | |||
self.ui.ch_exp_wine_bridges.toggled.connect(self.slot_enableWineBridges) | |||
self.ui.cb_exp_plugin_bridges.toggled.connect(self.slot_pluginBridgesToggled) | |||
self.ui.cb_canvas_eyecandy.toggled.connect(self.slot_canvasEyeCandyToggled) | |||
self.ui.cb_canvas_fancy_eyecandy.toggled.connect(self.slot_canvasFancyEyeCandyToggled) | |||
self.ui.cb_canvas_use_opengl.toggled.connect(self.slot_canvasOpenGLToggled) | |||
# ---------------------------------------------------------------------------------------------------- | |||
# Post-connect setup | |||
@@ -344,6 +347,8 @@ class CarlaSettingsW(QDialog): | |||
self.ui.lw_page.setCurrentCell(0, 0) | |||
self.adjustSize() | |||
# -------------------------------------------------------------------------------------------------------- | |||
def loadSettings(self): | |||
@@ -862,6 +867,13 @@ class CarlaSettingsW(QDialog): | |||
else: | |||
self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) | |||
@pyqtSlot(bool) | |||
def slot_pluginBridgesToggled(self, toggled): | |||
if not toggled: | |||
self.ui.ch_exp_wine_bridges.setChecked(False) | |||
self.ui.ch_engine_prefer_plugin_bridges.setChecked(False) | |||
self.ui.lw_page.hideRow(self.TAB_INDEX_WINE) | |||
@pyqtSlot(bool) | |||
def slot_canvasEyeCandyToggled(self, toggled): | |||
if not toggled: | |||
@@ -872,6 +884,11 @@ class CarlaSettingsW(QDialog): | |||
if toggled: | |||
self.ui.cb_canvas_eyecandy.setChecked(True) | |||
@pyqtSlot(bool) | |||
def slot_canvasOpenGLToggled(self, toggled): | |||
if not toggled: | |||
self.ui.cb_canvas_render_hq_aa.setChecked(False) | |||
# -------------------------------------------------------------------------------------------------------- | |||
@pyqtSlot() | |||
@@ -27,11 +27,8 @@ LINK_FLAGS += -lpthread -lrt | |||
# ---------------------------------------------------------------------------------------------------------------------- | |||
OBJS = | |||
TARGETS = | |||
ifeq ($(LINUX),true) | |||
OBJS = \ | |||
OBJS = \ | |||
$(OBJDIR)/libjack.cpp.o \ | |||
$(OBJDIR)/libjack_base.cpp.o \ | |||
$(OBJDIR)/libjack_callbacks.cpp.o \ | |||
@@ -49,6 +46,8 @@ OBJS = \ | |||
$(OBJDIR)/libjack_transport.cpp.o \ | |||
$(OBJDIR)/ringbuffer.c.o | |||
TARGET = $(BINDIR)/jack/libjack.so.0 | |||
else | |||
OBJS = | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------- | |||
@@ -58,7 +57,7 @@ all: $(TARGET) | |||
# ---------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
rm -f $(OBJDIR)/*.o $(TARGETS) | |||
rm -f $(OBJDIR)/*.o $(TARGET) | |||
debug: | |||
$(MAKE) DEBUG=true | |||
@@ -87,11 +87,13 @@ struct Window::PrivateData { | |||
fWidgets(), | |||
fModal(), | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
hwnd(0) | |||
hwnd(nullptr), | |||
hwndParent(nullptr) | |||
#elif defined(DISTRHO_OS_MAC) | |||
fNeedsIdle(true), | |||
mView(nullptr), | |||
mWindow(nullptr) | |||
mWindow(nullptr), | |||
mParentWindow(nullptr) | |||
#else | |||
xDisplay(nullptr), | |||
xWindow(0) | |||
@@ -115,11 +117,13 @@ struct Window::PrivateData { | |||
fWidgets(), | |||
fModal(parent.pData), | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
hwnd(0) | |||
hwnd(nullptr), | |||
hwndParent(nullptr) | |||
#elif defined(DISTRHO_OS_MAC) | |||
fNeedsIdle(false), | |||
mView(nullptr), | |||
mWindow(nullptr) | |||
mWindow(nullptr), | |||
mParentWindow(nullptr) | |||
#else | |||
xDisplay(nullptr), | |||
xWindow(0) | |||
@@ -129,17 +133,16 @@ struct Window::PrivateData { | |||
init(); | |||
const PuglInternals* const parentImpl(parent.pData->fView->impl); | |||
// NOTE: almost a 1:1 copy of setTransientWinId() | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
// TODO | |||
hwndParent = parentImpl->hwnd; | |||
SetWindowLongPtr(hwnd, GWLP_HWNDPARENT, (LONG_PTR)hwndParent); | |||
#elif defined(DISTRHO_OS_MAC) | |||
[parentImpl->window orderWindow:NSWindowBelow relativeTo:[[mView window] windowNumber]]; | |||
mParentWindow = parentImpl->window; | |||
#else | |||
XSetTransientForHint(xDisplay, xWindow, parentImpl->win); | |||
#endif | |||
return; | |||
// maybe unused | |||
(void)parentImpl; | |||
} | |||
PrivateData(Application& app, Window* const self, const intptr_t parentId) | |||
@@ -156,11 +159,13 @@ struct Window::PrivateData { | |||
fWidgets(), | |||
fModal(), | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
hwnd(0) | |||
hwnd(nullptr), | |||
hwndParent(nullptr) | |||
#elif defined(DISTRHO_OS_MAC) | |||
fNeedsIdle(parentId == 0), | |||
mView(nullptr), | |||
mWindow(nullptr) | |||
mWindow(nullptr), | |||
mParentWindow(nullptr) | |||
#else | |||
xDisplay(nullptr), | |||
xWindow(0) | |||
@@ -344,22 +349,6 @@ struct Window::PrivateData { | |||
fModal.enabled = true; | |||
fModal.parent->fModal.childFocus = this; | |||
#ifdef DISTRHO_OS_WINDOWS | |||
// Center this window | |||
PuglInternals* const parentImpl = fModal.parent->fView->impl; | |||
RECT curRect; | |||
RECT parentRect; | |||
GetWindowRect(hwnd, &curRect); | |||
GetWindowRect(parentImpl->hwnd, &parentRect); | |||
int x = parentRect.left+(parentRect.right-curRect.right)/2; | |||
int y = parentRect.top +(parentRect.bottom-curRect.bottom)/2; | |||
SetWindowPos(hwnd, 0, x, y, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER); | |||
UpdateWindow(hwnd); | |||
#endif | |||
fModal.parent->setVisible(true); | |||
setVisible(true); | |||
@@ -436,25 +425,65 @@ struct Window::PrivateData { | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
if (yesNo) | |||
ShowWindow(hwnd, fFirstInit ? SW_SHOWNORMAL : SW_RESTORE); | |||
{ | |||
if (fFirstInit) | |||
{ | |||
RECT rectChild, rectParent; | |||
if (hwndParent != nullptr && | |||
GetWindowRect(hwnd, &rectChild) && | |||
GetWindowRect(hwndParent, &rectParent)) | |||
{ | |||
SetWindowPos(hwnd, hwndParent, | |||
rectParent.left + (rectChild.right-rectChild.left)/2, | |||
rectParent.top + (rectChild.bottom-rectChild.top)/2, | |||
0, 0, SWP_SHOWWINDOW|SWP_NOSIZE); | |||
} | |||
else | |||
{ | |||
ShowWindow(hwnd, SW_SHOWNORMAL); | |||
} | |||
} | |||
else | |||
{ | |||
ShowWindow(hwnd, SW_RESTORE); | |||
} | |||
} | |||
else | |||
{ | |||
ShowWindow(hwnd, SW_HIDE); | |||
} | |||
UpdateWindow(hwnd); | |||
#elif defined(DISTRHO_OS_MAC) | |||
if (yesNo) | |||
{ | |||
if (mWindow != nullptr) | |||
{ | |||
if (mParentWindow != nullptr) | |||
[mParentWindow addChildWindow:mWindow | |||
ordered:NSWindowAbove]; | |||
[mWindow setIsVisible:YES]; | |||
} | |||
else | |||
{ | |||
[mView setHidden:NO]; | |||
} | |||
} | |||
else | |||
{ | |||
if (mWindow != nullptr) | |||
{ | |||
if (mParentWindow != nullptr) | |||
[mParentWindow removeChildWindow:mWindow]; | |||
[mWindow setIsVisible:NO]; | |||
} | |||
else | |||
{ | |||
[mView setHidden:YES]; | |||
} | |||
} | |||
#else | |||
if (yesNo) | |||
@@ -626,14 +655,14 @@ struct Window::PrivateData { | |||
DISTRHO_SAFE_ASSERT_RETURN(winId != 0,); | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
// TODO | |||
hwndParent = (HWND)winId; | |||
SetWindowLongPtr(hwnd, GWLP_HWNDPARENT, (LONG_PTR)winId); | |||
#elif defined(DISTRHO_OS_MAC) | |||
NSWindow* const window = [NSApp windowWithWindowNumber:winId]; | |||
DISTRHO_SAFE_ASSERT_RETURN(window != nullptr,); | |||
NSWindow* const parentWindow = [NSApp windowWithWindowNumber:winId]; | |||
DISTRHO_SAFE_ASSERT_RETURN(parentWindow != nullptr,); | |||
[window addChildWindow:mWindow | |||
ordered:NSWindowAbove]; | |||
[mWindow makeKeyWindow]; | |||
[parentWindow addChildWindow:mWindow | |||
ordered:NSWindowAbove]; | |||
#else | |||
XSetTransientForHint(xDisplay, xWindow, static_cast< ::Window>(winId)); | |||
#endif | |||
@@ -984,11 +1013,13 @@ struct Window::PrivateData { | |||
} fModal; | |||
#if defined(DISTRHO_OS_WINDOWS) | |||
HWND hwnd; | |||
HWND hwnd; | |||
HWND hwndParent; | |||
#elif defined(DISTRHO_OS_MAC) | |||
bool fNeedsIdle; | |||
PuglOpenGLView* mView; | |||
id mWindow; | |||
id mParentWindow; | |||
#else | |||
Display* xDisplay; | |||
::Window xWindow; | |||
@@ -931,7 +931,7 @@ void MidiOutCore :: initialize( const std::string& clientName ) | |||
OSStatus result = MIDIClientCreate(name, NULL, NULL, &client ); | |||
if ( result != noErr ) { | |||
std::ostringstream ost; | |||
ost << "MidiInCore::initialize: error creating OS-X MIDI client object (" << result << ")."; | |||
ost << "MidiOutCore::initialize: error creating OS-X MIDI client object (" << result << ")."; | |||
errorString_ = ost.str(); | |||
error( RtMidiError::DRIVER_ERROR, errorString_ ); | |||
return; | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -19,7 +19,6 @@ | |||
#include "CarlaNative.h" | |||
#ifdef CARLA_OS_WIN | |||
# define DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# undef HAVE_PYQT | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -19,7 +19,6 @@ | |||
#include "CarlaNative.h" | |||
#ifdef CARLA_OS_WIN | |||
# define DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# undef HAVE_PYQT | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -20,7 +20,6 @@ | |||
#include "CarlaUtils.hpp" | |||
#ifdef CARLA_OS_WIN | |||
# define DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# undef HAVE_PYQT | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -20,7 +20,6 @@ | |||
#include "CarlaUtils.hpp" | |||
#ifdef CARLA_OS_WIN | |||
# define DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# undef HAVE_PYQT | |||
#endif | |||
@@ -35,8 +35,12 @@ OBJS_all += \ | |||
ifeq ($(HAVE_ZYN_DEPS),true) | |||
OBJS_all += \ | |||
$(OBJDIR)/zynaddsubfx-fx.cpp.o \ | |||
$(OBJDIR)/zynaddsubfx-src.cpp.o \ | |||
$(OBJDIR)/zynaddsubfx-src.cpp.o | |||
ifneq ($(SKIP_ZYN_SYNTH),true) | |||
OBJS_all += \ | |||
$(OBJDIR)/zynaddsubfx-synth.cpp.o | |||
endif | |||
ifeq ($(HAVE_ZYN_UI_DEPS),true) | |||
TARGETS += resources/zynaddsubfx-ui$(APP_EXT) | |||
@@ -12,6 +12,7 @@ endif | |||
ifeq ($(MACOS_OR_WIN32),true) | |||
HAVE_DGL = true | |||
SKIP_ZYN_SYNTH = true | |||
else | |||
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true) | |||
endif | |||
@@ -98,7 +99,9 @@ endif | |||
DPF_FLAGS = -I$(CWDE)/modules/distrho | |||
ifeq ($(HAVE_DGL),true) | |||
ifneq ($(MACOS_OR_WIN32),true) | |||
DPF_FLAGS += $(shell pkg-config --cflags gl) | |||
endif | |||
DPF_FLAGS += -I$(CWDE)/modules/dgl -DDGL_NAMESPACE=CarlaDGL -DDGL_FILE_BROWSER_DISABLED -DDGL_NO_SHARED_RESOURCES | |||
endif | |||
@@ -123,6 +126,9 @@ ZYN_DSP_FLAGS += $(shell pkg-config --cflags fftw3 zlib) | |||
ZYN_DSP_LIBS = $(ZYN_BASE_LIBS) | |||
ZYN_DSP_LIBS += $(shell pkg-config --libs fftw3 zlib) | |||
ifeq ($(SKIP_ZYN_SYNTH),true) | |||
BASE_FLAGS += -DSKIP_ZYN_SYNTH | |||
else | |||
# UI flags | |||
ifeq ($(HAVE_ZYN_UI_DEPS),true) | |||
@@ -154,6 +160,7 @@ else # HAVE_ZYN_UI_DEPS | |||
ZYN_DSP_FLAGS += -DNO_UI | |||
endif # SKIP_ZYN_SYNTH | |||
endif # HAVE_ZYN_UI_DEPS | |||
endif # HAVE_ZYN_DEPS | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -62,7 +62,7 @@ void carla_register_all_native_external_plugins(void) | |||
#ifdef HAVE_ZYN_DEPS | |||
// ZynAddSubFX | |||
carla_register_native_plugin_zynaddsubfx_fx(); | |||
# ifndef DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# ifndef SKIP_ZYN_SYNTH | |||
carla_register_native_plugin_zynaddsubfx_synth(); | |||
# endif | |||
#endif | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -356,7 +356,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
/* copyright */ "GNU GPL v2+", | |||
DESCFUNCS | |||
}, | |||
# ifndef DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# ifndef SKIP_ZYN_SYNTH | |||
{ | |||
/* category */ NATIVE_PLUGIN_CATEGORY_SYNTH, | |||
/* hints */ static_cast<NativePluginHints>(NATIVE_PLUGIN_IS_SYNTH | |||
@@ -381,7 +381,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
/* copyright */ "GNU GPL v2+", | |||
DESCFUNCS | |||
}, | |||
# endif // ! DISABLE_PLUGINS_FOR_WINDOWS_BUILD | |||
# endif // ! SKIP_ZYN_SYNTH | |||
#endif // HAVE_ZYN_DEPS | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Native Plugins | |||
* Copyright (C) 2012-2016 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2012-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -26,16 +26,28 @@ | |||
# pragma clang diagnostic push | |||
# pragma clang diagnostic ignored "-Winconsistent-missing-override" | |||
# pragma clang diagnostic ignored "-Wunused-private-field" | |||
#elif defined(__GNUC__) && (__GNUC__ >= 6) | |||
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) | |||
# pragma GCC diagnostic push | |||
# pragma GCC diagnostic ignored "-Wshift-negative-value" | |||
# pragma GCC diagnostic ignored "-Wmisleading-indentation" | |||
# pragma GCC diagnostic ignored "-Wliteral-suffix" | |||
# if __GNUC__ >= 6 | |||
# pragma GCC diagnostic ignored "-Wshift-negative-value" | |||
# pragma GCC diagnostic ignored "-Wmisleading-indentation" | |||
# endif | |||
#endif | |||
// base c-style headers | |||
#include "zynaddsubfx/tlsf/tlsf.h" | |||
#include "zynaddsubfx/rtosc/rtosc.h" | |||
#ifdef SKIP_ZYN_SYNTH | |||
# define PRId64 P_INT64 | |||
# define PRIi64 P_INT64 | |||
# define PRIx64 P_UINT64 | |||
# define PRId32 "%d" | |||
# define PRIi32 "%i" | |||
# define PRIx32 "%x" | |||
#endif | |||
// C-code includes | |||
extern "C" { | |||
#include "zynaddsubfx/tlsf/tlsf.c" | |||
@@ -53,6 +65,9 @@ extern "C" { | |||
#include "zynaddsubfx/rtosc/dispatch.c" | |||
#include "zynaddsubfx/rtosc/rtosc.c" | |||
#ifdef CARLA_OS_WIN | |||
# include "zynaddsubfx/rtosc/pretty-format.c" | |||
#endif | |||
} | |||
// rtosc includes | |||
@@ -71,6 +86,7 @@ extern "C" { | |||
// zynaddsubfx includes | |||
#include "zynaddsubfx/version.cpp" | |||
#ifndef SKIP_ZYN_SYNTH | |||
#include "zynaddsubfx/Containers/MultiPseudoStack.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
@@ -95,7 +111,9 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/AnalogFilter.cpp" | |||
#include "zynaddsubfx/Misc/Bank.cpp" | |||
#undef INSTRUMENT_EXTENSION | |||
#undef FORCE_BANK_DIR_FILE | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -103,7 +121,9 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/FFTwrapper.cpp" | |||
#define INSTRUMENT_EXTENSION INSTRUMENT_EXTENSION_DB | |||
#include "zynaddsubfx/Misc/BankDb.cpp" | |||
#undef INSTRUMENT_EXTENSION | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -111,7 +131,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/Filter.cpp" | |||
#include "zynaddsubfx/Misc/CallbackRepeater.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -119,7 +139,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/FormantFilter.cpp" | |||
#include "zynaddsubfx/Misc/Config.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -127,15 +147,15 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/SVFilter.cpp" | |||
#undef rBegin | |||
#include "zynaddsubfx/Misc/Master.cpp" | |||
#undef rObject | |||
#undef rStdString | |||
#undef rStdStringCb | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/DSP/Unison.cpp" | |||
#include "zynaddsubfx/Misc/Microtonal.cpp" | |||
#undef MAX_LINE_SIZE | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -143,7 +163,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Alienwah.cpp" | |||
#include "zynaddsubfx/Misc/MiddleWare.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -151,7 +171,8 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Chorus.cpp" | |||
#include "zynaddsubfx/Misc/Part.cpp" | |||
#undef CLONE | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -159,7 +180,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Distorsion.cpp" | |||
#include "zynaddsubfx/Misc/PresetExtractor.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -167,7 +188,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/DynamicFilter.cpp" | |||
#include "zynaddsubfx/Misc/Recorder.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -175,8 +196,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Echo.cpp" | |||
#undef MAX_DELAY | |||
#include "zynaddsubfx/Misc/WavFile.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -184,7 +204,8 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Effect.cpp" | |||
#include "zynaddsubfx/Params/ADnoteParameters.cpp" | |||
#undef EXPAND | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -192,7 +213,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/EffectLFO.cpp" | |||
#include "zynaddsubfx/Params/Controller.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -200,7 +221,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/EffectMgr.cpp" | |||
#include "zynaddsubfx/Params/EnvelopeParams.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -208,7 +229,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/EQ.cpp" | |||
#include "zynaddsubfx/Params/LFOParams.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -216,10 +237,9 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Phaser.cpp" | |||
#undef PHASER_LFO_SHAPE | |||
#undef ONE_ | |||
#undef ZERO_ | |||
#include "zynaddsubfx/Params/PADnoteParameters.cpp" | |||
#undef PC | |||
#undef P_C | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -227,7 +247,9 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Effects/Reverb.cpp" | |||
#include "zynaddsubfx/Params/SUBnoteParameters.cpp" | |||
#undef doPaste | |||
#undef doPPaste | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -235,7 +257,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Allocator.cpp" | |||
#include "zynaddsubfx/Synth/ADnote.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -243,9 +265,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Bank.cpp" | |||
#undef INSTRUMENT_EXTENSION | |||
#undef FORCE_BANK_DIR_FILE | |||
#include "zynaddsubfx/Synth/Envelope.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -253,9 +273,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#define INSTRUMENT_EXTENSION INSTRUMENT_EXTENSION_DB | |||
#include "zynaddsubfx/Misc/BankDb.cpp" | |||
#undef INSTRUMENT_EXTENSION | |||
#include "zynaddsubfx/Synth/LFO.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -263,7 +281,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/CallbackRepeater.cpp" | |||
#include "zynaddsubfx/Synth/ModFilter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -271,7 +289,13 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Config.cpp" | |||
#include "zynaddsubfx/Synth/OscilGen.cpp" | |||
#undef PC | |||
#undef DIFF | |||
#undef PRESERVE | |||
#undef RESTORE | |||
#undef FUNC | |||
#undef FILTER | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -279,15 +303,15 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Master.cpp" | |||
#include "zynaddsubfx/Synth/PADnote.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
#undef rStdStringCb | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Microtonal.cpp" | |||
#undef MAX_LINE_SIZE | |||
#include "zynaddsubfx/Synth/Resonance.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -295,7 +319,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/MiddleWare.cpp" | |||
#include "zynaddsubfx/Synth/SUBnote.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -303,8 +327,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Part.cpp" | |||
#undef CLONE | |||
#include "zynaddsubfx/Synth/SynthNote.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -312,7 +335,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/PresetExtractor.cpp" | |||
#include "zynaddsubfx/Synth/WatchPoint.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -320,7 +343,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Recorder.cpp" | |||
#include "zynaddsubfx/UI/ConnectionDummy.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -328,7 +351,10 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/Util.cpp" | |||
#include "zynaddsubfx/globals.cpp" | |||
#endif // ! SKIP_ZYN_SYNTH | |||
#include "zynaddsubfx/DSP/AnalogFilter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -336,7 +362,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/WavFile.cpp" | |||
#include "zynaddsubfx/DSP/FFTwrapper.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -344,7 +370,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/WaveShapeSmps.cpp" | |||
#include "zynaddsubfx/DSP/Filter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -352,7 +378,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Misc/XMLwrapper.cpp" | |||
#include "zynaddsubfx/DSP/FormantFilter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -360,8 +386,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/ADnoteParameters.cpp" | |||
#undef EXPAND | |||
#include "zynaddsubfx/DSP/SVFilter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -369,7 +394,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/Controller.cpp" | |||
#include "zynaddsubfx/DSP/Unison.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -377,7 +402,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/EnvelopeParams.cpp" | |||
#include "zynaddsubfx/Effects/Alienwah.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -385,7 +410,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/FilterParams.cpp" | |||
#include "zynaddsubfx/Effects/Chorus.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -393,7 +418,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/LFOParams.cpp" | |||
#include "zynaddsubfx/Effects/Distorsion.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -401,9 +426,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/PADnoteParameters.cpp" | |||
#undef PC | |||
#undef P_C | |||
#include "zynaddsubfx/Effects/DynamicFilter.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -411,7 +434,8 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/Presets.cpp" | |||
#include "zynaddsubfx/Effects/Echo.cpp" | |||
#undef MAX_DELAY | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -419,7 +443,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/PresetsArray.cpp" | |||
#include "zynaddsubfx/Effects/Effect.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -427,7 +451,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/PresetsStore.cpp" | |||
#include "zynaddsubfx/Effects/EffectLFO.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -435,9 +459,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Params/SUBnoteParameters.cpp" | |||
#undef doPaste | |||
#undef doPPaste | |||
#include "zynaddsubfx/Effects/EffectMgr.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -445,7 +467,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/ADnote.cpp" | |||
#include "zynaddsubfx/Effects/EQ.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -453,7 +475,10 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/Envelope.cpp" | |||
#include "zynaddsubfx/Effects/Phaser.cpp" | |||
#undef PHASER_LFO_SHAPE | |||
#undef ONE_ | |||
#undef ZERO_ | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -461,7 +486,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/LFO.cpp" | |||
#include "zynaddsubfx/Effects/Reverb.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -469,7 +494,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/ModFilter.cpp" | |||
#include "zynaddsubfx/Misc/Allocator.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -477,13 +502,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/OscilGen.cpp" | |||
#undef PC | |||
#undef DIFF | |||
#undef PRESERVE | |||
#undef RESTORE | |||
#undef FUNC | |||
#undef FILTER | |||
#include "zynaddsubfx/Misc/Util.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -491,7 +510,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/PADnote.cpp" | |||
#include "zynaddsubfx/Misc/WaveShapeSmps.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -499,7 +518,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/Resonance.cpp" | |||
#include "zynaddsubfx/Misc/XMLwrapper.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -507,7 +526,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/SUBnote.cpp" | |||
#include "zynaddsubfx/Params/FilterParams.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -515,7 +534,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/SynthNote.cpp" | |||
#include "zynaddsubfx/Params/Presets.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -523,7 +542,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/Synth/WatchPoint.cpp" | |||
#include "zynaddsubfx/Params/PresetsArray.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -531,7 +550,7 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/UI/ConnectionDummy.cpp" | |||
#include "zynaddsubfx/Params/PresetsStore.cpp" | |||
#undef rBegin | |||
#undef rObject | |||
#undef rStdString | |||
@@ -539,14 +558,13 @@ extern "C" { | |||
#undef rChangeCb | |||
#define rChangeCb | |||
#include "zynaddsubfx/globals.cpp" | |||
#if defined(__clang__) | |||
# pragma clang diagnostic pop | |||
#elif defined(__GNUC__) && (__GNUC__ >= 6) | |||
# pragma GCC diagnostic pop | |||
#endif | |||
#ifndef SKIP_ZYN_SYNTH | |||
// Dummy variables and functions for linking purposes | |||
namespace zyncarla { | |||
class WavFile; | |||
@@ -563,3 +581,18 @@ namespace Nio { | |||
void waveStop(){} | |||
} | |||
} | |||
#endif // ! SKIP_ZYN_SYNTH | |||
#ifdef CARLA_OS_WIN | |||
rtosc_version rtosc_current_version() | |||
{ | |||
return ((rtosc_version) { 0, 0, 0 } ); | |||
} | |||
void rtosc_version_print_to_12byte_str(const rtosc_version* v, | |||
char* _12bytes) | |||
{ | |||
snprintf(_12bytes, 12, "%u.%u.%u", | |||
(unsigned)v->major, (unsigned)v->minor, (unsigned)v->revision); | |||
} | |||
#endif |
@@ -23,8 +23,8 @@ static int asnprintf(char* str, size_t size, const char* format, ...) | |||
return written; | |||
} | |||
static const rtosc_print_options* default_print_options | |||
= &((rtosc_print_options) { true, 2, " ", 80}); | |||
static const rtosc_print_options default_print_options | |||
= ((rtosc_print_options) { true, 2, " ", 80}); | |||
/** | |||
* Return the char that represents the escape sequence | |||
@@ -73,7 +73,7 @@ size_t rtosc_print_arg_val(const rtosc_arg_val_t *arg, | |||
{ | |||
size_t wrt = 0; | |||
if(!opt) | |||
opt = default_print_options; | |||
opt = &default_print_options; | |||
assert(arg); | |||
const rtosc_arg_t* val = &arg->val; | |||
@@ -301,7 +301,7 @@ size_t rtosc_print_arg_vals(const rtosc_arg_val_t *args, size_t n, | |||
size_t wrt=0; | |||
int args_written_this_line = (cols_used) ? 1 : 0; | |||
if(!opt) | |||
opt = default_print_options; | |||
opt = &default_print_options; | |||
size_t sep_len = strlen(opt->sep); | |||
char* last_sep = buffer - 1; | |||
for(size_t i = 0; i < n; ++i) | |||
@@ -81,6 +81,12 @@ LINK_FLAGS += $(LINUXSAMPLER_LIBS) | |||
LINK_FLAGS += $(MAGIC_LIBS) | |||
LINK_FLAGS += $(X11_LIBS) | |||
ifeq ($(MACOS),true) | |||
# NOTE: this assumes only LV2 version will be built | |||
SHARED += -Wl,-exported_symbol,_lv2_descriptor | |||
SHARED += -Wl,-exported_symbol,_lv2ui_descriptor | |||
endif | |||
# ---------------------------------------------------------------------------------------------------------------------------- | |||
TARGETS = \ | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin UI | |||
* Copyright (C) 2014-2017 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2014-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -33,6 +33,10 @@ | |||
# include <ctime> | |||
#endif | |||
#ifndef CARLA_PLUGIN_UI_CLASS_PREFIX | |||
# error CARLA_PLUGIN_UI_CLASS_PREFIX undefined | |||
#endif | |||
// --------------------------------------------------------------------------------------------------------------------- | |||
// X11 | |||
@@ -359,6 +363,12 @@ private: | |||
#ifdef CARLA_OS_MAC | |||
#ifdef BUILD_BRIDGE | |||
# define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindowBridged, CARLA_PLUGIN_UI_CLASS_PREFIX) | |||
#else | |||
# define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindow, CARLA_PLUGIN_UI_CLASS_PREFIX) | |||
#endif | |||
@interface CarlaPluginWindow : NSWindow | |||
{ | |||
@public | |||
@@ -443,8 +453,7 @@ public: | |||
CocoaPluginUI(Callback* const cb, const uintptr_t parentId, const bool isResizable) noexcept | |||
: CarlaPluginUI(cb, isResizable), | |||
fView(nullptr), | |||
fWindow(0), | |||
fParentId(parentId) | |||
fWindow(0) | |||
{ | |||
[NSAutoreleasePool new]; | |||
[NSApplication sharedApplication]; | |||
@@ -495,9 +504,6 @@ public: | |||
[fView setHidden:NO]; | |||
[fWindow setIsVisible:YES]; | |||
if (fParentId != 0) | |||
setTransientWinId(fParentId); | |||
} | |||
void hide() override | |||
@@ -559,12 +565,11 @@ public: | |||
{ | |||
CARLA_SAFE_ASSERT_RETURN(fWindow != 0,); | |||
NSWindow* window = [NSApp windowWithWindowNumber:winId]; | |||
CARLA_SAFE_ASSERT_RETURN(window != nullptr,); | |||
NSWindow* const parentWindow = [NSApp windowWithWindowNumber:winId]; | |||
CARLA_SAFE_ASSERT_RETURN(parentWindow != nullptr,); | |||
[window addChildWindow:fWindow | |||
ordered:NSWindowAbove]; | |||
[fWindow makeKeyWindow]; | |||
[parentWindow addChildWindow:fWindow | |||
ordered:NSWindowAbove]; | |||
} | |||
void setChildWindow(void* const winId) override | |||
@@ -585,7 +590,6 @@ public: | |||
private: | |||
NSView* fView; | |||
id fWindow; | |||
uintptr_t fParentId; | |||
CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CocoaPluginUI) | |||
}; | |||
@@ -606,7 +610,8 @@ class WindowsPluginUI : public CarlaPluginUI | |||
public: | |||
WindowsPluginUI(Callback* const cb, const uintptr_t parentId, const bool isResizable) noexcept | |||
: CarlaPluginUI(cb, isResizable), | |||
fWindow(0), | |||
fWindow(nullptr), | |||
fParentWindow(nullptr), | |||
fIsVisible(false), | |||
fFirstShow(true) | |||
{ | |||
@@ -675,9 +680,31 @@ public: | |||
{ | |||
CARLA_SAFE_ASSERT_RETURN(fWindow != 0,); | |||
ShowWindow(fWindow, fFirstShow ? SW_SHOWNORMAL : SW_RESTORE); | |||
if (fFirstShow) | |||
{ | |||
fFirstShow = false; | |||
RECT rectChild, rectParent; | |||
if (fParentWindow != nullptr && | |||
GetWindowRect(fWindow, &rectChild) && | |||
GetWindowRect(fParentWindow, &rectParent)) | |||
{ | |||
SetWindowPos(fWindow, fParentWindow, | |||
rectParent.left + (rectChild.right-rectChild.left)/2, | |||
rectParent.top + (rectChild.bottom-rectChild.top)/2, | |||
0, 0, SWP_SHOWWINDOW|SWP_NOSIZE); | |||
} | |||
else | |||
{ | |||
ShowWindow(fWindow, SW_SHOWNORMAL); | |||
} | |||
} | |||
else | |||
{ | |||
ShowWindow(fWindow, SW_RESTORE); | |||
} | |||
fIsVisible = true; | |||
fFirstShow = false; | |||
UpdateWindow(fWindow); | |||
} | |||
@@ -769,7 +796,8 @@ public: | |||
{ | |||
CARLA_SAFE_ASSERT_RETURN(fWindow != 0,); | |||
// TODO | |||
fParentWindow = (HWND)winId; | |||
SetWindowLongPtr(fWindow, GWLP_HWNDPARENT, (LONG_PTR)winId); | |||
} | |||
void setChildWindow(void* const winId) override | |||
@@ -789,6 +817,7 @@ public: | |||
private: | |||
HWND fWindow; | |||
HWND fParentWindow; | |||
WNDCLASS fWindowClass; | |||
bool fIsVisible; | |||
@@ -824,6 +853,7 @@ LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||
// ----------------------------------------------------- | |||
#ifndef BUILD_BRIDGE | |||
bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) | |||
{ | |||
CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); | |||
@@ -1028,11 +1058,90 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons | |||
XFlush(sd.display); | |||
return true; | |||
#else | |||
#endif | |||
#ifdef CARLA_OS_MAC | |||
uint const hints = kCGWindowListOptionOnScreenOnly|kCGWindowListExcludeDesktopElements; | |||
CFArrayRef const windowListRef = CGWindowListCopyWindowInfo(hints, kCGNullWindowID); | |||
const NSArray* const windowList = (const NSArray*)windowListRef; | |||
int windowToMap, windowWithPID = 0, windowWithNameAndPID = 0; | |||
for (NSDictionary* const entry in windowList) | |||
{ | |||
if ([entry[(id)kCGWindowSharingState] intValue] == kCGWindowSharingNone) | |||
continue; | |||
NSString* const windowName = entry[(id)kCGWindowName]; | |||
int const windowNumber = [entry[(id)kCGWindowNumber] intValue]; | |||
uintptr_t const windowPID = [entry[(id)kCGWindowOwnerPID] intValue]; | |||
if (windowPID != pid) | |||
continue; | |||
windowWithPID = windowNumber; | |||
if (windowName != nullptr && std::strcmp([windowName UTF8String], uiTitle) == 0) | |||
windowWithNameAndPID = windowNumber; | |||
} | |||
CFRelease(windowListRef); | |||
if (windowWithNameAndPID != 0) | |||
{ | |||
carla_stdout("Match found using pid and name"); | |||
windowToMap = windowWithNameAndPID; | |||
} | |||
else if (windowWithPID != 0) | |||
{ | |||
carla_stdout("Match found using pid"); | |||
windowToMap = windowWithPID; | |||
} | |||
else | |||
{ | |||
return false; | |||
} | |||
NSWindow* const parentWindow = [NSApp windowWithWindowNumber:winId]; | |||
CARLA_SAFE_ASSERT_RETURN(parentWindow != nullptr, false); | |||
[parentWindow orderWindow:NSWindowBelow | |||
relativeTo:windowToMap]; | |||
return true; | |||
(void)pid; (void)centerUI; | |||
#endif | |||
#ifdef CARLA_OS_WIN | |||
if (HWND const childWindow = FindWindowA(nullptr, uiTitle)) | |||
{ | |||
HWND const parentWindow = (HWND)winId; | |||
SetWindowLongPtr(childWindow, GWLP_HWNDPARENT, (LONG_PTR)parentWindow); | |||
if (centerUI) | |||
{ | |||
RECT rectChild, rectParent; | |||
if (GetWindowRect(childWindow, &rectChild) && GetWindowRect(parentWindow, &rectParent)) | |||
{ | |||
SetWindowPos(childWindow, parentWindow, | |||
rectParent.left + (rectChild.right-rectChild.left)/2, | |||
rectParent.top + (rectChild.bottom-rectChild.top)/2, | |||
0, 0, SWP_NOSIZE); | |||
} | |||
} | |||
carla_stdout("Match found using window name"); | |||
return true; | |||
} | |||
return false; | |||
#endif | |||
// fallback, may be unused | |||
return true; | |||
(void)pid; (void)centerUI; | |||
} | |||
#endif // BUILD_BRIDGE | |||
// ----------------------------------------------------- | |||
@@ -1,6 +1,6 @@ | |||
/* | |||
* Carla Plugin UI | |||
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com> | |||
* Copyright (C) 2014-2018 Filipe Coelho <falktx@falktx.com> | |||
* | |||
* This program is free software; you can redistribute it and/or | |||
* modify it under the terms of the GNU General Public License as | |||
@@ -46,7 +46,9 @@ public: | |||
virtual void* getDisplay() const noexcept = 0; | |||
#endif | |||
#ifndef BUILD_BRIDGE | |||
static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); | |||
#endif | |||
#ifdef CARLA_OS_MAC | |||
static CarlaPluginUI* newCocoa(Callback*, uintptr_t, bool); | |||