Browse Source

Changes to make zyn fx buildable on mingw

Skips most of zyn code
tags/1.9.8
falkTX 6 years ago
parent
commit
7307d37487
7 changed files with 193 additions and 94 deletions
  1. +8
    -2
      data/linux/build-deps.sh
  2. +60
    -3
      data/windows/build-deps.sh
  3. +0
    -3
      data/windows/build-win.sh
  4. +2
    -0
      data/windows/common.env
  5. +5
    -1
      source/native-plugins/external/Makefile
  6. +114
    -81
      source/native-plugins/zynaddsubfx-src.cpp
  7. +4
    -4
      source/native-plugins/zynaddsubfx/rtosc/pretty-format.c

+ 8
- 2
data/linux/build-deps.sh View File

@@ -335,11 +335,17 @@ 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
./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 --enable-sse --enable-sse2 --enable-single --disable-shared --disable-debug --prefix=$PREFIX
./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


+ 60
- 3
data/windows/build-deps.sh View File

@@ -352,14 +352,71 @@ 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

export ARCH=32
build_base
cleanup_pkgs
# cleanup_prefix

# export ARCH=32
# build_base
# cleanup_pkgs

export ARCH=64
build_base


+ 0
- 3
data/windows/build-win.sh View File

@@ -30,9 +30,6 @@ source data/windows/common.env
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"

# FIXME
MAKE_ARGS="${MAKE_ARGS} HAVE_ZYN_DEPS=false"

if [ x"${ARCH}" != x"32" ]; then
CPUARCH="x86_64"
else


+ 2
- 0
data/windows/common.env View File

@@ -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


+ 5
- 1
source/native-plugins/external/Makefile View File

@@ -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 ($(MACOS_OR_WIN32),true)
OBJS_all += \
$(OBJDIR)/zynaddsubfx-synth.cpp.o
endif

ifeq ($(HAVE_ZYN_UI_DEPS),true)
TARGETS += resources/zynaddsubfx-ui$(APP_EXT)


+ 114
- 81
source/native-plugins/zynaddsubfx-src.cpp View File

@@ -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,32 @@
# 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 CARLA_OS_WIN
# define PRId64 P_INT64
# define PRIi64 P_INT64
# define PRIx64 P_UINT64
# define PRId32 "%d"
# define PRIi32 "%i"
# define PRIx32 "%x"
#endif

#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
# define CARLA_ZYN_FULL
#endif

// C-code includes
extern "C" {
#include "zynaddsubfx/tlsf/tlsf.c"
@@ -52,6 +68,7 @@ extern "C" {
#undef tlsf_insist

#include "zynaddsubfx/rtosc/dispatch.c"
#include "zynaddsubfx/rtosc/pretty-format.c"
#include "zynaddsubfx/rtosc/rtosc.c"
}

@@ -71,6 +88,7 @@ extern "C" {
// zynaddsubfx includes
#include "zynaddsubfx/version.cpp"

#ifdef CARLA_ZYN_FULL
#include "zynaddsubfx/Containers/MultiPseudoStack.cpp"
#undef rBegin
#undef rObject
@@ -95,7 +113,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 +123,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 +133,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 +141,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 +149,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 +165,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 +173,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 +182,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 +190,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 +198,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 +206,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 +215,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 +223,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 +231,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 +239,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 +249,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 +259,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 +267,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 +275,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 +283,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 +291,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 +305,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 +321,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 +329,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 +337,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 +345,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 +353,10 @@ extern "C" {
#undef rChangeCb
#define rChangeCb

#include "zynaddsubfx/Misc/Util.cpp"
#include "zynaddsubfx/globals.cpp"
#endif // CARLA_ZYN_FULL

#include "zynaddsubfx/DSP/AnalogFilter.cpp"
#undef rBegin
#undef rObject
#undef rStdString
@@ -336,7 +364,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 +372,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 +380,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 +388,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 +396,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 +404,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 +412,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 +420,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 +428,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 +436,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 +445,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 +453,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 +461,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 +469,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 +477,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 +488,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 +496,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 +504,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 +512,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 +520,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 +528,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 +536,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 +544,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 +552,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 +560,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

#ifdef CARLA_ZYN_FULL
// Dummy variables and functions for linking purposes
namespace zyncarla {
class WavFile;
@@ -563,3 +583,16 @@ namespace Nio {
void waveStop(){}
}
}
#endif // CARLA_ZYN_FULL

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);
}

+ 4
- 4
source/native-plugins/zynaddsubfx/rtosc/pretty-format.c View File

@@ -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)


Loading…
Cancel
Save