diff --git a/source/Makefile.mk b/source/Makefile.mk
index a83bf528c..348b2acd1 100644
--- a/source/Makefile.mk
+++ b/source/Makefile.mk
@@ -10,9 +10,6 @@
# Support for LADSPA, DSSI, LV2, VST and AU plugins
CARLA_PLUGIN_SUPPORT = true
-# Support for csound files (version 6, not ready yet)
-CARLA_CSOUND_SUPPORT = false
-
# Support for GIG, SF2 and SFZ sample banks (through fluidsynth and linuxsampler)
CARLA_SAMPLERS_SUPPORT = true
@@ -68,6 +65,12 @@ BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard
LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
endif
+ifeq ($(PANDORA),true)
+# OpenPandora flags
+BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
+LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all
+endif
+
ifneq ($(WIN32),true)
# not needed for Windows
BASE_FLAGS += -fPIC -DPIC
@@ -127,8 +130,8 @@ endif
# --------------------------------------------------------------
# Check for qt, set default version
-HAVE_QT4 = $(shell pkg-config --exists QtCore QtXml && echo true)
-HAVE_QT5 = $(shell pkg-config --exists Qt5Core Qt5Xml && echo true)
+HAVE_QT4 = $(shell pkg-config --exists QtCore && echo true)
+HAVE_QT5 = $(shell pkg-config --exists Qt5Core && echo true)
ifeq ($(MACOS_OR_WIN32),true)
DEFAULT_QT ?= 5
@@ -210,22 +213,22 @@ HAVE_DGL = true
endif
# --------------------------------------------------------------
-# Check for juce support
+# Check for juce UI support
ifeq ($(HAIKU),true)
-HAVE_JUCE = false
+HAVE_JUCE_UI = false
endif
ifeq ($(LINUX),true)
-HAVE_JUCE = $(shell pkg-config --exists x11 xinerama xext xcursor freetype2 && echo true)
+HAVE_JUCE_UI = $(shell pkg-config --exists x11 xinerama xext xcursor freetype2 && echo true)
endif
ifeq ($(MACOS),true)
-HAVE_JUCE = true
+HAVE_JUCE_UI = true
endif
ifeq ($(WIN32),true)
-HAVE_JUCE = true
+HAVE_JUCE_UI = true
endif
# --------------------------------------------------------------
@@ -250,12 +253,6 @@ HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
endif
-ifeq ($(CARLA_CSOUND_SUPPORT),true)
-ifeq ($(HAVE_JUCE),true)
-HAVE_CSOUND = $(shell pkg-config --exists sndfile && echo true)
-endif
-endif
-
ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
@@ -288,8 +285,8 @@ ifeq ($(HAVE_FFMPEG),true)
BASE_FLAGS += -DHAVE_FFMPEG
endif
-ifeq ($(HAVE_JUCE),true)
-BASE_FLAGS += -DHAVE_JUCE
+ifeq ($(HAVE_JUCE_UI),true)
+BASE_FLAGS += -DHAVE_JUCE_UI
endif
ifeq ($(HAVE_WAYLAND),true)
@@ -309,18 +306,9 @@ LIBLO_LIBS = $(shell pkg-config --libs liblo)
ifeq ($(DEFAULT_QT),4)
QTCORE_FLAGS = $(shell pkg-config --cflags QtCore)
QTCORE_LIBS = $(shell pkg-config --libs QtCore)
-QTXML_FLAGS = $(shell pkg-config --cflags QtXml)
-QTXML_LIBS = $(shell pkg-config --libs QtXml)
else
QTCORE_FLAGS = $(shell pkg-config --cflags Qt5Core)
QTCORE_LIBS = $(shell pkg-config --libs Qt5Core)
-QTXML_FLAGS = $(shell pkg-config --cflags Qt5Xml)
-QTXML_LIBS = $(shell pkg-config --libs Qt5Xml)
-endif
-
-ifeq ($(HAVE_CSOUND),true)
-CSOUND_FLAGS = -DUSE_DOUBLE=1
-CSOUND_LIBS = $(shell pkg-config --libs sndfile) -lcsound64
endif
ifeq ($(HAVE_FLUIDSYNTH),true)
diff --git a/source/backend/CarlaBackend.h b/source/backend/CarlaBackend.h
index 02bdd84fa..b8cf7a658 100644
--- a/source/backend/CarlaBackend.h
+++ b/source/backend/CarlaBackend.h
@@ -480,35 +480,19 @@ typedef enum {
PLUGIN_AU = 7,
/*!
- * JACK plugin.
+ * GIG file.
*/
- PLUGIN_JACK = 8,
+ PLUGIN_GIG = 8,
/*!
- * ReWire plugin.
- * @note Windows and MacOS only
+ * SF2 file (SoundFont).
*/
- PLUGIN_REWIRE = 9,
+ PLUGIN_SF2 = 9,
/*!
- * Single CSD file (Csound).
+ * SFZ file.
*/
- PLUGIN_FILE_CSD = 10,
-
- /*!
- * Single GIG file.
- */
- PLUGIN_FILE_GIG = 11,
-
- /*!
- * Single SF2 file (SoundFont).
- */
- PLUGIN_FILE_SF2 = 12,
-
- /*!
- * Single SFZ file.
- */
- PLUGIN_FILE_SFZ = 13
+ PLUGIN_SFZ = 10
} PluginType;
diff --git a/source/backend/CarlaHost.h b/source/backend/CarlaHost.h
index 22d8aa1d0..30c0d3710 100644
--- a/source/backend/CarlaHost.h
+++ b/source/backend/CarlaHost.h
@@ -471,7 +471,7 @@ CARLA_EXPORT void carla_set_file_callback(FileCallbackFunc func, void* ptr);
/*!
* Load a file of any type.\n
* This will try to load a generic file as a plugin,
- * either by direct handling (Csound, GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
+ * either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
* @param Filename Filename
* @see carla_get_supported_file_extensions()
*/
diff --git a/source/backend/CarlaPlugin.hpp b/source/backend/CarlaPlugin.hpp
index e41581794..c80c7e193 100644
--- a/source/backend/CarlaPlugin.hpp
+++ b/source/backend/CarlaPlugin.hpp
@@ -858,15 +858,11 @@ public:
static CarlaPlugin* newVST(const Initializer& init);
static CarlaPlugin* newVST3(const Initializer& init);
static CarlaPlugin* newAU(const Initializer& init);
- static CarlaPlugin* newJACK(const Initializer& init);
- static CarlaPlugin* newReWire(const Initializer& init);
- static CarlaPlugin* newCsound(const Initializer& init);
static CarlaPlugin* newJuce(const Initializer& init, const char* const format);
static CarlaPlugin* newFluidSynth(const Initializer& init, const bool use16Outs);
static CarlaPlugin* newLinuxSampler(const Initializer& init, const char* const format, const bool use16Outs);
- static CarlaPlugin* newFileCSD(const Initializer& init);
static CarlaPlugin* newFileGIG(const Initializer& init, const bool use16Outs);
static CarlaPlugin* newFileSF2(const Initializer& init, const bool use16Outs);
static CarlaPlugin* newFileSFZ(const Initializer& init);
diff --git a/source/backend/CarlaStandalone.cpp b/source/backend/CarlaStandalone.cpp
index 81be13659..b83db9983 100644
--- a/source/backend/CarlaStandalone.cpp
+++ b/source/backend/CarlaStandalone.cpp
@@ -588,11 +588,6 @@ const char* carla_get_complete_license_text()
text2 += "
AU plugin support"; // FIXME
#endif
- // Files
-#ifdef WANT_CSOUND
- text2 += "CSound library for csd support"; // FIXME
-#endif
-
// Sample kit libraries
#ifdef WANT_FLUIDSYNTH
text2 += "FluidSynth library for SF2 support, http://www.fluidsynth.org/";
@@ -662,11 +657,6 @@ const char* carla_get_supported_file_extensions()
// Base types
retText += "*.carxp;*.carxs";
- // CSound
-#ifdef WANT_CSOUND
- retText += ";*.csd";
-#endif
-
// Sample kits
#ifdef WANT_FLUIDSYNTH
retText += ";*.sf2";
diff --git a/source/backend/Makefile b/source/backend/Makefile
index 98a5b85a3..53f0a414c 100644
--- a/source/backend/Makefile
+++ b/source/backend/Makefile
@@ -59,10 +59,6 @@ ifeq ($(CARLA_PLUGIN_SUPPORT),true)
STANDALONE_FLAGS += $(LILV_LIBS)
endif
-ifeq ($(HAVE_CSOUND),true)
-STANDALONE_FLAGS += $(CSOUND_LIBS)
-endif
-
ifeq ($(HAVE_FLUIDSYNTH),true)
STANDALONE_FLAGS += $(FLUIDSYNTH_LIBS)
endif
diff --git a/source/backend/Makefile.mk b/source/backend/Makefile.mk
index d30297275..492b7dc87 100644
--- a/source/backend/Makefile.mk
+++ b/source/backend/Makefile.mk
@@ -35,10 +35,6 @@ endif
# ----------------------------------------------------------------------------------------------------------------------------
-ifeq ($(HAVE_CSOUND),true)
-BUILD_CXX_FLAGS += -DWANT_CSOUND
-endif
-
ifeq ($(HAVE_FLUIDSYNTH),true)
BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH
endif
diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp
index 88fe222db..ac38135ef 100644
--- a/source/backend/engine/CarlaEngine.cpp
+++ b/source/backend/engine/CarlaEngine.cpp
@@ -470,11 +470,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons
break;
case PLUGIN_INTERNAL:
- if (std::strcmp(label, "Csound") == 0)
- {
- plugin = CarlaPlugin::newCsound(initializer);
- }
- else if (std::strcmp(label, "FluidSynth") == 0)
+ if (std::strcmp(label, "FluidSynth") == 0)
{
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0);
plugin = CarlaPlugin::newFluidSynth(initializer, use16Outs);
@@ -524,29 +520,17 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons
plugin = CarlaPlugin::newAU(initializer);
break;
- case PLUGIN_JACK:
- plugin = CarlaPlugin::newJACK(initializer);
- break;
-
- case PLUGIN_REWIRE:
- plugin = CarlaPlugin::newReWire(initializer);
- break;
-
- case PLUGIN_FILE_CSD:
- plugin = CarlaPlugin::newFileCSD(initializer);
- break;
-
- case PLUGIN_FILE_GIG:
+ case PLUGIN_GIG:
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0);
plugin = CarlaPlugin::newFileGIG(initializer, use16Outs);
break;
- case PLUGIN_FILE_SF2:
+ case PLUGIN_SF2:
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0);
plugin = CarlaPlugin::newFileSF2(initializer, use16Outs);
break;
- case PLUGIN_FILE_SFZ:
+ case PLUGIN_SFZ:
plugin = CarlaPlugin::newFileSFZ(initializer);
break;
}
@@ -914,17 +898,14 @@ bool CarlaEngine::loadFile(const char* const filename)
// -------------------------------------------------------------------
- if (extension == "csd")
- return addPlugin(PLUGIN_FILE_CSD, filename, baseName, baseName, 0, nullptr);
-
if (extension == "gig")
- return addPlugin(PLUGIN_FILE_GIG, filename, baseName, baseName, 0, nullptr);
+ return addPlugin(PLUGIN_GIG, filename, baseName, baseName, 0, nullptr);
if (extension == "sf2")
- return addPlugin(PLUGIN_FILE_SF2, filename, baseName, baseName, 0, nullptr);
+ return addPlugin(PLUGIN_SF2, filename, baseName, baseName, 0, nullptr);
if (extension == "sfz")
- return addPlugin(PLUGIN_FILE_SFZ, filename, baseName, baseName, 0, nullptr);
+ return addPlugin(PLUGIN_SFZ, filename, baseName, baseName, 0, nullptr);
// -------------------------------------------------------------------
diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp
index b9955c79e..babc2a320 100644
--- a/source/backend/plugin/CarlaPlugin.cpp
+++ b/source/backend/plugin/CarlaPlugin.cpp
@@ -1316,7 +1316,7 @@ void CarlaPlugin::setProgram(const int32_t index, const bool sendGui, const bool
uiProgramChange(static_cast(index));
#endif
- if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ)
+ if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ)
return;
pData->updateParameterValues(this, sendOsc, sendCallback, true);
@@ -1359,7 +1359,7 @@ void CarlaPlugin::setMidiProgram(const int32_t index, const bool sendGui, const
uiMidiProgramChange(static_cast(index));
#endif
- if (getType() == PLUGIN_FILE_CSD || getType() == PLUGIN_FILE_GIG || getType() == PLUGIN_FILE_SF2 || getType() == PLUGIN_FILE_SFZ)
+ if (getType() == PLUGIN_GIG || getType() == PLUGIN_SF2 || getType() == PLUGIN_SFZ)
return;
pData->updateParameterValues(this, sendOsc, sendCallback, true);
diff --git a/source/backend/plugin/CsoundPlugin.cpp b/source/backend/plugin/CsoundPlugin.cpp
deleted file mode 100644
index 1a807bf79..000000000
--- a/source/backend/plugin/CsoundPlugin.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Carla Csound Plugin
- * Copyright (C) 2013-2014 Filipe Coelho
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * For a full copy of the GNU General Public License see the doc/GPL.txt file.
- */
-
-#include "CarlaPluginInternal.hpp"
-#include "CarlaEngine.hpp"
-
-//#define WANT_CSOUND 1
-#ifdef WANT_CSOUND
-
-//#include "CarlaVstUtils.hpp"
-
-CARLA_BACKEND_START_NAMESPACE
-
-#if 0
-}
-#endif
-
-class CsoundPlugin : public CarlaPlugin
-{
-public:
- CsoundPlugin(CarlaEngine* const engine, const ushort id)
- : CarlaPlugin(engine, id)
- {
- carla_debug("CsoundPlugin::CsoundPlugin(%p, %i)", engine, id);
- }
-
- ~CsoundPlugin() override
- {
- carla_debug("CsoundPlugin::~CsoundPlugin()");
-
- pData->singleMutex.lock();
- pData->masterMutex.lock();
-
- if (pData->client != nullptr && pData->client->isActive())
- pData->client->deactivate();
- }
-
- // -------------------------------------------------------------------
- // Information (base)
-
- PluginType getType() const noexcept override
- {
- return PLUGIN_CSOUND;
- }
-
- void reload() override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,);
- carla_debug("CsoundPlugin::reload() - start");
-
- bufferSizeChanged(pData->engine->getBufferSize());
- reloadPrograms(true);
-
- carla_debug("CsoundPlugin::reload() - end");
- }
-
- void process(float** const inBuffer, float** const outBuffer, const uint32_t frames) override
- {
- }
-
-private:
- CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CsoundPlugin)
-};
-
-CARLA_BACKEND_END_NAMESPACE
-
-#endif
-
-// -----------------------------------------------------------------------
-
-CARLA_BACKEND_START_NAMESPACE
-
-CarlaPlugin* CarlaPlugin::newCsound(const Initializer& init)
-{
- carla_debug("CarlaPlugin::newCsound({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId);
-
-#ifdef WANT_CSOUND
- CsoundPlugin* const plugin(new CsoundPlugin(init.engine, init.id));
-
- //if (! plugin->init(init.filename, init.name, init.label))
- {
- delete plugin;
- return nullptr;
- }
-
- plugin->reload();
-
- if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack())
- {
- init.engine->setLastError("Carla's rack mode can only work with Stereo VST3 plugins, sorry!");
- delete plugin;
- return nullptr;
- }
-
- return plugin;
-#else
- init.engine->setLastError("VST3 support not available");
- return nullptr;
-#endif
-}
-
-CarlaPlugin* CarlaPlugin::newFileCSD(const Initializer& init)
-{
- carla_debug("CarlaPlugin::newFileCSD({%p, \"%s\", \"%s\", \"%s\"})", init.engine, init.filename, init.name, init.label);
- return newCsound(init);
-}
-
-CARLA_BACKEND_END_NAMESPACE
-
-// -----------------------------------------------------------------------
diff --git a/source/backend/plugin/Makefile b/source/backend/plugin/Makefile
index 26245d1ba..61700ba0b 100644
--- a/source/backend/plugin/Makefile
+++ b/source/backend/plugin/Makefile
@@ -21,8 +21,6 @@ OBJS = \
VstPlugin.cpp.o \
Vst3Plugin.cpp.o \
AuPlugin.cpp.o \
- ReWirePlugin.cpp.o \
- CsoundPlugin.cpp.o \
JucePlugin.cpp.o \
FluidSynthPlugin.cpp.o \
LinuxSamplerPlugin.cpp.o
@@ -87,12 +85,6 @@ Vst3Plugin.cpp.o: Vst3Plugin.cpp $(VST3_PLUGIN_CPP_DEPS)
AuPlugin.cpp.o: AuPlugin.cpp $(AU_PLUGIN_CPP_DEPS)
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-ReWirePlugin.cpp.o: ReWirePlugin.cpp $(REWIRE_PLUGIN_CPP_DEPS)
- $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
-
-CsoundPlugin.cpp.o: CsoundPlugin.cpp $(CSOUND_PLUGIN_CPP_DEPS)
- $(CXX) $< $(BUILD_CXX_FLAGS) $(CSOUND_FLAGS) -c -o $@
-
JucePlugin.cpp.o: JucePlugin.cpp $(JUCE_PLUGIN_CPP_DEPS)
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
diff --git a/source/backend/plugin/ReWirePlugin.cpp b/source/backend/plugin/ReWirePlugin.cpp
deleted file mode 100644
index 4d3e2f65e..000000000
--- a/source/backend/plugin/ReWirePlugin.cpp
+++ /dev/null
@@ -1,1114 +0,0 @@
-/*
- * Carla ReWire Plugin
- * Copyright (C) 2014 Filipe Coelho
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * For a full copy of the GNU General Public License see the doc/GPL.txt file.
- */
-
-#include "CarlaPluginInternal.hpp"
-#include "CarlaEngine.hpp"
-
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN64)
-# undef WANT_REWIRE
-#endif
-
-#ifdef WANT_REWIRE
-
-#include "CarlaLibUtils.hpp"
-#include "CarlaMathUtils.hpp"
-
-// -----------------------------------------------------
-
-CARLA_BACKEND_START_NAMESPACE
-
-#if 0
-}
-#endif
-
-// -----------------------------------------------------------------------
-// ReWire assumes sizeof(long) == 4
-
-typedef int32_t rlong;
-typedef uint32_t rulong;
-
-static_assert(sizeof(rlong) == 4, "Incorrect rlong size");
-static_assert(sizeof(rulong) == 4, "Incorrect rulong size");
-
-// rewire is not for linux, so for easy testing+development, we can skip this
-#ifndef CARLA_OS_LINUX
-static_assert(sizeof(long) == 4, "Incorrect long size");
-static_assert(sizeof(ulong) == 4, "Incorrect ulong size");
-static_assert(sizeof(long) == sizeof(rlong), "long size mismatch");
-static_assert(sizeof(ulong) == sizeof(rulong), "ulon size mismatch");
-#endif
-
-struct RwOpenInfo {
- rulong size1; // 16
- rulong size2; // 12
- rlong sampleRate;
- rlong bufferSize;
-};
-
-struct RwDevInfo {
- rulong size; // 8288
- char name[32];
- rlong channelCount; // max limited to 255
- char channelNames[256][32];
- rulong defaultChannels[8];
- rulong stereoPairs[4];
- rulong eventBufferSize;
- rlong version;
-};
-
-struct RwAudioInfo {
- rulong size; // 12
- rlong sampleRate;
- rlong bufferSize;
-};
-
-struct RwBusInfo {
- rulong size; // 40
- rulong channel;
- char name[32];
-};
-
-struct RwEventInfo {
- rulong size; // 132 FIXME?
- rulong bus[32];
-};
-
-struct RwEvent { // 24
- ushort type;
- uchar d1, d2;
- rulong s1, s2, s3, s4, s5;
-};
-
-struct RwEventBuffer {
- rulong size1; // 20
- rulong size2; // 24 (of RwEvent)
- rulong count;
- rulong maxCount;
-#ifndef CARLA_OS_LINUX // pointers on 64bit linux are size 8, skip this
- RwEvent* buf;
-#else
- rulong buf;
-#endif
-};
-
-struct RwAudioInInfo {
- rulong size; // 1116
- RwEventBuffer evBuf;
- rulong channels[8];
-#ifndef CARLA_OS_LINUX // pointers on 64bit linux are size 8, skip this
- float* audioBuf[256];
-#else
- rulong audioBuf[256];
-#endif
- rlong tickStart;
- rulong frames;
- rulong playMode;
- rulong tempo; // bpm
- rulong signNumerator;
- rulong signDenominator;
- rlong loopStartPos;
- rlong loopEndPos;
- rulong loopOn;
-};
-
-struct RwAudioOutInfo {
- rulong size; // 56
- RwEventBuffer evBuf;
- rulong channels[8];
-};
-
-static_assert(sizeof(RwOpenInfo) == 16, "Incorrect ReWire struct size");
-static_assert(sizeof(RwDevInfo) == 8288, "Incorrect ReWire struct size");
-static_assert(sizeof(RwAudioInfo) == 12, "Incorrect ReWire struct size");
-static_assert(sizeof(RwBusInfo) == 40, "Incorrect ReWire struct size");
-static_assert(sizeof(RwEventInfo) == 132, "Incorrect ReWire struct size");
-static_assert(sizeof(RwEvent) == 24, "Incorrect ReWire struct size");
-static_assert(sizeof(RwEventBuffer) == 20, "Incorrect ReWire struct size");
-static_assert(sizeof(RwAudioInInfo) == 1116, "Incorrect ReWire struct size");
-static_assert(sizeof(RwAudioOutInfo) == 56, "Incorrect ReWire struct size");
-
-// -----------------------------------------------------------------------
-
-typedef void (*Fn_RWDEFCloseDevice)();
-typedef void (*Fn_RWDEFDriveAudio)(RwAudioInInfo* in, RwAudioOutInfo* out);
-typedef void (*Fn_RWDEFGetDeviceInfo)(RwDevInfo* info);
-typedef void (*Fn_RWDEFGetDeviceNameAndVersion)(long* version, char* name);
-typedef void (*Fn_RWDEFGetEventBusInfo)(ushort index, RwBusInfo* info);
-typedef void (*Fn_RWDEFGetEventChannelInfo)(void* v1, void* v2);
-typedef void (*Fn_RWDEFGetEventControllerInfo)(void* v1, ushort index, void* v2);
-typedef void (*Fn_RWDEFGetEventInfo)(RwEventInfo* info);
-typedef void (*Fn_RWDEFGetEventNoteInfo)(void* v1, ushort index, void* v2);
-typedef void (*Fn_RWDEFIdle)();
-typedef char (*Fn_RWDEFIsCloseOK)();
-typedef char (*Fn_RWDEFIsPanelAppLaunched)();
-typedef int (*Fn_RWDEFLaunchPanelApp)();
-typedef int (*Fn_RWDEFOpenDevice)(RwOpenInfo* info);
-typedef int (*Fn_RWDEFQuitPanelApp)();
-typedef void (*Fn_RWDEFSetAudioInfo)(RwAudioInfo* info);
-
-// -----------------------------------------------------------------------------
-
-struct RewireBridge {
- void* lib;
-
- Fn_RWDEFCloseDevice RWDEFCloseDevice;
- Fn_RWDEFDriveAudio RWDEFDriveAudio;
- Fn_RWDEFGetDeviceInfo RWDEFGetDeviceInfo;
- Fn_RWDEFGetDeviceNameAndVersion RWDEFGetDeviceNameAndVersion;
- Fn_RWDEFGetEventBusInfo RWDEFGetEventBusInfo;
- Fn_RWDEFGetEventChannelInfo RWDEFGetEventChannelInfo;
- Fn_RWDEFGetEventControllerInfo RWDEFGetEventControllerInfo;
- Fn_RWDEFGetEventInfo RWDEFGetEventInfo;
- Fn_RWDEFGetEventNoteInfo RWDEFGetEventNoteInfo;
- Fn_RWDEFIdle RWDEFIdle;
- Fn_RWDEFIsCloseOK RWDEFIsCloseOK;
- Fn_RWDEFIsPanelAppLaunched RWDEFIsPanelAppLaunched;
- Fn_RWDEFLaunchPanelApp RWDEFLaunchPanelApp;
- Fn_RWDEFOpenDevice RWDEFOpenDevice;
- Fn_RWDEFQuitPanelApp RWDEFQuitPanelApp;
- Fn_RWDEFSetAudioInfo RWDEFSetAudioInfo;
-
- RewireBridge()
- : lib(nullptr),
- RWDEFCloseDevice(nullptr),
- RWDEFDriveAudio(nullptr),
- RWDEFGetDeviceInfo(nullptr),
- RWDEFGetDeviceNameAndVersion(nullptr),
- RWDEFGetEventBusInfo(nullptr),
- RWDEFGetEventChannelInfo(nullptr),
- RWDEFGetEventControllerInfo(nullptr),
- RWDEFGetEventInfo(nullptr),
- RWDEFGetEventNoteInfo(nullptr),
- RWDEFIdle(nullptr),
- RWDEFIsCloseOK(nullptr),
- RWDEFIsPanelAppLaunched(nullptr),
- RWDEFLaunchPanelApp(nullptr),
- RWDEFOpenDevice(nullptr),
- RWDEFQuitPanelApp(nullptr),
- RWDEFSetAudioInfo(nullptr) {}
-
- ~RewireBridge()
- {
- cleanup();
- }
-
- int init(const char* const filename)
- {
- CARLA_SAFE_ASSERT_RETURN(lib == nullptr, -2);
- CARLA_SAFE_ASSERT_RETURN(filename != nullptr && filename[0] != '\0', -2);
-
- lib = lib_open(filename);
-
- if (lib == nullptr)
- return -1;
-
- #define JOIN(a, b) a ## b
- #define LIB_SYMBOL(NAME) NAME = (Fn_##NAME)lib_symbol(lib, #NAME);
- //if (NAME == nullptr) cleanup(); return -2;
-
- LIB_SYMBOL(RWDEFCloseDevice)
- LIB_SYMBOL(RWDEFDriveAudio)
- LIB_SYMBOL(RWDEFGetDeviceInfo)
- LIB_SYMBOL(RWDEFGetDeviceNameAndVersion)
- LIB_SYMBOL(RWDEFGetEventBusInfo)
- LIB_SYMBOL(RWDEFGetEventChannelInfo)
- LIB_SYMBOL(RWDEFGetEventControllerInfo)
- LIB_SYMBOL(RWDEFGetEventInfo)
- LIB_SYMBOL(RWDEFGetEventNoteInfo)
- LIB_SYMBOL(RWDEFIdle)
- LIB_SYMBOL(RWDEFIsCloseOK)
- LIB_SYMBOL(RWDEFIsPanelAppLaunched)
- LIB_SYMBOL(RWDEFLaunchPanelApp)
- LIB_SYMBOL(RWDEFOpenDevice)
- LIB_SYMBOL(RWDEFQuitPanelApp)
- LIB_SYMBOL(RWDEFSetAudioInfo)
-
- #undef JOIN
- #undef LIB_SYMBOL
-
- return 0;
- }
-
- void cleanup()
- {
- if (lib != nullptr)
- {
- lib_close(lib);
- lib = nullptr;
- }
-
- RWDEFCloseDevice = nullptr;
- RWDEFDriveAudio = nullptr;
- RWDEFGetDeviceInfo = nullptr;
- RWDEFGetDeviceNameAndVersion = nullptr;
- RWDEFGetEventBusInfo = nullptr;
- RWDEFGetEventChannelInfo = nullptr;
- RWDEFGetEventControllerInfo = nullptr;
- RWDEFGetEventInfo = nullptr;
- RWDEFGetEventNoteInfo = nullptr;
- RWDEFIdle = nullptr;
- RWDEFIsCloseOK = nullptr;
- RWDEFIsPanelAppLaunched = nullptr;
- RWDEFLaunchPanelApp = nullptr;
- RWDEFOpenDevice = nullptr;
- RWDEFQuitPanelApp = nullptr;
- RWDEFSetAudioInfo = nullptr;
- }
-};
-
-// -----------------------------------------------------
-
-class ReWirePlugin : public CarlaPlugin
-{
-public:
- ReWirePlugin(CarlaEngine* const engine, const uint id)
- : CarlaPlugin(engine, id),
- fIsOpen(false),
- fIsPanelLaunched(false),
- fLabel(nullptr)
- {
- carla_debug("ReWirePlugin::ReWirePlugin(%p, %i)", engine, id);
-
- carla_zeroStruct(fRwAudioIn);
- fRwAudioIn.size = sizeof(RwAudioInInfo);
-
- carla_zeroStruct(fRwAudioOut);
- fRwAudioOut.size = sizeof(RwAudioOutInfo);
- }
-
- ~ReWirePlugin() override
- {
- carla_debug("ReWirePlugin::~ReWirePlugin()");
-
- // close panel
- if (fIsPanelLaunched)
- {
- fRw.RWDEFQuitPanelApp();
- fIsPanelLaunched = false;
- }
-
- pData->singleMutex.lock();
- pData->masterMutex.lock();
-
- if (pData->client != nullptr && pData->client->isActive())
- pData->client->deactivate();
-
- if (pData->active)
- {
- deactivate();
- pData->active = false;
- }
-
- if (fIsOpen)
- {
- for (; fRw.RWDEFIsCloseOK() == 0;)
- carla_msleep(2);
-
- fRw.RWDEFCloseDevice();
- fIsOpen = false;
- }
-
- if (fLabel != nullptr)
- {
- delete[] fLabel;
- fLabel = nullptr;
- }
-
- clearBuffers();
- }
-
- // -------------------------------------------------------------------
- // Information (base)
-
- PluginType getType() const noexcept override
- {
- return PLUGIN_REWIRE;
- }
-
- PluginCategory getCategory() const noexcept override
- {
- return PLUGIN_CATEGORY_SYNTH;
- }
-
- // -------------------------------------------------------------------
- // Information (count)
-
- // nothing
-
- // -------------------------------------------------------------------
- // Information (current data)
-
- int32_t getChunkData(void** const dataPtr) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS, 0);
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr, 0);
- CARLA_SAFE_ASSERT_RETURN(dataPtr != nullptr, 0);
-
- // TODO
-
- return 0;
- }
-
- // -------------------------------------------------------------------
- // Information (per-plugin data)
-
- uint getOptionsAvailable() const noexcept override
- {
- uint options = 0x0;
-
- if (getMidiInCount() > 0)
- {
- options |= PLUGIN_OPTION_SEND_CONTROL_CHANGES;
- options |= PLUGIN_OPTION_SEND_CHANNEL_PRESSURE;
- options |= PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH;
- options |= PLUGIN_OPTION_SEND_PITCHBEND;
- options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF;
- }
-
- return options;
- }
-
- float getParameterValue(const uint32_t parameterId) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, 0.0f);
-
- // TODO
-
- return 0.0f;
- }
-
- void getLabel(char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fLabel != nullptr,)
-
- std::strcpy(strBuf, fLabel);
- }
-
- void getRealName(char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fLabel != nullptr,)
-
- std::strcpy(strBuf, fLabel);
- }
-
- void getParameterName(const uint32_t parameterId, char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
-
- // TODO
- CarlaPlugin::getParameterName(parameterId, strBuf);
- }
-
- void getParameterUnit(const uint32_t parameterId, char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
-
- // TODO
- CarlaPlugin::getParameterUnit(parameterId, strBuf);
- }
-
- // -------------------------------------------------------------------
- // Set data (state)
-
- // nothing
-
- // -------------------------------------------------------------------
- // Set data (internal stuff)
-
- // nothing
-
- // -------------------------------------------------------------------
- // Set data (plugin-specific stuff)
-
- void setParameterValue(const uint32_t parameterId, const float value, const bool sendGui, const bool sendOsc, const bool sendCallback) noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
-
- const float fixedValue(pData->param.getFixedValue(parameterId, value));
-
- // TODO
-
- CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
- }
-
- void setChunkData(const char* const stringData) override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS,);
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(stringData != nullptr,);
-
- // TODO
-
-#ifdef BUILD_BRIDGE
- const bool sendOsc(false);
-#else
- const bool sendOsc(pData->engine->isOscControlRegistered());
-#endif
- pData->updateParameterValues(this, sendOsc, true, false);
- }
-
- // -------------------------------------------------------------------
- // Set ui stuff
-
- void showCustomUI(const bool yesNo) override
- {
- if (yesNo)
- {
- if (! fRw.RWDEFIsPanelAppLaunched())
- fRw.RWDEFLaunchPanelApp();
- fIsPanelLaunched = true;
- }
- else
- {
- if (fRw.RWDEFIsPanelAppLaunched())
- fRw.RWDEFQuitPanelApp();
- fIsPanelLaunched = false;
- }
- }
-
- void idle() override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
-
- fRw.RWDEFIdle();
-
- // check if panel has been closed
- if (fIsPanelLaunched && ! fRw.RWDEFIsPanelAppLaunched())
- {
- // FIXME
- //fIsPanelLaunched = true;
- //pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
-// static int counter = 0;
-//
-// if (counter % 1000)
-// {
-// carla_stdout("Panel is closed?");
-// }
-//
-// ++counter;
- }
-
- CarlaPlugin::idle();
- }
-
- // -------------------------------------------------------------------
- // Plugin state
-
- void reload() override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
- carla_debug("ReWirePlugin::reload() - start");
-
- const EngineProcessMode processMode(pData->engine->getProccessMode());
-
- // Safely disable plugin for reload
- const ScopedDisabler sd(this);
-
- if (pData->active)
- deactivate();
-
- clearBuffers();
-
- uint32_t aIns, aOuts, mIns, mOuts, params;
- aIns = aOuts = 0;
-
- bool needsCtrlIn, needsCtrlOut;
- needsCtrlIn = needsCtrlOut = false;
-
- RwDevInfo devInfo;
- carla_zeroStruct(devInfo);
- devInfo.size = sizeof(RwDevInfo);
-
- fRw.RWDEFGetDeviceInfo(&devInfo);
-
- if (devInfo.channelCount > 0)
- aIns = aOuts = static_cast(devInfo.channelCount);
-
- mIns = mOuts = 0; // TODO, should always be 1
-
- params = 0; // TODO?
-
- if (aIns > 0)
- {
- pData->audioIn.createNew(aIns);
- }
-
- if (aOuts > 0)
- {
- pData->audioOut.createNew(aOuts);
- needsCtrlIn = true;
- }
-
- if (params > 0)
- {
- pData->param.createNew(params, false);
- needsCtrlIn = true;
- }
-
- const uint portNameSize(pData->engine->getMaxPortNameSize());
- CarlaString portName;
-
- // Audio Ins
- for (uint32_t j=0; j < aIns; ++j)
- {
- portName.clear();
-
- if (processMode == ENGINE_PROCESS_MODE_SINGLE_CLIENT)
- {
- portName = pData->name;
- portName += ":";
- }
-
- portName += "i";
- portName += devInfo.channelNames[j];
-
- portName.truncate(portNameSize);
-
- pData->audioIn.ports[j].port = (CarlaEngineAudioPort*)pData->client->addPort(kEnginePortTypeAudio, portName, true);
- pData->audioIn.ports[j].rindex = j;
- }
-
- // Audio Outs
- for (uint32_t j=0; j < aOuts; ++j)
- {
- portName.clear();
-
- if (processMode == ENGINE_PROCESS_MODE_SINGLE_CLIENT)
- {
- portName = pData->name;
- portName += ":";
- }
-
- portName += "o";
- portName += devInfo.channelNames[j];
- portName.truncate(portNameSize);
-
- pData->audioOut.ports[j].port = (CarlaEngineAudioPort*)pData->client->addPort(kEnginePortTypeAudio, portName, false);
- pData->audioOut.ports[j].rindex = j;
- }
-
- if (needsCtrlIn)
- {
- portName.clear();
-
- if (processMode == ENGINE_PROCESS_MODE_SINGLE_CLIENT)
- {
- portName = pData->name;
- portName += ":";
- }
-
- portName += "events-in";
- portName.truncate(portNameSize);
-
- pData->event.portIn = (CarlaEngineEventPort*)pData->client->addPort(kEnginePortTypeEvent, portName, true);
- }
-
- if (needsCtrlOut)
- {
- portName.clear();
-
- if (processMode == ENGINE_PROCESS_MODE_SINGLE_CLIENT)
- {
- portName = pData->name;
- portName += ":";
- }
-
- portName += "events-out";
- portName.truncate(portNameSize);
-
- pData->event.portOut = (CarlaEngineEventPort*)pData->client->addPort(kEnginePortTypeEvent, portName, false);
- }
-
- // plugin hints
- pData->hints = 0x0;
-
- pData->hints |= PLUGIN_IS_SYNTH;
- pData->hints |= PLUGIN_HAS_CUSTOM_UI;
-
- if (aOuts > 0 && (aIns == aOuts || aIns == 1))
- pData->hints |= PLUGIN_CAN_DRYWET;
-
- if (aOuts > 0)
- pData->hints |= PLUGIN_CAN_VOLUME;
-
- if (aOuts >= 2 && aOuts % 2 == 0)
- pData->hints |= PLUGIN_CAN_BALANCE;
-
- // extra plugin hints
- pData->extraHints = 0x0;
-
- if (mIns > 0)
- pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_IN;
-
- if (mOuts > 0)
- pData->extraHints |= PLUGIN_EXTRA_HINT_HAS_MIDI_OUT;
-
- if (aIns <= 2 && aOuts <= 2 && (aIns == aOuts || aIns == 0 || aOuts == 0))
- pData->extraHints |= PLUGIN_EXTRA_HINT_CAN_RUN_RACK;
-
- bufferSizeChanged(pData->engine->getBufferSize());
-
- if (pData->active)
- activate();
-
- carla_debug("ReWirePlugin::reload() - end");
- }
-
- // -------------------------------------------------------------------
- // Plugin processing
-
- void activate() noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
-
- // TODO
- }
-
- void deactivate() noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fRw.lib != nullptr,);
-
- // TODO
- }
-
- void process(float** const inBuffer, float** const outBuffer, const uint32_t frames) override
- {
- // --------------------------------------------------------------------------------------------------------
- // Check if active
-
- if (! pData->active)
- {
- // disable any output sound
- for (uint32_t i=0; i < pData->audioOut.count; ++i)
- FLOAT_CLEAR(outBuffer[i], frames);
- return;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Check if needs reset
-
- if (pData->needsReset)
- {
-#ifndef BUILD_BRIDGE
- if (pData->latency > 0)
- {
- for (uint32_t i=0; i < pData->audioIn.count; ++i)
- FLOAT_CLEAR(pData->latencyBuffers[i], pData->latency);
- }
-#endif
-
- pData->needsReset = false;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Set TimeInfo
-
- const EngineTimeInfo& timeInfo(pData->engine->getTimeInfo());
-
- //fRwAudioIn.playMode; // ???
- //fRwAudioIn.frames = timeInfo.frame; // not sure if buf or tranport frames
-
- if (timeInfo.valid & EngineTimeInfo::kValidBBT)
- {
- double ppqBar = double(timeInfo.bbt.bar - 1) * timeInfo.bbt.beatsPerBar;
- double ppqBeat = double(timeInfo.bbt.beat - 1);
- double ppqTick = double(timeInfo.bbt.tick) / timeInfo.bbt.ticksPerBeat;
-
- // PPQ Pos, ???
- fRwAudioIn.tickStart = static_cast(ppqBar + ppqBeat + ppqTick);
-
- // Tempo
- fRwAudioIn.tempo = static_cast(timeInfo.bbt.beatsPerMinute);
-
- // Bars
- //fTimeInfo.barStartPos = ppqBar;
-
- // Time Signature
- fRwAudioIn.signNumerator = static_cast(timeInfo.bbt.beatsPerBar);
- fRwAudioIn.signDenominator = static_cast(timeInfo.bbt.beatType);
- }
- else
- {
- fRwAudioIn.tickStart = 0;
- fRwAudioIn.tempo = 120;
- fRwAudioIn.signNumerator = 4;
- fRwAudioIn.signDenominator = 4;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Plugin processing (no events)
-
- {
- processSingle(inBuffer, outBuffer, frames, 0);
-
- } // End of Plugin processing (no events)
- }
-
- bool processSingle(float** const inBuffer, float** const outBuffer, const uint32_t frames, const uint32_t timeOffset)
- {
- CARLA_SAFE_ASSERT_RETURN(frames > 0, false);
-
- if (pData->audioIn.count > 0)
- {
- CARLA_SAFE_ASSERT_RETURN(inBuffer != nullptr, false);
- }
- if (pData->audioOut.count > 0)
- {
- CARLA_SAFE_ASSERT_RETURN(outBuffer != nullptr, false);
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Try lock, silence otherwise
-
- if (pData->engine->isOffline())
- {
- pData->singleMutex.lock();
- }
- else if (! pData->singleMutex.tryLock())
- {
- for (uint32_t i=0; i < pData->audioOut.count; ++i)
- {
- for (uint32_t k=0; k < frames; ++k)
- outBuffer[i][k+timeOffset] = 0.0f;
- }
-
- return false;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Set audio buffers
-
- //rulong channels[8];
- fRwAudioIn.frames = frames;
-
-#ifndef CARLA_OS_LINUX
- for (uint32_t i=0; i < pData->audioOut.count; ++i)
- {
- fRwAudioIn.audioBuf[i] = outBuffer[i]+timeOffset;
- FLOAT_COPY(fRwAudioIn.audioBuf[i], inBuffer[i]+timeOffset, frames);
- }
-#endif
-
- // --------------------------------------------------------------------------------------------------------
- // Run plugin
-
- fRw.RWDEFDriveAudio(&fRwAudioIn, &fRwAudioOut);
-
-#ifndef BUILD_BRIDGE
- // --------------------------------------------------------------------------------------------------------
- // Post-processing (dry/wet, volume and balance)
-
- {
- const bool doVolume = (pData->hints & PLUGIN_CAN_VOLUME) != 0 && pData->postProc.volume != 1.0f;
- const bool doDryWet = (pData->hints & PLUGIN_CAN_DRYWET) != 0 && pData->postProc.dryWet != 1.0f;
- const bool doBalance = (pData->hints & PLUGIN_CAN_BALANCE) != 0 && (pData->postProc.balanceLeft != -1.0f || pData->postProc.balanceRight != 1.0f);
-
- bool isPair;
- float bufValue, oldBufLeft[doBalance ? frames : 1];
-
- for (uint32_t i=0; i < pData->audioOut.count; ++i)
- {
- // Dry/Wet
- if (doDryWet)
- {
- for (uint32_t k=0; k < frames; ++k)
- {
- bufValue = inBuffer[(pData->audioIn.count == 1) ? 0 : i][k+timeOffset];
- outBuffer[i][k+timeOffset] = (outBuffer[i][k+timeOffset] * pData->postProc.dryWet) + (bufValue * (1.0f - pData->postProc.dryWet));
- }
- }
-
- // Balance
- if (doBalance)
- {
- isPair = (i % 2 == 0);
-
- if (isPair)
- {
- CARLA_ASSERT(i+1 < pData->audioOut.count);
- FLOAT_COPY(oldBufLeft, outBuffer[i]+timeOffset, frames);
- }
-
- float balRangeL = (pData->postProc.balanceLeft + 1.0f)/2.0f;
- float balRangeR = (pData->postProc.balanceRight + 1.0f)/2.0f;
-
- for (uint32_t k=0; k < frames; ++k)
- {
- if (isPair)
- {
- // left
- outBuffer[i][k+timeOffset] = oldBufLeft[k] * (1.0f - balRangeL);
- outBuffer[i][k+timeOffset] += outBuffer[i+1][k+timeOffset] * (1.0f - balRangeR);
- }
- else
- {
- // right
- outBuffer[i][k+timeOffset] = outBuffer[i][k+timeOffset] * balRangeR;
- outBuffer[i][k+timeOffset] += oldBufLeft[k] * balRangeL;
- }
- }
- }
-
- // Volume
- if (doVolume)
- {
- for (uint32_t k=0; k < frames; ++k)
- outBuffer[i][k+timeOffset] *= pData->postProc.volume;
- }
- }
-
- } // End of Post-processing
-#endif
-
- // --------------------------------------------------------------------------------------------------------
-
- pData->singleMutex.unlock();
- return true;
- }
-
- void bufferSizeChanged(const uint32_t newBufferSize) override
- {
- CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize);
- carla_debug("ReWirePlugin::bufferSizeChanged(%i)", newBufferSize);
-
- if (pData->active)
- deactivate();
-
- RwAudioInfo audioInfo;
- audioInfo.size = sizeof(RwAudioInfo);
- audioInfo.bufferSize = static_cast(newBufferSize);
- audioInfo.sampleRate = static_cast(pData->engine->getSampleRate());
-
- fRw.RWDEFSetAudioInfo(&audioInfo);
-
- if (pData->active)
- activate();
- }
-
- void sampleRateChanged(const double newSampleRate) override
- {
- CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate);
- carla_debug("ReWirePlugin::sampleRateChanged(%g)", newSampleRate);
-
- if (pData->active)
- deactivate();
-
- RwAudioInfo audioInfo;
- audioInfo.size = sizeof(RwAudioInfo);
- audioInfo.bufferSize = static_cast(pData->engine->getBufferSize());
- audioInfo.sampleRate = static_cast(newSampleRate);
-
- fRw.RWDEFSetAudioInfo(&audioInfo);
-
- if (pData->active)
- activate();
- }
-
- // -------------------------------------------------------------------
- // Plugin buffers
-
- // nothing
-
- // -------------------------------------------------------------------
- // Post-poned UI Stuff
-
- // nothing
-
- // -------------------------------------------------------------------
-
-protected:
- // TODO
-
- // -------------------------------------------------------------------
-
-public:
- bool init(const char* const filename, const char* const name)
- {
- CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr, false);
-
- // ---------------------------------------------------------------
- // first checks
-
- if (pData->client != nullptr)
- {
- pData->engine->setLastError("Plugin client is already registered");
- return false;
- }
-
- if (filename == nullptr || filename[0] == '\0')
- {
- pData->engine->setLastError("null filename");
- return false;
- }
-
- // ---------------------------------------------------------------
- // open DLL
-
- int ret = fRw.init(filename);
-
- if (ret != 0)
- {
- if (ret == -1)
- pData->engine->setLastError(lib_error(filename));
- else
- pData->engine->setLastError("Not a valid ReWire application");
- return false;
- }
-
- // ---------------------------------------------------------------
- // get info
-
- long version;
- char nameBuf[STR_MAX+1];
- carla_zeroChar(nameBuf, STR_MAX+1);
- fRw.RWDEFGetDeviceNameAndVersion(&version, nameBuf);
-
- if (nameBuf[0] == '\0')
- {
- pData->engine->setLastError("ReWire application has no name");
- return false;
- }
-
- fLabel = carla_strdup(nameBuf);
-
- if (name != nullptr && name[0] != '\0')
- pData->name = pData->engine->getUniquePluginName(name);
- else
- pData->name = pData->engine->getUniquePluginName(nameBuf);
-
- pData->filename = carla_strdup(filename);
-
- // ---------------------------------------------------------------
- // register client
-
- pData->client = pData->engine->addClient(this);
-
- if (pData->client == nullptr || ! pData->client->isOk())
- {
- pData->engine->setLastError("Failed to register plugin client");
- return false;
- }
-
- // ---------------------------------------------------------------
- // initialize app
-
- RwOpenInfo info;
- info.size1 = sizeof(RwOpenInfo);
- info.size2 = 12;
- info.bufferSize = static_cast(pData->engine->getBufferSize());
- info.sampleRate = static_cast(pData->engine->getSampleRate());
-
- ret = fRw.RWDEFOpenDevice(&info);
-
- carla_stdout("RW open ret = %i", ret);
-
- // TODO check ret
- fIsOpen = true;
-
- // ---------------------------------------------------------------
- // load plugin settings
-
- {
- // set default options
- pData->options = 0x0;
-
- pData->options |= PLUGIN_OPTION_FIXED_BUFFERS;
- pData->options |= PLUGIN_OPTION_USE_CHUNKS;
-
- // TODO
- if (getMidiInCount() > 0)
- {
- pData->options |= PLUGIN_OPTION_SEND_CHANNEL_PRESSURE;
- pData->options |= PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH;
- pData->options |= PLUGIN_OPTION_SEND_PITCHBEND;
- pData->options |= PLUGIN_OPTION_SEND_ALL_SOUND_OFF;
- }
-
-#ifndef BUILD_BRIDGE
- // set identifier string
- CarlaString identifier("ReWire/");
- identifier += fLabel;
- pData->identifier = identifier.dup();
-
- // load settings
- pData->options = pData->loadSettings(pData->options, getOptionsAvailable());
-
- // ignore settings, we need this anyway
- pData->options |= PLUGIN_OPTION_FIXED_BUFFERS;
- pData->options |= PLUGIN_OPTION_USE_CHUNKS;
-#endif
- }
-
- return true;
- }
-
-private:
- RewireBridge fRw;
- RwAudioInInfo fRwAudioIn;
- RwAudioOutInfo fRwAudioOut;
-
- bool fIsOpen;
- bool fIsPanelLaunched;
- const char* fLabel;
-
- CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(ReWirePlugin)
-};
-
-CARLA_BACKEND_END_NAMESPACE
-
-#endif // WANT_REWIRE
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CARLA_BACKEND_START_NAMESPACE
-
-CarlaPlugin* CarlaPlugin::newReWire(const Initializer& init)
-{
- carla_debug("CarlaPlugin::newReWire({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);
-
-#ifdef WANT_REWIRE
- ReWirePlugin* const plugin(new ReWirePlugin(init.engine, init.id));
-
- if (! plugin->init(init.filename, init.name))
- {
- delete plugin;
- return nullptr;
- }
-
- plugin->reload();
-
- if (init.engine->getProccessMode() == ENGINE_PROCESS_MODE_CONTINUOUS_RACK && ! plugin->canRunInRack())
- {
- init.engine->setLastError("Carla's rack mode can only work with Stereo ReWire applications, sorry!");
- delete plugin;
- return nullptr;
- }
-
- return plugin;
-#else
- init.engine->setLastError("ReWire support not available");
- return nullptr;
-#endif
-}
-
-CARLA_BACKEND_END_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
diff --git a/source/bridges/Makefile b/source/bridges/Makefile
index b97f05cf2..77dc367f5 100644
--- a/source/bridges/Makefile
+++ b/source/bridges/Makefile
@@ -25,7 +25,7 @@ LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS)
ifeq ($(CARLA_PLUGIN_SUPPORT),true)
-BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_REWIRE
+BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -DWANT_AU
endif
@@ -79,12 +79,6 @@ ifeq ($(HAVE_DGL),true)
NATIVE_LINK_FLAGS += $(DGL_LIBS)
endif
-# ifeq ($(HAVE_CSOUND),true)
-# NATIVE_BUILD_FLAGS += -DWANT_CSOUND
-# NATIVE_BUILD_FLAGS += $(CSOUND_FLAGS)
-# NATIVE_LINK_FLAGS += $(CSOUND_LIBS)
-# endif
-
ifeq ($(HAVE_FLUIDSYNTH),true)
NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
@@ -417,8 +411,6 @@ OBJS_PLUGIN = \
../backend/plugin/VstPlugin__native.o \
../backend/plugin/Vst3Plugin__native.o \
../backend/plugin/AuPlugin__native.o \
- ../backend/plugin/ReWirePlugin__native.o \
- ../backend/plugin/CsoundPlugin__native.o \
../backend/plugin/JucePlugin__native.o \
../backend/plugin/FluidSynthPlugin__native.o \
../backend/plugin/LinuxSamplerPlugin__native.o \
@@ -485,8 +477,6 @@ OBJS_NATIVE += \
../backend/plugin/VstPlugin__native.o \
../backend/plugin/Vst3Plugin__native.o \
../backend/plugin/AuPlugin__native.o \
- ../backend/plugin/ReWirePlugin__native.o \
- ../backend/plugin/CsoundPlugin__native.o \
../backend/plugin/JucePlugin__native.o \
../backend/plugin/FluidSynthPlugin__native.o \
../backend/plugin/LinuxSamplerPlugin__native.o
@@ -563,8 +553,6 @@ OBJS_POSIX32 += \
../backend/plugin/VstPlugin__posix32.o \
../backend/plugin/Vst3Plugin__posix32.o \
../backend/plugin/AuPlugin__posix32.o \
- ../backend/plugin/ReWirePlugin__posix32.o \
- ../backend/plugin/CsoundPlugin__posix32.o \
../backend/plugin/JucePlugin__posix32.o \
../backend/plugin/FluidSynthPlugin__posix32.o \
../backend/plugin/LinuxSamplerPlugin__posix32.o
@@ -623,8 +611,6 @@ OBJS_POSIX64 += \
../backend/plugin/VstPlugin__posix64.o \
../backend/plugin/Vst3Plugin__posix64.o \
../backend/plugin/AuPlugin__posix32.o \
- ../backend/plugin/ReWirePlugin__posix64.o \
- ../backend/plugin/CsoundPlugin__posix64.o \
../backend/plugin/JucePlugin__posix64.o \
../backend/plugin/FluidSynthPlugin__posix64.o \
../backend/plugin/LinuxSamplerPlugin__posix64.o
@@ -683,8 +669,6 @@ OBJS_WIN32 += \
../backend/plugin/VstPlugin__win32.o \
../backend/plugin/Vst3Plugin__win32.o \
../backend/plugin/AuPlugin__win32.o \
- ../backend/plugin/ReWirePlugin__win32.o \
- ../backend/plugin/CsoundPlugin__win32.o \
../backend/plugin/JucePlugin__win32.o \
../backend/plugin/FluidSynthPlugin__win32.o \
../backend/plugin/LinuxSamplerPlugin__win32.o
@@ -743,8 +727,6 @@ OBJS_WIN64 += \
../backend/plugin/VstPlugin__win64.o \
../backend/plugin/Vst3Plugin__win64.o \
../backend/plugin/AuPlugin__win64.o \
- ../backend/plugin/ReWirePlugin__win64.o \
- ../backend/plugin/CsoundPlugin__win64.o \
../backend/plugin/JucePlugin__win64.o \
../backend/plugin/FluidSynthPlugin__win64.o \
../backend/plugin/LinuxSamplerPlugin__win64.o
diff --git a/source/carla_backend.py b/source/carla_backend.py
index 24dc2e2b8..e69461191 100644
--- a/source/carla_backend.py
+++ b/source/carla_backend.py
@@ -382,24 +382,14 @@ PLUGIN_VST3 = 6
# @note MacOS only
PLUGIN_AU = 7
-# JACK plugin.
-PLUGIN_JACK = 8
+# GIG file.
+PLUGIN_GIG = 8
-# ReWire plugin.
-# @note Windows and MacOS only
-PLUGIN_REWIRE = 9
+# SF2 file (SoundFont).
+PLUGIN_SF2 = 9
-# Single CSD file (Csound).
-PLUGIN_FILE_CSD = 10
-
-# Single GIG file.
-PLUGIN_FILE_GIG = 11
-
-# Single SF2 file (SoundFont).
-PLUGIN_FILE_SF2 = 12
-
-# Single SFZ file.
-PLUGIN_FILE_SFZ = 13
+# SFZ file.
+PLUGIN_SFZ = 10
# ------------------------------------------------------------------------------------------------------------
# Plugin Category
@@ -1316,7 +1306,7 @@ class Host(object):
# Load a file of any type.\n
# This will try to load a generic file as a plugin,
- # either by direct handling (Csound, GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
+ # either by direct handling (GIG, SF2 and SFZ) or by using an internal plugin (like Audio and MIDI).
# @param Filename Filename
# @see carla_get_supported_file_extensions()
def load_file(self, filename):
diff --git a/source/carla_database.py b/source/carla_database.py
index 154afa9da..03591e61d 100755
--- a/source/carla_database.py
+++ b/source/carla_database.py
@@ -114,9 +114,7 @@ def findMacVSTBundles(bundlePath, isVST3):
def findFilenames(filePath, stype):
filenames = []
- if stype == "csd":
- extensions = (".csd",)
- elif stype == "gig":
+ if stype == "gig":
extensions = (".gig",)
elif stype == "sf2":
extensions = (".sf2",)
@@ -321,17 +319,14 @@ def checkPluginVST3(filename, tool, isWine=False):
def checkPluginAU(filename, tool):
return runCarlaDiscovery(PLUGIN_AU, "AU", filename, tool)
-def checkFileCSD(filename, tool):
- return runCarlaDiscovery(PLUGIN_FILE_CSD, "CSD", filename, tool)
-
def checkFileGIG(filename, tool):
- return runCarlaDiscovery(PLUGIN_FILE_GIG, "GIG", filename, tool)
+ return runCarlaDiscovery(PLUGIN_GIG, "GIG", filename, tool)
def checkFileSF2(filename, tool):
- return runCarlaDiscovery(PLUGIN_FILE_SF2, "SF2", filename, tool)
+ return runCarlaDiscovery(PLUGIN_SF2, "SF2", filename, tool)
def checkFileSFZ(filename, tool):
- return runCarlaDiscovery(PLUGIN_FILE_SFZ, "SFZ", filename, tool)
+ return runCarlaDiscovery(PLUGIN_SFZ, "SFZ", filename, tool)
# ------------------------------------------------------------------------------------------------------------
# Separate Thread for Plugin Search
@@ -356,7 +351,6 @@ class SearchPluginsThread(QThread):
self.fCheckVST = False
self.fCheckVST3 = False
self.fCheckAU = False
- self.fCheckCSD = False
self.fCheckGIG = False
self.fCheckSF2 = False
self.fCheckSFZ = False
@@ -382,7 +376,6 @@ class SearchPluginsThread(QThread):
self.fVstPlugins = []
self.fVst3Plugins = []
self.fAuPlugins = []
- self.fCsdFiles = []
self.fKitPlugins = []
# -------------------------------------------------------------
@@ -397,14 +390,13 @@ class SearchPluginsThread(QThread):
self.fCheckWin32 = win32
self.fCheckWin64 = win64
- def setSearchPluginTypes(self, ladspa, dssi, lv2, vst, vst3, au, csd, gig, sf2, sfz):
+ def setSearchPluginTypes(self, ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz):
self.fCheckLADSPA = ladspa
self.fCheckDSSI = dssi
self.fCheckLV2 = lv2
self.fCheckVST = vst
self.fCheckVST3 = vst3
self.fCheckAU = au and MACOS
- self.fCheckCSD = csd
self.fCheckGIG = gig
self.fCheckSF2 = sf2
self.fCheckSFZ = sfz
@@ -449,12 +441,10 @@ class SearchPluginsThread(QThread):
self.fCurCount -= 1
if self.fCheckNative and self.fToolNative:
- if self.fCheckCSD: self.fCurCount += 1
if self.fCheckGIG: self.fCurCount += 1
if self.fCheckSF2: self.fCurCount += 1
if self.fCheckSFZ: self.fCurCount += 1
else:
- self.fCheckCSD = False
self.fCheckGIG = False
self.fCheckSF2 = False
self.fCheckSFZ = False
@@ -690,12 +680,6 @@ class SearchPluginsThread(QThread):
if not self.fContinueChecking: return
- if self.fCheckCSD:
- self._checkCSD()
- settingsDB.setValue("Plugins/CSD", self.fCsdFiles)
-
- if not self.fContinueChecking: return
-
if self.fCheckGIG:
settings = QSettings()
GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH))
@@ -937,37 +921,6 @@ class SearchPluginsThread(QThread):
self.fLastCheckValue += self.fCurPercentValue
- def _checkCSD(self):
- csdFiles = []
- self.fCsdFiles = []
-
- settings = QSettings()
- CSOUND_PATH = toList(settings.value(CARLA_KEY_PATHS_CSD, gCarla.DEFAULT_CSOUND_PATH))
-
- for iPATH in CSOUND_PATH:
- files = findFilenames(iPATH, "csd")
- for file_ in files:
- if file_ not in csdFiles:
- csdFiles.append(file_)
-
- csdFiles.sort()
-
- if not self.fContinueChecking: return
-
- for i in range(len(csdFiles)):
- csd = csdFiles[i]
- percent = ( float(i) / len(csdFiles) ) * self.fCurPercentValue
- self._pluginLook(self.fLastCheckValue + percent, csd)
-
- plugins = checkFileCSD(csd, self.fToolNative)
- if plugins:
- self.fCsdFiles.append(plugins)
- self.fSomethingChanged = True
-
- if not self.fContinueChecking: break
-
- self.fLastCheckValue += self.fCurPercentValue
-
def _checkKIT(self, kitPATH, kitExtension):
kitFiles = []
self.fKitPlugins = []
@@ -1118,8 +1071,6 @@ class PluginRefreshW(QDialog):
self.ui.ico_native.setPixmap(self.fIconNo)
self.ui.ch_native.setChecked(False)
self.ui.ch_native.setEnabled(False)
- self.ui.ch_csound.setChecked(False)
- self.ui.ch_csound.setEnabled(False)
self.ui.ch_gig.setChecked(False)
self.ui.ch_gig.setEnabled(False)
self.ui.ch_sf2.setChecked(False)
@@ -1145,11 +1096,6 @@ class PluginRefreshW(QDialog):
self.ui.ch_au.setEnabled(False)
self.ui.ch_au.setVisible(False)
- # TODO
- self.ui.ch_csound.setChecked(False)
- self.ui.ch_csound.setEnabled(False)
- self.ui.ch_csound.setVisible(False)
-
# -------------------------------------------------------------
# Set-up connections
@@ -1166,7 +1112,6 @@ class PluginRefreshW(QDialog):
self.ui.ch_vst.clicked.connect(self.slot_checkTools)
self.ui.ch_vst3.clicked.connect(self.slot_checkTools)
self.ui.ch_au.clicked.connect(self.slot_checkTools)
- self.ui.ch_csound.clicked.connect(self.slot_checkTools)
self.ui.ch_gig.clicked.connect(self.slot_checkTools)
self.ui.ch_sf2.clicked.connect(self.slot_checkTools)
self.ui.ch_sfz.clicked.connect(self.slot_checkTools)
@@ -1196,14 +1141,13 @@ class PluginRefreshW(QDialog):
self.ui.ch_posix32.isChecked(), self.ui.ch_posix64.isChecked(),
self.ui.ch_win32.isChecked(), self.ui.ch_win64.isChecked())
- ladspa, dssi, lv2, vst, vst3, au, csound, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(),
- self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(),
- self.ui.ch_vst3.isChecked(), self.ui.ch_au.isChecked(),
- self.ui.ch_csound.isChecked(), self.ui.ch_gig.isChecked(),
- self.ui.ch_sf2.isChecked(), self.ui.ch_sfz.isChecked())
+ ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz = (self.ui.ch_ladspa.isChecked(), self.ui.ch_dssi.isChecked(),
+ self.ui.ch_lv2.isChecked(), self.ui.ch_vst.isChecked(),
+ self.ui.ch_vst3.isChecked(), self.ui.ch_au.isChecked(),
+ self.ui.ch_gig.isChecked(), self.ui.ch_sf2.isChecked(), self.ui.ch_sfz.isChecked())
self.fThread.setSearchBinaryTypes(native, posix32, posix64, win32, win64)
- self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, vst3, au, csound, gig, sf2, sfz)
+ self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, vst3, au, gig, sf2, sfz)
self.fThread.start()
@pyqtSlot()
@@ -1214,7 +1158,7 @@ class PluginRefreshW(QDialog):
def slot_checkTools(self):
enabled1 = bool(self.ui.ch_native.isChecked() or self.ui.ch_posix32.isChecked() or self.ui.ch_posix64.isChecked() or self.ui.ch_win32.isChecked() or self.ui.ch_win64.isChecked())
enabled2 = bool(self.ui.ch_ladspa.isChecked() or self.ui.ch_dssi.isChecked() or self.ui.ch_lv2.isChecked() or self.ui.ch_vst.isChecked() or self.ui.ch_vst3.isChecked() or
- self.ui.ch_au.isChecked() or self.ui.ch_csound.isChecked() or self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked())
+ self.ui.ch_au.isChecked() or self.ui.ch_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked())
self.ui.b_start.setEnabled(enabled1 and enabled2)
@pyqtSlot(int, str)
@@ -1242,7 +1186,6 @@ class PluginRefreshW(QDialog):
self.ui.ch_vst.setChecked(settings.value("PluginDatabase/SearchVST", True, type=bool))
self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/SearchVST3", (MACOS or WINDOWS), type=bool))
self.ui.ch_au.setChecked(settings.value("PluginDatabase/SearchAU", True, type=bool))
- self.ui.ch_csound.setChecked(settings.value("PluginDatabase/SearchCsound", False, type=bool))
self.ui.ch_gig.setChecked(settings.value("PluginDatabase/SearchGIG", False, type=bool))
self.ui.ch_sf2.setChecked(settings.value("PluginDatabase/SearchSF2", False, type=bool))
self.ui.ch_sfz.setChecked(settings.value("PluginDatabase/SearchSFZ", False, type=bool))
@@ -1261,7 +1204,6 @@ class PluginRefreshW(QDialog):
settings.setValue("PluginDatabase/SearchVST", self.ui.ch_vst.isChecked())
settings.setValue("PluginDatabase/SearchVST3", self.ui.ch_vst3.isChecked())
settings.setValue("PluginDatabase/SearchAU", self.ui.ch_au.isChecked())
- settings.setValue("PluginDatabase/SearchCsound", self.ui.ch_csound.isChecked())
settings.setValue("PluginDatabase/SearchGIG", self.ui.ch_gig.isChecked())
settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked())
settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked())
@@ -1348,7 +1290,6 @@ class PluginDatabaseW(QDialog):
self.ui.ch_vst.clicked.connect(self.slot_checkFilters)
self.ui.ch_vst3.clicked.connect(self.slot_checkFilters)
self.ui.ch_au.clicked.connect(self.slot_checkFilters)
- self.ui.ch_csound.clicked.connect(self.slot_checkFilters)
self.ui.ch_kits.clicked.connect(self.slot_checkFilters)
self.ui.ch_native.clicked.connect(self.slot_checkFilters)
self.ui.ch_bridged.clicked.connect(self.slot_checkFilters)
@@ -1402,7 +1343,6 @@ class PluginDatabaseW(QDialog):
hideVST = not self.ui.ch_vst.isChecked()
hideVST3 = not self.ui.ch_vst3.isChecked()
hideAU = not self.ui.ch_au.isChecked()
- hideCsound = not self.ui.ch_csound.isChecked()
hideKits = not self.ui.ch_kits.isChecked()
hideNative = not self.ui.ch_native.isChecked()
@@ -1471,8 +1411,6 @@ class PluginDatabaseW(QDialog):
self.ui.tableWidget.hideRow(i)
elif hideAU and ptype == "AU":
self.ui.tableWidget.hideRow(i)
- elif hideCsound and ptype == "CSD":
- self.ui.tableWidget.hideRow(i)
elif hideNative and isNative:
self.ui.tableWidget.hideRow(i)
elif hideBridged and isBridged:
@@ -1562,7 +1500,6 @@ class PluginDatabaseW(QDialog):
vstCount = 0
vst3Count = 0
auCount = 0
- csdCount = 0
kitCount = 0
# ---------------------------------------------------------------------------
@@ -1695,18 +1632,6 @@ class PluginDatabaseW(QDialog):
del auPlugins
- # ---------------------------------------------------------------------------
- # Csound
-
- #csds = toList(settingsDB.value("Plugins/CSD", []))
-
- #for csd in csds:
- #for csd_i in csd:
- #self._addPluginToTable(csd_i, "CSD")
- #csdCount += 1
-
- #del csds
-
# ---------------------------------------------------------------------------
# Kits
@@ -1752,7 +1677,6 @@ class PluginDatabaseW(QDialog):
else:
self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST and %i VST3 plugins, plus %i Sound Kits" % (
internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, kitCount)))
- # %i Csound modules and
self._checkFilters()
@@ -1771,7 +1695,6 @@ class PluginDatabaseW(QDialog):
self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST", True, type=bool))
self.ui.ch_vst3.setChecked(settings.value("PluginDatabase/ShowVST3", (MACOS or WINDOWS), type=bool))
self.ui.ch_au.setChecked(settings.value("PluginDatabase/ShowAU", True, type=bool))
- self.ui.ch_csound.setChecked(settings.value("PluginDatabase/ShowCsound", True, type=bool))
self.ui.ch_kits.setChecked(settings.value("PluginDatabase/ShowKits", True, type=bool))
self.ui.ch_native.setChecked(settings.value("PluginDatabase/ShowNative", True, type=bool))
self.ui.ch_bridged.setChecked(settings.value("PluginDatabase/ShowBridged", True, type=bool))
@@ -1799,7 +1722,6 @@ class PluginDatabaseW(QDialog):
settings.setValue("PluginDatabase/ShowVST", self.ui.ch_vst.isChecked())
settings.setValue("PluginDatabase/ShowVST3", self.ui.ch_vst3.isChecked())
settings.setValue("PluginDatabase/ShowAU", self.ui.ch_au.isChecked())
- settings.setValue("PluginDatabase/ShowCsound", self.ui.ch_csound.isChecked())
settings.setValue("PluginDatabase/ShowKits", self.ui.ch_kits.isChecked())
settings.setValue("PluginDatabase/ShowNative", self.ui.ch_native.isChecked())
settings.setValue("PluginDatabase/ShowBridged", self.ui.ch_bridged.isChecked())
diff --git a/source/carla_host.py b/source/carla_host.py
index 60302fe36..c672c3a5b 100644
--- a/source/carla_host.py
+++ b/source/carla_host.py
@@ -705,7 +705,6 @@ class HostWindow(QMainWindow):
LV2_PATH = toList(settings.value("Paths/LV2", gCarla.DEFAULT_LV2_PATH))
VST_PATH = toList(settings.value("Paths/VST", gCarla.DEFAULT_VST_PATH))
AU_PATH = toList(settings.value("Paths/AU", gCarla.DEFAULT_AU_PATH))
- CSOUND_PATH = toList(settings.value("Paths/CSOUND", gCarla.DEFAULT_CSOUND_PATH))
GIG_PATH = toList(settings.value("Paths/GIG", gCarla.DEFAULT_GIG_PATH))
SF2_PATH = toList(settings.value("Paths/SF2", gCarla.DEFAULT_SF2_PATH))
SFZ_PATH = toList(settings.value("Paths/SFZ", gCarla.DEFAULT_SFZ_PATH))
@@ -715,7 +714,6 @@ class HostWindow(QMainWindow):
os.environ["LV2_PATH"] = splitter.join(LV2_PATH)
os.environ["VST_PATH"] = splitter.join(VST_PATH)
os.environ["AU_PATH"] = splitter.join(AU_PATH)
- os.environ["CSOUND_PATH"] = splitter.join(CSOUND_PATH)
os.environ["GIG_PATH"] = splitter.join(GIG_PATH)
os.environ["SF2_PATH"] = splitter.join(SF2_PATH)
os.environ["SFZ_PATH"] = splitter.join(SFZ_PATH)
diff --git a/source/carla_settings.py b/source/carla_settings.py
index 7463b5590..251ef0384 100755
--- a/source/carla_settings.py
+++ b/source/carla_settings.py
@@ -237,10 +237,9 @@ class CarlaSettingsW(QDialog):
PATH_INDEX_VST = 3
PATH_INDEX_VST3 = 4
PATH_INDEX_AU = 5
- PATH_INDEX_CSOUND = 6
- PATH_INDEX_GIG = 7
- PATH_INDEX_SF2 = 8
- PATH_INDEX_SFZ = 9
+ PATH_INDEX_GIG = 6
+ PATH_INDEX_SF2 = 7
+ PATH_INDEX_SFZ = 8
# Single and Multiple client mode is only for JACK,
# but we still want to match QComboBox index to defines,
@@ -312,7 +311,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_vst3.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_au.currentRowChanged.connect(self.slot_pluginPathRowChanged)
- self.ui.lw_csound.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_gig.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_sf2.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_sfz.currentRowChanged.connect(self.slot_pluginPathRowChanged)
@@ -326,7 +324,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_vst.setCurrentRow(0)
self.ui.lw_vst3.setCurrentRow(0)
self.ui.lw_au.setCurrentRow(0)
- self.ui.lw_csound.setCurrentRow(0)
self.ui.lw_gig.setCurrentRow(0)
self.ui.lw_sf2.setCurrentRow(0)
self.ui.lw_sfz.setCurrentRow(0)
@@ -394,7 +391,6 @@ class CarlaSettingsW(QDialog):
vsts = toList(settings.value(CARLA_KEY_PATHS_VST, gCarla.DEFAULT_VST_PATH))
vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, gCarla.DEFAULT_VST3_PATH))
aus = toList(settings.value(CARLA_KEY_PATHS_AU, gCarla.DEFAULT_AU_PATH))
- csds = toList(settings.value(CARLA_KEY_PATHS_CSD, gCarla.DEFAULT_CSOUND_PATH))
gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, gCarla.DEFAULT_GIG_PATH))
sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, gCarla.DEFAULT_SF2_PATH))
sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, gCarla.DEFAULT_SFZ_PATH))
@@ -405,7 +401,6 @@ class CarlaSettingsW(QDialog):
vsts.sort()
vst3s.sort()
aus.sort()
- csds.sort()
gigs.sort()
sf2s.sort()
sfzs.sort()
@@ -434,10 +429,6 @@ class CarlaSettingsW(QDialog):
if not au: continue
self.ui.lw_au.addItem(au)
- for csd in csds:
- if not csd: continue
- self.ui.lw_csound.addItem(csd)
-
for gig in gigs:
if not gig: continue
self.ui.lw_gig.addItem(gig)
@@ -499,7 +490,6 @@ class CarlaSettingsW(QDialog):
vsts = []
vst3s = []
aus = []
- csds = []
gigs = []
sf2s = []
sfzs = []
@@ -522,9 +512,6 @@ class CarlaSettingsW(QDialog):
for i in range(self.ui.lw_au.count()):
aus.append(self.ui.lw_au.item(i).text())
- for i in range(self.ui.lw_csound.count()):
- csds.append(self.ui.lw_csound.item(i).text())
-
for i in range(self.ui.lw_gig.count()):
gigs.append(self.ui.lw_gig.item(i).text())
@@ -540,7 +527,6 @@ class CarlaSettingsW(QDialog):
settings.setValue(CARLA_KEY_PATHS_VST, vsts)
settings.setValue(CARLA_KEY_PATHS_VST3, vst3s)
settings.setValue(CARLA_KEY_PATHS_AU, aus)
- settings.setValue(CARLA_KEY_PATHS_CSD, csds)
settings.setValue(CARLA_KEY_PATHS_GIG, gigs)
settings.setValue(CARLA_KEY_PATHS_SF2, sf2s)
settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs)
@@ -636,15 +622,6 @@ class CarlaSettingsW(QDialog):
if not path: continue
self.ui.lw_au.addItem(path)
- elif curIndex == self.PATH_INDEX_CSOUND:
- paths = DEFAULT_CSOUND_PATH.split(splitter)
- paths.sort()
- self.ui.lw_csound.clear()
-
- for path in paths:
- if not path: continue
- self.ui.lw_csound.addItem(path)
-
elif curIndex == self.PATH_INDEX_GIG:
paths = DEFAULT_GIG_PATH.split(splitter)
paths.sort()
@@ -712,8 +689,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_vst3.addItem(newPath)
elif curIndex == self.PATH_INDEX_AU:
self.ui.lw_au.addItem(newPath)
- elif curIndex == self.PATH_INDEX_CSOUND:
- self.ui.lw_csound.addItem(newPath)
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.addItem(newPath)
elif curIndex == self.PATH_INDEX_SF2:
@@ -737,8 +712,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow())
elif curIndex == self.PATH_INDEX_AU:
self.ui.lw_au.takeItem(self.ui.lw_au.currentRow())
- elif curIndex == self.PATH_INDEX_CSOUND:
- self.ui.lw_csound.takeItem(self.ui.lw_csound.currentRow())
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow())
elif curIndex == self.PATH_INDEX_SF2:
@@ -762,8 +735,6 @@ class CarlaSettingsW(QDialog):
currentPath = self.ui.lw_vst3.currentItem().text()
elif curIndex == self.PATH_INDEX_AU:
currentPath = self.ui.lw_au.currentItem().text()
- elif curIndex == self.PATH_INDEX_CSOUND:
- currentPath = self.ui.lw_csound.currentItem().text()
elif curIndex == self.PATH_INDEX_GIG:
currentPath = self.ui.lw_gig.currentItem().text()
elif curIndex == self.PATH_INDEX_SF2:
@@ -790,8 +761,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_vst3.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_AU:
self.ui.lw_au.currentItem().setText(newPath)
- elif curIndex == self.PATH_INDEX_CSOUND:
- self.ui.lw_csound.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_SF2:
@@ -816,8 +785,6 @@ class CarlaSettingsW(QDialog):
row = self.ui.lw_vst3.currentRow()
elif index == self.PATH_INDEX_AU:
row = self.ui.lw_au.currentRow()
- elif index == self.PATH_INDEX_CSOUND:
- row = self.ui.lw_csound.currentRow()
elif index == self.PATH_INDEX_GIG:
row = self.ui.lw_gig.currentRow()
elif index == self.PATH_INDEX_SF2:
diff --git a/source/carla_shared.py b/source/carla_shared.py
index e3272ec8a..d15a88dcd 100644
--- a/source/carla_shared.py
+++ b/source/carla_shared.py
@@ -217,7 +217,6 @@ CARLA_KEY_PATHS_LV2 = "Paths/LV2"
CARLA_KEY_PATHS_VST = "Paths/VST"
CARLA_KEY_PATHS_VST3 = "Paths/VST3"
CARLA_KEY_PATHS_AU = "Paths/AU"
-CARLA_KEY_PATHS_CSD = "Paths/CSD"
CARLA_KEY_PATHS_GIG = "Paths/GIG"
CARLA_KEY_PATHS_SF2 = "Paths/SF2"
CARLA_KEY_PATHS_SFZ = "Paths/SFZ"
@@ -260,7 +259,6 @@ class CarlaObject(object):
'DEFAULT_VST_PATH',
'DEFAULT_VST3_PATH',
'DEFAULT_AU_PATH',
- 'DEFAULT_CSOUND_PATH',
'DEFAULT_GIG_PATH',
'DEFAULT_SF2_PATH',
'DEFAULT_SFZ_PATH'
@@ -290,7 +288,6 @@ DEFAULT_LV2_PATH = ""
DEFAULT_VST_PATH = ""
DEFAULT_VST3_PATH = ""
DEFAULT_AU_PATH = ""
-DEFAULT_CSOUND_PATH = ""
DEFAULT_GIG_PATH = ""
DEFAULT_SF2_PATH = ""
DEFAULT_SFZ_PATH = ""
@@ -456,7 +453,6 @@ if readEnvVars:
gCarla.DEFAULT_VST_PATH = os.getenv("VST_PATH", DEFAULT_VST_PATH).split(splitter)
gCarla.DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter)
gCarla.DEFAULT_AU_PATH = os.getenv("AU_PATH", DEFAULT_AU_PATH).split(splitter)
- gCarla.DEFAULT_CSOUND_PATH = os.getenv("CSOUND_PATH", DEFAULT_CSOUND_PATH).split(splitter)
gCarla.DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter)
gCarla.DEFAULT_SF2_PATH = os.getenv("SF2_PATH", DEFAULT_SF2_PATH).split(splitter)
gCarla.DEFAULT_SFZ_PATH = os.getenv("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter)
@@ -468,7 +464,6 @@ else:
gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter)
gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter)
gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter)
- gCarla.DEFAULT_CSOUND_PATH = DEFAULT_CSOUND_PATH.split(splitter)
gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter)
gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter)
gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter)
@@ -662,17 +657,11 @@ def getPluginTypeAsString(ptype):
return "VST3"
if ptype == PLUGIN_AU:
return "AU"
- if ptype == PLUGIN_JACK:
- return "JACK"
- if ptype == PLUGIN_REWIRE:
- return "ReWire"
- if ptype == PLUGIN_FILE_CSD:
- return "CSD"
- if ptype == PLUGIN_FILE_GIG:
+ if ptype == PLUGIN_GIG:
return "GIG"
- if ptype == PLUGIN_FILE_SF2:
+ if ptype == PLUGIN_SF2:
return "SF2"
- if ptype == PLUGIN_FILE_SFZ:
+ if ptype == PLUGIN_SFZ:
return "SFZ"
return "Unknown"
diff --git a/source/discovery/Makefile b/source/discovery/Makefile
index c24d09d0b..848bc7de7 100644
--- a/source/discovery/Makefile
+++ b/source/discovery/Makefile
@@ -37,10 +37,6 @@ endif
# --------------------------------------------------------------
-ifeq ($(HAVE_CSOUND),true)
-NATIVE_FLAGS += -DWANT_CSOUND $(CSOUND_FLAGS) $(CSOUND_LIBS)
-endif
-
ifeq ($(HAVE_FLUIDSYNTH),true)
NATIVE_FLAGS += -DWANT_FLUIDSYNTH $(FLUIDSYNTH_FLAGS) $(FLUIDSYNTH_LIBS)
endif
diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp
index d1096bb9f..b99879b1c 100644
--- a/source/discovery/carla-discovery.cpp
+++ b/source/discovery/carla-discovery.cpp
@@ -25,9 +25,6 @@
# define WANT_JUCE_PROCESSORS
# include "juce_audio_processors.h"
# endif
-#else
-// our csound code needs juce
-# undef WANT_CSOUND
#endif
#ifdef WANT_LADSPA
@@ -42,9 +39,6 @@
#ifdef WANT_VST
# include "CarlaVstUtils.hpp"
#endif
-#ifdef WANT_CSOUND
-# include
-#endif
#ifdef WANT_FLUIDSYNTH
# include
#endif
@@ -275,23 +269,6 @@ static intptr_t VSTCALLBACK vstHostCallback(AEffect* const effect, const int32_t
}
#endif
-#ifdef WANT_CSOUND
-// --------------------------------------------------------------------------
-// Csound stuff
-
-static int csound_midiInOpen(CSOUND*, void**, const char*) { return 0; }
-static int csound_midiRead(CSOUND*, void*, unsigned char*, int) { return 0; }
-static int csound_midiInClose(CSOUND*, void*) { return 0; }
-
-static int csound_midiOutOpen(CSOUND*, void**, const char*) { return 0; }
-static int csound_midiWrite(CSOUND*, void*, const unsigned char*, int) { return 0; }
-static int csound_midiOutClose(CSOUND*, void*) { return 0; }
-
-# ifndef DEBUG
-static void csound_silence(CSOUND*, int, const char*, va_list) {}
-# endif
-#endif
-
#ifdef WANT_LINUXSAMPLER
// --------------------------------------------------------------------------
// LinuxSampler stuff
@@ -1539,107 +1516,6 @@ static void do_juce_check(const char* const filename, const char* const stype, c
}
#endif
-static void do_csound_check(const char* const filename, const bool init)
-{
-#ifdef WANT_CSOUND
- Csound csound;
-# ifndef DEBUG
- csound.SetMessageCallback(csound_silence);
-# endif
- csound.SetHostImplementedAudioIO(true, kBufferSize);
- csound.SetHostImplementedMIDIIO(true);
- csound.Reset();
-
- csound.SetExternalMidiInOpenCallback(csound_midiInOpen);
- csound.SetExternalMidiReadCallback(csound_midiRead);
- csound.SetExternalMidiInCloseCallback(csound_midiInClose);
-
- csound.SetExternalMidiOutOpenCallback(csound_midiOutOpen);
- csound.SetExternalMidiWriteCallback(csound_midiWrite);
- csound.SetExternalMidiOutCloseCallback(csound_midiOutClose);
-
- if (csound.Compile(const_cast(filename)) != 0)
- {
- DISCOVERY_OUT("error", "csound failed to compile");
- return;
- }
-
- csound.PerformKsmps();
- csound.SetScoreOffsetSeconds(0);
- csound.RewindScore();
-
- int hints = 0x0;
- int audioIns = 0;
- int audioOuts = 0;
- int midiIns = 0;
- int midiOuts = 0;
- int parametersIns = 0;
- int parametersOuts = 0;
- int programs = 0;
-
- int numChannels;
- controlChannelInfo_t* channelList;
-
- numChannels = csound.ListChannels(channelList);
-
- carla_stderr2("Num chan %i", numChannels);
-
- if (numChannels != 0 && channelList != nullptr)
- {
- for (int i=0; i < numChannels; ++i)
- {
- const controlChannelInfo_t& channel(channelList[i]);
-
- carla_stderr2("chan @%i, type %i", i, channel.type);
-
- if (channel.type & CSOUND_AUDIO_CHANNEL)
- {
- if (channel.type & CSOUND_INPUT_CHANNEL)
- audioIns += 1;
- else if (channel.type & CSOUND_OUTPUT_CHANNEL)
- audioOuts += 1;
- }
- else if (channel.type & CSOUND_CONTROL_CHANNEL)
- {
- if (channel.type & CSOUND_INPUT_CHANNEL)
- parametersIns += 1;
- else if (channel.type & CSOUND_OUTPUT_CHANNEL)
- parametersOuts += 1;
- }
- }
-
- csound.DeleteChannelList(channelList);
- }
-
- // TODO
-
- csound.Cleanup();
- csound.Reset();
-
- DISCOVERY_OUT("init", "-----------");
- DISCOVERY_OUT("build", BINARY_NATIVE);
- DISCOVERY_OUT("hints", hints);
- //DISCOVERY_OUT("name", name.buffer());
- //DISCOVERY_OUT("label", label.buffer());
- //DISCOVERY_OUT("maker", "");
- DISCOVERY_OUT("audio.ins", audioIns);
- DISCOVERY_OUT("audio.outs", audioOuts);
- DISCOVERY_OUT("midi.ins", midiIns);
- DISCOVERY_OUT("midi.outs", midiOuts);
- DISCOVERY_OUT("parameters.ins", parametersIns);
- DISCOVERY_OUT("parameters.outs", parametersOuts);
- DISCOVERY_OUT("end", "------------");
-
-#else
- DISCOVERY_OUT("error", "csound support not available");
- return;
-
- // unused
- (void)filename;
- (void)init;
-#endif
-}
-
static void do_fluidsynth_check(const char* const filename, const bool init)
{
#ifdef WANT_FLUIDSYNTH
@@ -1896,16 +1772,13 @@ int main(int argc, char* argv[])
DISCOVERY_OUT("error", "AU support not available");
#endif
break;
- case PLUGIN_FILE_CSD:
- do_csound_check(filename, doInit);
- break;
- case PLUGIN_FILE_GIG:
+ case PLUGIN_GIG:
do_linuxsampler_check(filename, "gig", doInit);
break;
- case PLUGIN_FILE_SF2:
+ case PLUGIN_SF2:
do_fluidsynth_check(filename, doInit);
break;
- case PLUGIN_FILE_SFZ:
+ case PLUGIN_SFZ:
do_linuxsampler_check(filename, "sfz", doInit);
break;
default:
diff --git a/source/frontend/carla_shared.cpp b/source/frontend/carla_shared.cpp
index 7d2ba2d12..c4435b69f 100644
--- a/source/frontend/carla_shared.cpp
+++ b/source/frontend/carla_shared.cpp
@@ -223,7 +223,7 @@ void init()
QString splitter;
QString DEFAULT_LADSPA_PATH, DEFAULT_DSSI_PATH, DEFAULT_LV2_PATH, DEFAULT_VST_PATH, DEFAULT_VST3_PATH, DEFAULT_AU_PATH;
- QString DEFAULT_CSOUND_PATH, DEFAULT_GIG_PATH, DEFAULT_SF2_PATH, DEFAULT_SFZ_PATH;
+ QString DEFAULT_GIG_PATH, DEFAULT_SF2_PATH, DEFAULT_SFZ_PATH;
#if defined(CARLA_OS_WIN)
splitter = ";";
@@ -399,7 +399,6 @@ void init()
gCarla.DEFAULT_VST_PATH = getenvWithFallback("VST_PATH", DEFAULT_VST_PATH).split(splitter);
gCarla.DEFAULT_VST3_PATH = getenvWithFallback("VST3_PATH", DEFAULT_VST3_PATH).split(splitter);
gCarla.DEFAULT_AU_PATH = getenvWithFallback("AU_PATH", DEFAULT_AU_PATH).split(splitter);
- gCarla.DEFAULT_CSOUND_PATH = getenvWithFallback("CSOUND_PATH", DEFAULT_CSOUND_PATH).split(splitter);
gCarla.DEFAULT_GIG_PATH = getenvWithFallback("GIG_PATH", DEFAULT_GIG_PATH).split(splitter);
gCarla.DEFAULT_SF2_PATH = getenvWithFallback("SF2_PATH", DEFAULT_SF2_PATH).split(splitter);
gCarla.DEFAULT_SFZ_PATH = getenvWithFallback("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter);
@@ -412,7 +411,6 @@ void init()
gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter);
gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter);
gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter);
- gCarla.DEFAULT_CSOUND_PATH = DEFAULT_CSOUND_PATH.split(splitter);
gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter);
gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter);
gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter);
diff --git a/source/frontend/carla_shared.hpp b/source/frontend/carla_shared.hpp
index 2a9fa23e5..b37683e37 100644
--- a/source/frontend/carla_shared.hpp
+++ b/source/frontend/carla_shared.hpp
@@ -91,7 +91,6 @@ extern QStringList MIDI_CC_LIST;
#define CARLA_KEY_PATHS_VST "Paths/VST"
#define CARLA_KEY_PATHS_VST3 "Paths/VST3"
#define CARLA_KEY_PATHS_AU "Paths/AU"
-#define CARLA_KEY_PATHS_CSD "Paths/CSD"
#define CARLA_KEY_PATHS_GIG "Paths/GIG"
#define CARLA_KEY_PATHS_SF2 "Paths/SF2"
#define CARLA_KEY_PATHS_SFZ "Paths/SFZ"
@@ -133,7 +132,6 @@ struct CarlaObject {
QStringList DEFAULT_VST_PATH;
QStringList DEFAULT_VST3_PATH;
QStringList DEFAULT_AU_PATH;
- QStringList DEFAULT_CSOUND_PATH;
QStringList DEFAULT_GIG_PATH;
QStringList DEFAULT_SF2_PATH;
QStringList DEFAULT_SFZ_PATH;
diff --git a/source/tests/Makefile b/source/tests/Makefile
index e0f8bba5d..bd0579595 100644
--- a/source/tests/Makefile
+++ b/source/tests/Makefile
@@ -144,14 +144,6 @@ RtLinkedListGnu: RtLinkedList.cpp ../utils/LinkedList.hpp ../utils/RtLinkedList.
# --------------------------------------------------------------
-Rewire.exe: Rewire.cpp.o
- $(CXX) $^ -lversion -o $@
-
-Rewire.cpp.o: Rewire.cpp
- $(CXX) $< -Wall -Wextra -DREAL_BUILD -DDEBUG -O0 -g -I../includes -I../utils -std=c++11 -c -o $@
-
-# --------------------------------------------------------------
-
clean:
rm -f *.o $(TARGETS)
diff --git a/source/tests/Rewire-src.c b/source/tests/Rewire-src.c
deleted file mode 100644
index 711af03c6..000000000
--- a/source/tests/Rewire-src.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Carla Tests
- * Copyright (C) 2014 Filipe Coelho
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * For a full copy of the GNU General Public License see the doc/GPL.txt file.
- */
-
-#include "rewire/ReWire.c"
-#include "rewire/ReWireAPI.c"
-#include "rewire/ReWirePanelAPI.c"
diff --git a/source/tests/Rewire.cpp b/source/tests/Rewire.cpp
deleted file mode 100644
index 1091da832..000000000
--- a/source/tests/Rewire.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Carla Tests
- * Copyright (C) 2014 Filipe Coelho
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * For a full copy of the GNU General Public License see the doc/GPL.txt file.
- */
-
-#include "CarlaLibUtils.hpp"
-
-// -----------------------------------------------------------------------
-
-int main(/*int argc, char* argv[]*/)
-{
- static const char* const filename = "C:\\Program Files\\Waves\\ReWire\\WavesReWireDevice.dll";
-// static const char* const filename = "C:\\Program Files\\AudioGL\\AudioGL.dll";
-
- RewireBridge bridge(filename);
-
- DevInfo devInfo;
- carla_zeroStruct(devInfo);
- devInfo.size = 8288;
-
- (bridge.RWDEFGetDeviceInfo)(&devInfo);
-
- carla_stdout("Ok, this is the info:");
- carla_stdout("\tVersion: %i", devInfo.version);
- carla_stdout("\tName: \"%s\"", devInfo.name);
- carla_stdout("\tChannels: %l", devInfo.channelCount);
-
- for (long i=0; i < devInfo.channelCount; ++i)
- carla_stdout("\t\t#%i: \"%s\"", i+1, devInfo.channelNames[i]);
-
- OpenInfo info;
- info.size1 = sizeof(OpenInfo);
- info.size2 = 12;
- info.sampleRate = 44100;
- info.bufferSize = 512;
-
- (bridge.RWDEFOpenDevice)(&info);
-
-#if 0
- carla_stdout("Starting panel...");
- (bridge.RWDEFLaunchPanelApp)();
-
- for (int i=0; i<500; ++i)
- //for (; (bridge.RWDEFIsPanelAppLaunched)() != 0;)
- {
- (bridge.RWDEFIdle)();
- carla_msleep(20);
- }
-
- (bridge.RWDEFQuitPanelApp)();
-#endif
-
- for (; (bridge.RWDEFIsCloseOK)() == 0;)
- carla_msleep(10);
-
- (bridge.RWDEFCloseDevice)();
-
- return 0;
-}
diff --git a/source/utils/CarlaBackendUtils.hpp b/source/utils/CarlaBackendUtils.hpp
index a4e469db0..68bbcbbce 100644
--- a/source/utils/CarlaBackendUtils.hpp
+++ b/source/utils/CarlaBackendUtils.hpp
@@ -101,18 +101,12 @@ const char* PluginType2Str(const PluginType type) noexcept
return "PLUGIN_VST3";
case PLUGIN_AU:
return "PLUGIN_AU";
- case PLUGIN_JACK:
- return "PLUGIN_JACK";
- case PLUGIN_REWIRE:
- return "PLUGIN_REWIRE";
- case PLUGIN_FILE_CSD:
- return "PLUGIN_FILE_CSD";
- case PLUGIN_FILE_GIG:
- return "PLUGIN_FILE_GIG";
- case PLUGIN_FILE_SF2:
- return "PLUGIN_FILE_SF2";
- case PLUGIN_FILE_SFZ:
- return "PLUGIN_FILE_SFZ";
+ case PLUGIN_GIG:
+ return "PLUGIN_GIG";
+ case PLUGIN_SF2:
+ return "PLUGIN_SF2";
+ case PLUGIN_SFZ:
+ return "PLUGIN_SFZ";
}
carla_stderr("CarlaBackend::PluginType2Str(%i) - invalid type", type);
@@ -432,18 +426,12 @@ const char* getPluginTypeAsString(const PluginType type) noexcept
case PLUGIN_VST3:
return "VST3";
case PLUGIN_AU:
- return "AU";
- case PLUGIN_JACK:
- return "JACK";
- case PLUGIN_REWIRE:
- return "ReWire";
- case PLUGIN_FILE_CSD:
- return "CSD";
- case PLUGIN_FILE_GIG:
+ return "AU";;
+ case PLUGIN_GIG:
return "GIG";
- case PLUGIN_FILE_SF2:
+ case PLUGIN_SF2:
return "SF2";
- case PLUGIN_FILE_SFZ:
+ case PLUGIN_SFZ:
return "SFZ";
}
@@ -480,18 +468,12 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept
return PLUGIN_VST3;
if (stype == "au")
return PLUGIN_AU;
- if (stype == "jack")
- return PLUGIN_JACK;
- if (stype == "rewire")
- return PLUGIN_REWIRE;
- if (stype == "csd")
- return PLUGIN_FILE_CSD;
if (stype == "gig")
- return PLUGIN_FILE_GIG;
+ return PLUGIN_GIG;
if (stype == "sf2")
- return PLUGIN_FILE_SF2;
+ return PLUGIN_SF2;
if (stype == "sfz")
- return PLUGIN_FILE_SFZ;
+ return PLUGIN_SFZ;
carla_stderr("CarlaBackend::getPluginTypeFromString(\"%s\") - invalid string type", ctype);
return PLUGIN_NONE;
diff --git a/source/utils/CarlaStateUtils.cpp b/source/utils/CarlaStateUtils.cpp
index cfb23bae9..a8691d4f2 100644
--- a/source/utils/CarlaStateUtils.cpp
+++ b/source/utils/CarlaStateUtils.cpp
@@ -404,226 +404,6 @@ bool StateSave::fillFromXmlElement(const XmlElement* const xmlElement)
return true;
}
-#if 0
-void StateSave::fillFromXmlNode(const QDomNode& xmlNode)
-{
- clear();
-
- CARLA_SAFE_ASSERT_RETURN(! xmlNode.isNull(),);
-
- for (QDomNode node = xmlNode.firstChild(); ! node.isNull(); node = node.nextSibling())
- {
- QString tagName(node.toElement().tagName());
-
- // ---------------------------------------------------------------
- // Info
-
- if (tagName.compare("info", Qt::CaseInsensitive) == 0)
- {
- for (QDomNode xmlInfo = node.toElement().firstChild(); ! xmlInfo.isNull(); xmlInfo = xmlInfo.nextSibling())
- {
- const QString tag(xmlInfo.toElement().tagName());
- const QString text(xmlInfo.toElement().text().trimmed());
-
- if (tag.compare("type", Qt::CaseInsensitive) == 0)
- {
- type = xmlSafeStringCharDup(text, false);
- }
- else if (tag.compare("name", Qt::CaseInsensitive) == 0)
- {
- name = xmlSafeStringCharDup(text, false);
- }
- else if (tag.compare("label", Qt::CaseInsensitive) == 0 || tag.compare("uri", Qt::CaseInsensitive) == 0)
- {
- label = xmlSafeStringCharDup(text, false);
- }
- else if (tag.compare("binary", Qt::CaseInsensitive) == 0 || tag.compare("bundle", Qt::CaseInsensitive) == 0 || tag.compare("filename", Qt::CaseInsensitive) == 0)
- {
- binary = xmlSafeStringCharDup(text, false);
- }
- else if (tag.compare("uniqueid", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const qlonglong uniqueIdTry(text.toLongLong(&ok));
- if (ok) uniqueId = static_cast(uniqueIdTry);
- }
- }
- }
-
- // ---------------------------------------------------------------
- // Data
-
- else if (tagName.compare("data", Qt::CaseInsensitive) == 0)
- {
- for (QDomNode xmlData = node.toElement().firstChild(); ! xmlData.isNull(); xmlData = xmlData.nextSibling())
- {
- const QString tag(xmlData.toElement().tagName());
- const QString text(xmlData.toElement().text().trimmed());
-
- // -------------------------------------------------------
- // Internal Data
-
- if (tag.compare("active", Qt::CaseInsensitive) == 0)
- {
- active = (text.compare("yes", Qt::CaseInsensitive) == 0 || text.compare("true", Qt::CaseInsensitive) == 0);
- }
- else if (tag.compare("drywet", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(text.toFloat(&ok));
- if (ok) dryWet = carla_fixValue(0.0f, 1.0f, value);
- }
- else if (tag.compare("volume", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(text.toFloat(&ok));
- if (ok) volume = carla_fixValue(0.0f, 1.27f, value);
- }
- else if (tag.compare("balanceleft", Qt::CaseInsensitive) == 0 || tag.compare("balance-left", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(text.toFloat(&ok));
- if (ok) balanceLeft = carla_fixValue(-1.0f, 1.0f, value);
- }
- else if (tag.compare("balanceright", Qt::CaseInsensitive) == 0 || tag.compare("balance-right", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(text.toFloat(&ok));
- if (ok) balanceRight = carla_fixValue(-1.0f, 1.0f, value);
- }
- else if (tag.compare("panning", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(text.toFloat(&ok));
- if (ok) panning = carla_fixValue(-1.0f, 1.0f, value);
- }
- else if (tag.compare("controlchannel", Qt::CaseInsensitive) == 0 || tag.compare("control-channel", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const short value(text.toShort(&ok));
- if (ok && value >= 1 && value <= MAX_MIDI_CHANNELS)
- ctrlChannel = static_cast(value-1);
- }
-
- // -------------------------------------------------------
- // Program (current)
-
- else if (tag.compare("currentprogramindex", Qt::CaseInsensitive) == 0 || tag.compare("current-program-index", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const int value(text.toInt(&ok));
- if (ok && value >= 1)
- currentProgramIndex = value-1;
- }
- else if (tag.compare("currentprogramname", Qt::CaseInsensitive) == 0 || tag.compare("current-program-name", Qt::CaseInsensitive) == 0)
- {
- currentProgramName = xmlSafeStringCharDup(text, false);
- }
-
- // -------------------------------------------------------
- // Midi Program (current)
-
- else if (tag.compare("currentmidibank", Qt::CaseInsensitive) == 0 || tag.compare("current-midi-bank", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const int value(text.toInt(&ok));
- if (ok && value >= 1)
- currentMidiBank = value-1;
- }
- else if (tag.compare("currentmidiprogram", Qt::CaseInsensitive) == 0 || tag.compare("current-midi-program", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const int value(text.toInt(&ok));
- if (ok && value >= 1)
- currentMidiProgram = value-1;
- }
-
- // -------------------------------------------------------
- // Parameters
-
- else if (tag.compare("parameter", Qt::CaseInsensitive) == 0)
- {
- StateParameter* const stateParameter(new StateParameter());
-
- for (QDomNode xmlSubData = xmlData.toElement().firstChild(); ! xmlSubData.isNull(); xmlSubData = xmlSubData.nextSibling())
- {
- const QString pTag(xmlSubData.toElement().tagName());
- const QString pText(xmlSubData.toElement().text().trimmed());
-
- if (pTag.compare("index", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const int index(pText.toInt(&ok));
- if (ok && index >= 0) stateParameter->index = index;
- }
- else if (pTag.compare("name", Qt::CaseInsensitive) == 0)
- {
- stateParameter->name = xmlSafeStringCharDup(pText, false);
- }
- else if (pTag.compare("symbol", Qt::CaseInsensitive) == 0)
- {
- stateParameter->symbol = xmlSafeStringCharDup(pText, false);
- }
- else if (pTag.compare("value", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const float value(pText.toFloat(&ok));
- if (ok) stateParameter->value = value;
- }
- else if (pTag.compare("midichannel", Qt::CaseInsensitive) == 0 || pTag.compare("midi-channel", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const ushort channel(pText.toUShort(&ok));
- if (ok && channel >= 1 && channel <= MAX_MIDI_CHANNELS)
- stateParameter->midiChannel = static_cast(channel-1);
- }
- else if (pTag.compare("midicc", Qt::CaseInsensitive) == 0 || pTag.compare("midi-cc", Qt::CaseInsensitive) == 0)
- {
- bool ok;
- const int cc(pText.toInt(&ok));
- if (ok && cc >= 1 && cc < 0x5F)
- stateParameter->midiCC = static_cast(cc);
- }
- }
-
- parameters.append(stateParameter);
- }
-
- // -------------------------------------------------------
- // Custom Data
-
- else if (tag.compare("customdata", Qt::CaseInsensitive) == 0 || tag.compare("custom-data", Qt::CaseInsensitive) == 0)
- {
- StateCustomData* const stateCustomData(new StateCustomData());
-
- for (QDomNode xmlSubData = xmlData.toElement().firstChild(); ! xmlSubData.isNull(); xmlSubData = xmlSubData.nextSibling())
- {
- const QString cTag(xmlSubData.toElement().tagName());
- const QString cText(xmlSubData.toElement().text().trimmed());
-
- if (cTag.compare("type", Qt::CaseInsensitive) == 0)
- stateCustomData->type = xmlSafeStringCharDup(cText, false);
- else if (cTag.compare("key", Qt::CaseInsensitive) == 0)
- stateCustomData->key = xmlSafeStringCharDup(cText, false);
- else if (cTag.compare("value", Qt::CaseInsensitive) == 0)
- stateCustomData->value = xmlSafeStringCharDup(cText, false);
- }
-
- customData.append(stateCustomData);
- }
-
- // -------------------------------------------------------
- // Chunk
-
- else if (tag.compare("chunk", Qt::CaseInsensitive) == 0)
- {
- chunk = xmlSafeStringCharDup(text, false);
- }
- }
- }
- }
-}
-#endif
// -----------------------------------------------------------------------
// fillXmlStringFromStateSave
@@ -672,19 +452,14 @@ String StateSave::toString() const
infoXml << " " << xmlSafeString(binary, true) << "\n";
infoXml << " " << uniqueId << "\n";
break;
- case PLUGIN_JACK:
- infoXml << " " << xmlSafeString(binary, true) << "\n";
- break;
- case PLUGIN_REWIRE:
- infoXml << " \n";
- break;
- case PLUGIN_FILE_CSD:
- case PLUGIN_FILE_GIG:
- case PLUGIN_FILE_SF2:
- case PLUGIN_FILE_SFZ:
+ case PLUGIN_GIG:
+ case PLUGIN_SF2:
infoXml << " " << xmlSafeString(binary, true) << "\n";
infoXml << " \n";
break;
+ case PLUGIN_SFZ:
+ infoXml << " " << xmlSafeString(binary, true) << "\n";
+ break;
}
infoXml << " \n\n";
@@ -807,184 +582,6 @@ String StateSave::toString() const
return content;
}
-#if 0
-QString StateSave::toString() const
-{
- QString content;
-
- {
- QString infoXml(" \n");
-
- infoXml += QString(" %1\n").arg((type != nullptr) ? type : "");
- infoXml += QString(" %1\n").arg(xmlSafeString(name, true));
-
- switch (getPluginTypeFromString(type))
- {
- case PLUGIN_NONE:
- break;
- case PLUGIN_INTERNAL:
- infoXml += QString(" \n").arg(xmlSafeString(label, true));
- break;
- case PLUGIN_LADSPA:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" \n").arg(xmlSafeString(label, true));
- infoXml += QString(" %1\n").arg(uniqueId);
- break;
- case PLUGIN_DSSI:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" \n").arg(xmlSafeString(label, true));
- break;
- case PLUGIN_LV2:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" %1\n").arg(xmlSafeString(label, true));
- break;
- case PLUGIN_VST:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" %1\n").arg(uniqueId);
- break;
- case PLUGIN_VST3:
- // TODO?
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" %1\n").arg(uniqueId);
- break;
- case PLUGIN_AU:
- // TODO?
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" %1\n").arg(uniqueId);
- break;
- case PLUGIN_JACK:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- break;
- case PLUGIN_REWIRE:
- infoXml += QString(" \n").arg(xmlSafeString(label, true));
- break;
- case PLUGIN_FILE_CSD:
- case PLUGIN_FILE_GIG:
- case PLUGIN_FILE_SF2:
- case PLUGIN_FILE_SFZ:
- infoXml += QString(" %1\n").arg(xmlSafeString(binary, true));
- infoXml += QString(" \n").arg(xmlSafeString(label, true));
- break;
- }
-
- infoXml += " \n\n";
-
- content += infoXml;
- }
-
- content += " \n";
-
- {
- QString dataXml;
-
- dataXml += QString(" %1\n").arg(active ? "Yes" : "No");
-
- if (dryWet != 1.0f)
- dataXml += QString(" %1\n").arg(dryWet, 0, 'g', 7);
- if (volume != 1.0f)
- dataXml += QString(" %1\n").arg(volume, 0, 'g', 7);
- if (balanceLeft != -1.0f)
- dataXml += QString(" %1\n").arg(balanceLeft, 0, 'g', 7);
- if (balanceRight != 1.0f)
- dataXml += QString(" %1\n").arg(balanceRight, 0, 'g', 7);
- if (panning != 0.0f)
- dataXml += QString(" %1\n").arg(panning, 0, 'g', 7);
-
- if (ctrlChannel < 0)
- dataXml += QString(" N\n");
- else
- dataXml += QString(" %1\n").arg(ctrlChannel+1);
-
- content += dataXml;
- }
-
- for (StateParameterItenerator it = parameters.begin(); it.valid(); it.next())
- {
- StateParameter* const stateParameter(it.getValue());
-
- QString parameterXml("\n"" \n");
-
- parameterXml += QString(" %1\n").arg(stateParameter->index);
- parameterXml += QString(" %1\n").arg(xmlSafeString(stateParameter->name, true));
-
- if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0')
- parameterXml += QString(" %1\n").arg(xmlSafeString(stateParameter->symbol, true));
-
- if (stateParameter->isInput)
- parameterXml += QString(" %1\n").arg(stateParameter->value, 0, 'g', 15);
-
- if (stateParameter->midiCC > 0)
- {
- parameterXml += QString(" %1\n").arg(stateParameter->midiCC);
- parameterXml += QString(" %1\n").arg(stateParameter->midiChannel+1);
- }
-
- parameterXml += " \n";
-
- content += parameterXml;
- }
-
- if (currentProgramIndex >= 0 && currentProgramName != nullptr && currentProgramName[0] != '\0')
- {
- // ignore 'default' program
- if (currentProgramIndex > 0 || QString(currentProgramName).compare("default", Qt::CaseInsensitive) != 0)
- {
- QString programXml("\n");
- programXml += QString(" %1\n").arg(currentProgramIndex+1);
- programXml += QString(" %1\n").arg(xmlSafeString(currentProgramName, true));
-
- content += programXml;
- }
- }
-
- if (currentMidiBank >= 0 && currentMidiProgram >= 0)
- {
- QString midiProgramXml("\n");
- midiProgramXml += QString(" %1\n").arg(currentMidiBank+1);
- midiProgramXml += QString(" %1\n").arg(currentMidiProgram+1);
-
- content += midiProgramXml;
- }
-
- for (StateCustomDataItenerator it = customData.begin(); it.valid(); it.next())
- {
- StateCustomData* const stateCustomData(it.getValue());
- CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->type != nullptr && stateCustomData->type[0] != '\0');
- CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->key != nullptr && stateCustomData->key[0] != '\0');
- CARLA_SAFE_ASSERT_CONTINUE(stateCustomData->value != nullptr);
-
- QString customDataXml("\n"" \n");
- customDataXml += QString(" %1\n").arg(xmlSafeString(stateCustomData->type, true));
- customDataXml += QString(" %1\n").arg(xmlSafeString(stateCustomData->key, true));
-
- if (std::strcmp(stateCustomData->type, CUSTOM_DATA_TYPE_CHUNK) == 0 || std::strlen(stateCustomData->value) >= 128)
- {
- customDataXml += " \n";
- customDataXml += QString("%1\n").arg(xmlSafeString(stateCustomData->value, true));
- customDataXml += " \n";
- }
- else
- customDataXml += QString(" %1\n").arg(xmlSafeString(stateCustomData->value, true));
-
- customDataXml += " \n";
-
- content += customDataXml;
- }
-
- if (chunk != nullptr && chunk[0] != '\0')
- {
- QString chunkXml("\n"" \n");
- chunkXml += QString("%1\n").arg(chunk);
- chunkXml += " \n";
-
- content += chunkXml;
- }
-
- content += " \n";
-
- return content;
-}
-#endif
// -----------------------------------------------------------------------