(desc->numOutputChannels);
- info.midiIns = desc->isInstrument ? 1 : 0;
- info.midiOuts = 0;
- info.parameterIns = 0;
- info.parameterOuts = 0;
-
- static CarlaString sname, slabel, smaker;
-
- sname = desc->name.toRawUTF8();
- slabel = desc->fileOrIdentifier.toRawUTF8();
- smaker = desc->manufacturerName.toRawUTF8();
-
- info.name = sname;
- info.label = slabel;
- info.maker = smaker;
- info.copyright = gNullCharPtr;
-
- return &info;
-#else
- break;
-#endif
- }
-
default:
break;
}
@@ -515,34 +436,18 @@ const char* carla_get_complete_license_text()
"This current Carla build is using the following features and 3rd-party code:
"
""
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) || ! defined(VESTIGE_HEADER)
-# define LS_NOTE_NO "2"
-#else
-# define LS_NOTE_NO "1"
-#endif
-
// Plugin formats
"LADSPA plugin support "
"DSSI plugin support "
"LV2 plugin support "
-#ifdef VESTIGE_HEADER
"VST2 plugin support using VeSTige header by Javier Serrano Polo "
-#else
- "VST2 plugin support using official VST SDK 2.4 [1] "
-#endif
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
- "VST3 plugin support using official VST SDK 3.6 [1] "
-#endif
-#ifdef CARLA_OS_MAC
- "AU plugin support "
-#endif
// Sample kit libraries
#ifdef HAVE_FLUIDSYNTH
"FluidSynth library for SF2 support "
#endif
#ifdef HAVE_LINUXSAMPLER
- "LinuxSampler library for GIG and SFZ support [" LS_NOTE_NO "] "
+ "LinuxSampler library for GIG and SFZ support [1] "
#endif
// misc libs
@@ -550,9 +455,7 @@ const char* carla_get_complete_license_text()
"liblo library for OSC support "
"rtmempool library by Nedko Arnaudov"
" serd, sord, sratom and lilv libraries for LV2 discovery "
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
"RtAudio and RtMidi libraries for extra Audio and MIDI support "
-#endif
// Internal plugins
#ifdef HAVE_EXPERIMENTAL_PLUGINS
@@ -569,13 +472,9 @@ const char* carla_get_complete_license_text()
" "
""
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN) || ! defined(VESTIGE_HEADER)
- // Required by VST SDK
- " [1] Trademark of Steinberg Media Technologies GmbH. "
-#endif
#ifdef HAVE_LINUXSAMPLER
// LinuxSampler GPL exception
- " [" LS_NOTE_NO "] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors."
+ " [1] Using LinuxSampler code in commercial hardware or software products is not allowed without prior written authorization by the authors."
#endif
"
"
;
@@ -584,23 +483,6 @@ const char* carla_get_complete_license_text()
return retText;
}
-const char* carla_get_juce_version()
-{
- carla_debug("carla_get_juce_version()");
-
- static CarlaString retVersion;
-
- if (retVersion.isEmpty())
- {
- if (const char* const version = juce::SystemStats::getJUCEVersion().toRawUTF8())
- retVersion = version+6;
- else
- retVersion = "4.0";
- }
-
- return retVersion;
-}
-
const char* carla_get_supported_file_extensions()
{
carla_debug("carla_get_supported_file_extensions()");
@@ -628,6 +510,7 @@ const char* carla_get_supported_file_extensions()
#endif
;
+#if 0
// Audio files
{
using namespace juce;
@@ -647,6 +530,7 @@ const char* carla_get_supported_file_extensions()
retText += juceFormats.toRawUTF8();
}
+#endif
}
return retText;
diff --git a/source/backend/CarlaUtils.h b/source/backend/CarlaUtils.h
index 48697a4f6..d3396cf9a 100644
--- a/source/backend/CarlaUtils.h
+++ b/source/backend/CarlaUtils.h
@@ -129,11 +129,6 @@ typedef struct _CarlaCachedPluginInfo {
*/
CARLA_EXPORT const char* carla_get_complete_license_text();
-/*!
- * Get the juce version used in the current Carla build.
- */
-CARLA_EXPORT const char* carla_get_juce_version();
-
/*!
* Get all the supported file extensions in carla_load_file().
* Returned string uses this syntax:
diff --git a/source/backend/Makefile b/source/backend/Makefile
index 459c82bc7..f441d334e 100644
--- a/source/backend/Makefile
+++ b/source/backend/Makefile
@@ -27,9 +27,7 @@ STANDALONE_LIBS += $(MODULEDIR)/carla_plugin.a
STANDALONE_LIBS += $(MODULEDIR)/jackbridge.a
STANDALONE_LIBS += $(MODULEDIR)/juce_audio_basics.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_audio_formats.a
STANDALONE_LIBS += $(MODULEDIR)/juce_core.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_events.a
STANDALONE_LIBS += $(MODULEDIR)/lilv.a
STANDALONE_LIBS += $(MODULEDIR)/native-plugins.a
STANDALONE_LIBS += $(MODULEDIR)/rtmempool.a
@@ -42,58 +40,24 @@ ifeq ($(HAVE_HYLIA),true)
STANDALONE_LIBS += $(MODULEDIR)/hylia.a
endif
-ifeq ($(MACOS_OR_WIN32),true)
-STANDALONE_LIBS += $(MODULEDIR)/juce_audio_devices.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_audio_processors.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_data_structures.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_graphics.a
-STANDALONE_LIBS += $(MODULEDIR)/juce_gui_basics.a
-ifeq ($(MACOS),true)
-STANDALONE_LIBS += $(MODULEDIR)/juce_gui_extra.a
-endif
-else
STANDALONE_LIBS += $(MODULEDIR)/rtaudio.a
STANDALONE_LIBS += $(MODULEDIR)/rtmidi.a
-endif
UTILS_LIBS = $(MODULEDIR)/juce_audio_basics.a
-UTILS_LIBS += $(MODULEDIR)/juce_audio_formats.a
UTILS_LIBS += $(MODULEDIR)/juce_core.a
-UTILS_LIBS += $(MODULEDIR)/juce_events.a
UTILS_LIBS += $(MODULEDIR)/lilv.a
-ifeq ($(MACOS),true)
-UTILS_LIBS += $(MODULEDIR)/juce_audio_processors.a
-UTILS_LIBS += $(MODULEDIR)/juce_data_structures.a
-UTILS_LIBS += $(MODULEDIR)/juce_graphics.a
-UTILS_LIBS += $(MODULEDIR)/juce_gui_basics.a
-UTILS_LIBS += $(MODULEDIR)/juce_gui_extra.a
-endif
-
# ----------------------------------------------------------------------------------------------------------------------------
STANDALONE_LINK_FLAGS = $(JACKBRIDGE_LIBS)
STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
STANDALONE_LINK_FLAGS += $(JUCE_CORE_LIBS)
STANDALONE_LINK_FLAGS += $(LILV_LIBS)
STANDALONE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
STANDALONE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
-ifeq ($(MACOS_OR_WIN32),true)
-STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
-STANDALONE_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
-ifeq ($(MACOS),true)
-STANDALONE_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
-endif
-else
STANDALONE_LINK_FLAGS += $(RTAUDIO_LIBS)
STANDALONE_LINK_FLAGS += $(RTMIDI_LIBS)
-endif
ifeq ($(HAVE_LIBLO),true)
STANDALONE_LINK_FLAGS += $(LIBLO_LIBS)
@@ -116,7 +80,6 @@ STANDALONE_LINK_FLAGS += $(X11_LIBS)
endif
UTILS_LINK_FLAGS = $(JUCE_AUDIO_BASICS_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
UTILS_LINK_FLAGS += $(JUCE_CORE_LIBS)
UTILS_LINK_FLAGS += $(LILV_LIBS)
@@ -124,15 +87,6 @@ ifeq ($(HAVE_X11),true)
UTILS_LINK_FLAGS += $(X11_LIBS)
endif
-ifeq ($(MACOS),true)
-UTILS_LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_EVENTS_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
-UTILS_LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
-endif
-
ifneq ($(HAIKU),true)
UTILS_LINK_FLAGS += -lpthread
endif
diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp
index 14273c9b1..2bdf3a09a 100644
--- a/source/backend/engine/CarlaEngine.cpp
+++ b/source/backend/engine/CarlaEngine.cpp
@@ -595,14 +595,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
plugin = CarlaPlugin::newVST2(initializer);
break;
- case PLUGIN_VST3:
- plugin = CarlaPlugin::newVST3(initializer);
- break;
-
- case PLUGIN_AU:
- plugin = CarlaPlugin::newAU(initializer);
- break;
-
case PLUGIN_GIG:
use16Outs = (extra != nullptr && std::strcmp((const char*)extra, "true") == 0);
plugin = CarlaPlugin::newFileGIG(initializer, use16Outs);
@@ -644,19 +636,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
canRun = false;
}
}
- else if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- /**/ if (plugin->getMidiInCount() > 1 || plugin->getMidiOutCount() > 1)
- {
- setLastError("Carla's patchbay mode cannot work with plugins that have multiple MIDI ports, sorry!");
- canRun = false;
- }
- else if (plugin->getCVInCount() > 0 || plugin->getCVInCount() > 0)
- {
- setLastError("CV ports in patchbay mode is still TODO");
- canRun = false;
- }
- }
if (! canRun)
{
@@ -683,9 +662,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
const ScopedThreadStopper sts(this);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.replacePlugin(oldPlugin, plugin);
-
const bool wasActive = oldPlugin->getInternalParameterValue(PARAMETER_ACTIVE) >= 0.5f;
const float oldDryWet = oldPlugin->getInternalParameterValue(PARAMETER_DRYWET);
const float oldVolume = oldPlugin->getInternalParameterValue(PARAMETER_VOLUME);
@@ -711,11 +687,6 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype,
++pData->curPluginCount;
callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName());
-
-#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.addPlugin(plugin);
-#endif
}
return true;
@@ -745,9 +716,6 @@ bool CarlaEngine::removePlugin(const uint id)
const ScopedThreadStopper sts(this);
#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.removePlugin(plugin);
-
const bool lockWait(isRunning() /*&& pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS*/);
const ScopedActionLock sal(this, kEnginePostActionRemovePlugin, id, 0, lockWait);
@@ -792,17 +760,12 @@ bool CarlaEngine::removeAllPlugins()
const uint curPluginCount(pData->curPluginCount);
-#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.removeAllPlugins();
-
-# ifdef HAVE_LIBLO
+#if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE)
if (isOscControlRegistered())
{
for (uint i=0; i < curPluginCount; ++i)
oscSend_control_remove_plugin(curPluginCount-i-1);
}
-# endif
#endif
const bool lockWait(isRunning());
@@ -851,9 +814,6 @@ const char* CarlaEngine::renamePlugin(const uint id, const char* const newName)
plugin->setName(uniqueName);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.renamePlugin(plugin, uniqueName);
-
delete[] uniqueName;
return plugin->getName();
}
@@ -939,9 +899,6 @@ bool CarlaEngine::switchPlugins(const uint idA, const uint idB) noexcept
const ScopedThreadStopper sts(this);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.replacePlugin(pluginA, pluginB);
-
const bool lockWait(isRunning() /*&& pData->options.processMode != ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS*/);
const ScopedActionLock sal(this, kEnginePostActionSwitchPlugins, idA, idB, lockWait);
@@ -1161,11 +1118,6 @@ bool CarlaEngine::loadFile(const char* const filename)
return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST2, filename, nullptr, nullptr, 0, nullptr, 0x0);
#endif
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
- if (extension == "vst3")
- return addPlugin(getBinaryTypeFromFile(filename), PLUGIN_VST3, filename, nullptr, nullptr, 0, nullptr, 0x0);
-#endif
-
// -------------------------------------------------------------------
setLastError("Unknown file extension");
@@ -1531,14 +1483,6 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch
else
pData->options.pathVST2 = nullptr;
break;
- case PLUGIN_VST3:
- if (pData->options.pathVST3 != nullptr)
- delete[] pData->options.pathVST3;
- if (valueStr != nullptr)
- pData->options.pathVST3 = carla_strdup_safe(valueStr);
- else
- pData->options.pathVST3 = nullptr;
- break;
case PLUGIN_GIG:
if (pData->options.pathGIG != nullptr)
delete[] pData->options.pathGIG;
@@ -1698,11 +1642,8 @@ void CarlaEngine::bufferSizeChanged(const uint32_t newBufferSize)
carla_debug("CarlaEngine::bufferSizeChanged(%i)", newBufferSize);
#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
pData->graph.setBufferSize(newBufferSize);
- }
#endif
pData->time.updateAudioValues(newBufferSize, pData->sampleRate);
@@ -1723,11 +1664,8 @@ void CarlaEngine::sampleRateChanged(const double newSampleRate)
carla_debug("CarlaEngine::sampleRateChanged(%g)", newSampleRate);
#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
pData->graph.setSampleRate(newSampleRate);
- }
#endif
pData->time.updateAudioValues(pData->bufferSize, newSampleRate);
@@ -1748,11 +1686,8 @@ void CarlaEngine::offlineModeChanged(const bool isOfflineNow)
carla_debug("CarlaEngine::offlineModeChanged(%s)", bool2str(isOfflineNow));
#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
pData->graph.setOffline(isOfflineNow);
- }
#endif
for (uint i=0; i < pData->curPluginCount; ++i)
@@ -1821,7 +1756,6 @@ void CarlaEngine::saveProjectInternal(juce::MemoryOutputStream& outStream) const
outSettings << " " << xmlSafeString(options.pathDSSI, true) << " \n";
outSettings << " " << xmlSafeString(options.pathLV2, true) << " \n";
outSettings << " " << xmlSafeString(options.pathVST2, true) << " \n";
- outSettings << " " << xmlSafeString(options.pathVST3, true) << " \n";
outSettings << " " << xmlSafeString(options.pathGIG, true) << " \n";
outSettings << " " << xmlSafeString(options.pathSF2, true) << " \n";
outSettings << " " << xmlSafeString(options.pathSFZ, true) << " \n";
@@ -1866,34 +1800,6 @@ void CarlaEngine::saveProjectInternal(juce::MemoryOutputStream& outStream) const
plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "true", false);
}
- // save internal connections
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- if (const char* const* const patchbayConns = getPatchbayConnections(false))
- {
- MemoryOutputStream outPatchbay(2048);
-
- outPatchbay << "\n \n";
-
- for (int i=0; patchbayConns[i] != nullptr && patchbayConns[i+1] != nullptr; ++i, ++i )
- {
- const char* const connSource(patchbayConns[i]);
- const char* const connTarget(patchbayConns[i+1]);
-
- CARLA_SAFE_ASSERT_CONTINUE(connSource != nullptr && connSource[0] != '\0');
- CARLA_SAFE_ASSERT_CONTINUE(connTarget != nullptr && connTarget[0] != '\0');
-
- outPatchbay << " \n";
- outPatchbay << " " << xmlSafeString(connSource, true) << " \n";
- outPatchbay << " " << xmlSafeString(connTarget, true) << " \n";
- outPatchbay << " \n";
- }
-
- outPatchbay << " \n";
- outStream << outPatchbay;
- }
- }
-
// if we're running inside some session-manager (and using JACK), let them handle the connections
bool saveExternalConnections;
@@ -1961,7 +1867,7 @@ static String findBinaryInCustomPath(const char* const searchPath, const char* c
int searchFlags = File::findFiles|File::ignoreHiddenFiles;
#ifdef CARLA_OS_MAC
- if (filename.endsWithIgnoreCase(".vst") || filename.endsWithIgnoreCase(".vst3"))
+ if (filename.endsWithIgnoreCase(".vst"))
searchFlags |= File::findDirectories;
#endif
@@ -2108,12 +2014,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
value = PLUGIN_VST2;
valueStr = text.toRawUTF8();
}
- else if (tag.equalsIgnoreCase("VST3_PATH"))
- {
- option = ENGINE_OPTION_PLUGIN_PATH;
- value = PLUGIN_VST3;
- valueStr = text.toRawUTF8();
- }
else if (tag.equalsIgnoreCase("GIG_PATH"))
{
option = ENGINE_OPTION_PLUGIN_PATH;
@@ -2177,7 +2077,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
case PLUGIN_LADSPA:
case PLUGIN_DSSI:
case PLUGIN_VST2:
- case PLUGIN_VST3:
case PLUGIN_SFZ:
if (stateSave.binary != nullptr && stateSave.binary[0] != '\0' &&
! (File::isAbsolutePath(stateSave.binary) && File(stateSave.binary).exists()))
@@ -2189,7 +2088,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
case PLUGIN_LADSPA: searchPath = pData->options.pathLADSPA; break;
case PLUGIN_DSSI: searchPath = pData->options.pathDSSI; break;
case PLUGIN_VST2: searchPath = pData->options.pathVST2; break;
- case PLUGIN_VST3: searchPath = pData->options.pathVST3; break;
case PLUGIN_GIG: searchPath = pData->options.pathGIG; break;
case PLUGIN_SF2: searchPath = pData->options.pathSF2; break;
case PLUGIN_SFZ: searchPath = pData->options.pathSFZ; break;
@@ -2210,7 +2108,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
case PLUGIN_LADSPA: searchPath = std::getenv("LADSPA_PATH"); break;
case PLUGIN_DSSI: searchPath = std::getenv("DSSI_PATH"); break;
case PLUGIN_VST2: searchPath = std::getenv("VST_PATH"); break;
- case PLUGIN_VST3: searchPath = std::getenv("VST3_PATH"); break;
case PLUGIN_GIG: searchPath = std::getenv("GIG_PATH"); break;
case PLUGIN_SF2: searchPath = std::getenv("SF2_PATH"); break;
case PLUGIN_SFZ: searchPath = std::getenv("SFZ_PATH"); break;
@@ -2272,11 +2169,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
plugin->setEnabled(true);
callback(ENGINE_CALLBACK_PLUGIN_ADDED, pluginId, 0, 0, 0.0f, plugin->getName());
-
-#ifndef BUILD_BRIDGE
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- pData->graph.addPlugin(plugin);
-#endif
}
else
{
@@ -2308,53 +2200,6 @@ bool CarlaEngine::loadProjectInternal(juce::XmlDocument& xmlDoc)
if (pData->aboutToClose)
return true;
- // handle connections (internal)
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- const bool isUsingExternal(pData->graph.isUsingExternal());
-
- for (XmlElement* elem = xmlElement->getFirstChildElement(); elem != nullptr; elem = elem->getNextElement())
- {
- const String& tagName(elem->getTagName());
-
- if (! tagName.equalsIgnoreCase("patchbay"))
- continue;
-
- CarlaString sourcePort, targetPort;
-
- for (XmlElement* patchElem = elem->getFirstChildElement(); patchElem != nullptr; patchElem = patchElem->getNextElement())
- {
- const String& patchTag(patchElem->getTagName());
-
- sourcePort.clear();
- targetPort.clear();
-
- if (! patchTag.equalsIgnoreCase("connection"))
- continue;
-
- for (XmlElement* connElem = patchElem->getFirstChildElement(); connElem != nullptr; connElem = connElem->getNextElement())
- {
- const String& tag(connElem->getTagName());
- const String text(connElem->getAllSubText().trim());
-
- /**/ if (tag.equalsIgnoreCase("source"))
- sourcePort = xmlSafeString(text, false).toRawUTF8();
- else if (tag.equalsIgnoreCase("target"))
- targetPort = xmlSafeString(text, false).toRawUTF8();
- }
-
- if (sourcePort.isNotEmpty() && targetPort.isNotEmpty())
- restorePatchbayConnection(false, sourcePort, targetPort, !isUsingExternal);
- }
- break;
- }
-
- callback(ENGINE_CALLBACK_IDLE, 0, 0, 0, 0.0f, nullptr);
-
- if (pData->aboutToClose)
- return true;
- }
-
// if we're running inside some session-manager (and using JACK), let them handle the external connections
bool loadExternalConnections;
diff --git a/source/backend/engine/CarlaEngineData.cpp b/source/backend/engine/CarlaEngineData.cpp
index 8164d093b..11f40945d 100644
--- a/source/backend/engine/CarlaEngineData.cpp
+++ b/source/backend/engine/CarlaEngineData.cpp
@@ -187,7 +187,7 @@ EngineOptions::EngineOptions() noexcept
: processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS),
transportMode(ENGINE_TRANSPORT_MODE_JACK),
#else
- : processMode(ENGINE_PROCESS_MODE_PATCHBAY),
+ : processMode(ENGINE_PROCESS_MODE_CONTINUOUS_RACK),
transportMode(ENGINE_TRANSPORT_MODE_INTERNAL),
#endif
transportExtra(nullptr),
@@ -209,7 +209,6 @@ EngineOptions::EngineOptions() noexcept
pathDSSI(nullptr),
pathLV2(nullptr),
pathVST2(nullptr),
- pathVST3(nullptr),
pathGIG(nullptr),
pathSF2(nullptr),
pathSFZ(nullptr),
@@ -250,12 +249,6 @@ EngineOptions::~EngineOptions() noexcept
pathVST2 = nullptr;
}
- if (pathVST3 != nullptr)
- {
- delete[] pathVST3;
- pathVST3 = nullptr;
- }
-
if (pathGIG != nullptr)
{
delete[] pathGIG;
diff --git a/source/backend/engine/CarlaEngineGraph.cpp b/source/backend/engine/CarlaEngineGraph.cpp
index e12947424..49c33c4c7 100644
--- a/source/backend/engine/CarlaEngineGraph.cpp
+++ b/source/backend/engine/CarlaEngineGraph.cpp
@@ -32,18 +32,19 @@
#endif
using juce::AudioBuffer;
-using juce::AudioPluginInstance;
-using juce::AudioProcessor;
-using juce::AudioProcessorEditor;
using juce::FloatVectorOperations;
using juce::MemoryBlock;
-using juce::MessageManagerLock;
-using juce::PluginDescription;
using juce::String;
using juce::StringArray;
using juce::jmin;
using juce::jmax;
+#if 0
+using juce::AudioPluginInstance;
+using juce::AudioProcessor;
+using juce::AudioProcessorEditor;
+#endif
+
CARLA_BACKEND_START_NAMESPACE
// -----------------------------------------------------------------------
@@ -1005,6 +1006,7 @@ void RackGraph::processHelper(CarlaEngine::ProtectedData* const data, const floa
}
}
+#if 0
// -----------------------------------------------------------------------
// Patchbay Graph stuff
@@ -1943,6 +1945,7 @@ void PatchbayGraph::process(CarlaEngine::ProtectedData* const data, const float*
midiBuffer.clear();
}
}
+#endif
// -----------------------------------------------------------------------
// InternalGraph
@@ -1973,7 +1976,9 @@ void EngineInternalGraph::create(const uint32_t inputs, const uint32_t outputs)
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay == nullptr,);
+#if 0
fPatchbay = new PatchbayGraph(kEngine, inputs, outputs);
+#endif
}
fIsReady = true;
@@ -1996,11 +2001,13 @@ void EngineInternalGraph::destroy() noexcept
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
+#if 0
+# if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
const MessageManagerLock mml;
-#endif
+# endif
delete fPatchbay;
fPatchbay = nullptr;
+#endif
}
fIsReady = false;
@@ -2018,7 +2025,9 @@ void EngineInternalGraph::setBufferSize(const uint32_t bufferSize)
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->setBufferSize(bufferSize);
+#endif
}
}
@@ -2033,7 +2042,9 @@ void EngineInternalGraph::setSampleRate(const double sampleRate)
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->setSampleRate(sampleRate);
+#endif
}
}
@@ -2049,7 +2060,9 @@ void EngineInternalGraph::setOffline(const bool offline)
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->setOffline(offline);
+#endif
}
}
@@ -2082,7 +2095,9 @@ void EngineInternalGraph::process(CarlaEngine::ProtectedData* const data, const
else
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->process(data, inBuf, outBuf, static_cast(frames));
+#endif
}
}
@@ -2100,46 +2115,60 @@ void EngineInternalGraph::processRack(CarlaEngine::ProtectedData* const data, co
void EngineInternalGraph::addPlugin(CarlaPlugin* const plugin)
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->addPlugin(plugin);
+#endif
}
void EngineInternalGraph::replacePlugin(CarlaPlugin* const oldPlugin, CarlaPlugin* const newPlugin)
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->replacePlugin(oldPlugin, newPlugin);
+#endif
}
void EngineInternalGraph::renamePlugin(CarlaPlugin* const plugin, const char* const newName)
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->renamePlugin(plugin, newName);
+#endif
}
void EngineInternalGraph::removePlugin(CarlaPlugin* const plugin)
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->removePlugin(plugin);
+#endif
}
void EngineInternalGraph::removeAllPlugins()
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->removeAllPlugins();
+#endif
}
bool EngineInternalGraph::isUsingExternal() const noexcept
{
- if (fIsRack)
+// if (fIsRack)
return true;
+#if 0
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr, false);
return fPatchbay->usingExternal;
+#endif
}
void EngineInternalGraph::setUsingExternal(const bool usingExternal) noexcept
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
+#if 0
fPatchbay->usingExternal = usingExternal;
+#endif
}
// -----------------------------------------------------------------------
@@ -2147,7 +2176,7 @@ void EngineInternalGraph::setUsingExternal(const bool usingExternal) noexcept
bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uint groupB, const uint portB)
{
- CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY, false);
+ CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK, false);
CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false);
carla_debug("CarlaEngine::patchbayConnect(%u, %u, %u, %u)", groupA, portA, groupB, portB);
@@ -2163,7 +2192,9 @@ bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uin
PatchbayGraph* const graph = pData->graph.getPatchbayGraph();
CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false);
+#if 0
return graph->connect(graph->usingExternal, groupA, portA, groupB, portB, true);
+#endif
}
return false;
@@ -2171,7 +2202,7 @@ bool CarlaEngine::patchbayConnect(const uint groupA, const uint portA, const uin
bool CarlaEngine::patchbayDisconnect(const uint connectionId)
{
- CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY, false);
+ CARLA_SAFE_ASSERT_RETURN(pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK, false);
CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false);
carla_debug("CarlaEngine::patchbayDisconnect(%u)", connectionId);
@@ -2187,17 +2218,16 @@ bool CarlaEngine::patchbayDisconnect(const uint connectionId)
PatchbayGraph* const graph = pData->graph.getPatchbayGraph();
CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false);
+#if 0
return graph->disconnect(connectionId);
+#endif
}
return false;
}
-bool CarlaEngine::patchbayRefresh(const bool external)
+bool CarlaEngine::patchbayRefresh()
{
- // subclasses should handle this
- CARLA_SAFE_ASSERT_RETURN(! external, false);
-
if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
// This is implemented in engine subclasses
@@ -2205,15 +2235,6 @@ bool CarlaEngine::patchbayRefresh(const bool external)
return false;
}
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- PatchbayGraph* const graph = pData->graph.getPatchbayGraph();
- CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false);
-
- graph->refresh("");
- return true;
- }
-
setLastError("Unsupported operation");
return false;
}
@@ -2238,7 +2259,9 @@ const char* const* CarlaEngine::getPatchbayConnections(const bool external) cons
PatchbayGraph* const graph = pData->graph.getPatchbayGraph();
CARLA_SAFE_ASSERT_RETURN(graph != nullptr, nullptr);
+#if 0
return graph->getConnections(external);
+#endif
}
return nullptr;
@@ -2272,12 +2295,14 @@ void CarlaEngine::restorePatchbayConnection(const bool external, const char* con
PatchbayGraph* const graph = pData->graph.getPatchbayGraph();
CARLA_SAFE_ASSERT_RETURN(graph != nullptr,);
+#if 0
if (! graph->getGroupAndPortIdFromFullName(external, sourcePort, groupA, portA))
return;
if (! graph->getGroupAndPortIdFromFullName(external, targetPort, groupB, portB))
return;
graph->connect(external, groupA, portA, groupB, portB, sendCallback);
+#endif
}
}
diff --git a/source/backend/engine/CarlaEngineGraph.hpp b/source/backend/engine/CarlaEngineGraph.hpp
index 1f2b4e208..687cb9717 100644
--- a/source/backend/engine/CarlaEngineGraph.hpp
+++ b/source/backend/engine/CarlaEngineGraph.hpp
@@ -24,16 +24,7 @@
#include "CarlaStringList.hpp"
#include "AppConfig.h"
-#include "juce_audio_processors/juce_audio_processors.h"
-
-#if 1
-typedef juce::AudioProcessorGraph CarlaAudioProcessorGraph;
-#else
-typedef juce::AudioProcessorGraphMultiThreaded CarlaAudioProcessorGraph;
-#endif
-
-using juce::AudioSampleBuffer;
-using juce::MidiBuffer;
+#include "juce_audio_basics/juce_audio_basics.h"
CARLA_BACKEND_START_NAMESPACE
@@ -148,6 +139,12 @@ struct RackGraph {
CARLA_DECLARE_NON_COPY_CLASS(RackGraph)
};
+#if 0
+typedef juce::AudioProcessorGraph CarlaAudioProcessorGraph;
+
+using juce::AudioSampleBuffer;
+using juce::MidiBuffer;
+
// -----------------------------------------------------------------------
// PatchbayGraph
@@ -189,6 +186,7 @@ struct PatchbayGraph {
CarlaEngine* const kEngine;
CARLA_DECLARE_NON_COPY_CLASS(PatchbayGraph)
};
+#endif
// -----------------------------------------------------------------------
diff --git a/source/backend/engine/CarlaEngineInternal.cpp b/source/backend/engine/CarlaEngineInternal.cpp
index be7950ce0..c38f5739d 100644
--- a/source/backend/engine/CarlaEngineInternal.cpp
+++ b/source/backend/engine/CarlaEngineInternal.cpp
@@ -464,13 +464,6 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName)
switch (options.processMode)
{
- case ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
- maxPluginNumber = MAX_RACK_PLUGINS;
- options.forceStereo = true;
- break;
- case ENGINE_PROCESS_MODE_PATCHBAY:
- maxPluginNumber = MAX_PATCHBAY_PLUGINS;
- break;
case ENGINE_PROCESS_MODE_BRIDGE:
maxPluginNumber = 1;
break;
@@ -482,7 +475,6 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName)
switch (options.processMode)
{
case ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
- case ENGINE_PROCESS_MODE_PATCHBAY:
case ENGINE_PROCESS_MODE_BRIDGE:
events.in = new EngineEvent[kMaxEngineEventInternalCount];
events.out = new EngineEvent[kMaxEngineEventInternalCount];
diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp
index b166ec16d..9245c847e 100644
--- a/source/backend/engine/CarlaEngineJack.cpp
+++ b/source/backend/engine/CarlaEngineJack.cpp
@@ -811,7 +811,6 @@ public:
CarlaThread("CarlaEngineJackCallbacks"),
#endif
fClient(nullptr),
- fExternalPatchbay(true),
fFreewheel(false),
#ifdef BUILD_BRIDGE
fIsRunning(false)
@@ -888,8 +887,7 @@ public:
CARLA_SAFE_ASSERT_RETURN(jackbridge_is_ok(), false);
carla_debug("CarlaEngineJack::init(\"%s\")", clientName);
- fFreewheel = false;
- fExternalPatchbay = true;
+ fFreewheel = false;
CarlaString truncatedClientName(clientName);
truncatedClientName.truncate(getMaxClientNameSize());
@@ -956,16 +954,14 @@ public:
fTimebaseMaster = jackbridge_set_timebase_callback(fClient, true, carla_jack_timebase_callback, this);
- if (pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY)
- initJackPatchbay(jackClientName);
+ initJackPatchbay(jackClientName);
jackbridge_set_client_registration_callback(fClient, carla_jack_client_registration_callback, this);
jackbridge_set_port_registration_callback(fClient, carla_jack_port_registration_callback, this);
jackbridge_set_port_connect_callback(fClient, carla_jack_port_connect_callback, this);
jackbridge_set_port_rename_callback(fClient, carla_jack_port_rename_callback, this);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
fRackPorts[kRackPortAudioIn1] = jackbridge_port_register(fClient, "audio-in1", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
fRackPorts[kRackPortAudioIn2] = jackbridge_port_register(fClient, "audio-in2", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput, 0);
@@ -974,15 +970,8 @@ public:
fRackPorts[kRackPortEventIn] = jackbridge_port_register(fClient, "events-in", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput, 0);
fRackPorts[kRackPortEventOut] = jackbridge_port_register(fClient, "events-out", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput, 0);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
- {
- pData->graph.create(0, 0);
- }
- else
- {
- pData->graph.create(2, 2);
- patchbayRefresh(false);
- }
+ // FIXME
+ pData->graph.create(0, 0);
}
if (jackbridge_activate(fClient))
@@ -992,11 +981,8 @@ public:
return true;
}
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
pData->graph.destroy();
- }
pData->close();
jackbridge_client_close(fClient);
@@ -1035,8 +1021,7 @@ public:
fPostPonedEvents.clear();
// clear rack/patchbay stuff
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
if (deactivated)
{
@@ -1128,7 +1113,7 @@ public:
#ifndef BUILD_BRIDGE
const char* renamePlugin(const uint id, const char* const newName) override
{
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
+ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
return CarlaEngine::renamePlugin(id, newName);
CARLA_SAFE_ASSERT_RETURN(pData->plugins != nullptr, nullptr);
@@ -1277,9 +1262,6 @@ public:
{
CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay)
- return CarlaEngine::patchbayConnect(groupA, portA, groupB, portB);
-
const char* const fullPortNameA = fUsedPorts.getFullPortName(groupA, portA);
CARLA_SAFE_ASSERT_RETURN(fullPortNameA != nullptr && fullPortNameA[0] != '\0', false);
@@ -1299,9 +1281,6 @@ public:
{
CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! fExternalPatchbay)
- return CarlaEngine::patchbayDisconnect(connectionId);
-
ConnectionToId connectionToId = { 0, 0, 0, 0, 0 };
{
@@ -1338,19 +1317,10 @@ public:
return true;
}
- bool patchbayRefresh(const bool external) override
+ bool patchbayRefresh() override
{
CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, false);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- fExternalPatchbay = external;
- pData->graph.setUsingExternal(external);
-
- if (! external)
- return CarlaEngine::patchbayRefresh(false);
- }
-
fUsedGroups.clear();
fUsedPorts.clear();
fUsedConnections.clear();
@@ -1443,9 +1413,6 @@ public:
CARLA_SAFE_ASSERT_RETURN(fClient != nullptr, nullptr);
carla_debug("CarlaEngineJack::getPatchbayConnections(%s)", bool2str(external));
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! external)
- return CarlaEngine::getPatchbayConnections(external);
-
CarlaStringList connList;
if (const char** const ports = jackbridge_get_ports(fClient, nullptr, nullptr, JackPortIsOutput))
@@ -1487,9 +1454,6 @@ public:
CARLA_SAFE_ASSERT_RETURN(connTarget != nullptr && connTarget[0] != '\0',);
carla_debug("CarlaEngineJack::restorePatchbayConnection(\"%s\", \"%s\")", connSource, connTarget);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY && ! external)
- return CarlaEngine::restorePatchbayConnection(external, connSource, connTarget, sendCallback);
-
if (const jack_port_t* const port = jackbridge_port_by_name(fClient, connSource))
{
if (jackbridge_port_by_name(fClient, connTarget) == nullptr)
@@ -1640,8 +1604,7 @@ protected:
}
}
}
- else if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK ||
- pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
+ else if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
CARLA_SAFE_ASSERT_RETURN(pData->events.in != nullptr,);
CARLA_SAFE_ASSERT_RETURN(pData->events.out != nullptr,);
@@ -1761,9 +1724,6 @@ protected:
{
CARLA_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',);
- // ignore this if on internal patchbay mode
- if (! fExternalPatchbay) return;
-
// do nothing on client registration, wait for first port
if (reg) return;
@@ -1781,9 +1741,6 @@ protected:
void handleJackPortRegistrationCallback(const jack_port_id_t port, const bool reg)
{
- // ignore this if on internal patchbay mode
- if (! fExternalPatchbay) return;
-
const jack_port_t* const jackPort(jackbridge_port_by_id(fClient, port));
CARLA_SAFE_ASSERT_RETURN(jackPort != nullptr,);
@@ -1836,9 +1793,6 @@ protected:
void handleJackPortConnectCallback(const jack_port_id_t a, const jack_port_id_t b, const bool connect)
{
- // ignore this if on internal patchbay mode
- if (! fExternalPatchbay) return;
-
const jack_port_t* const jackPortA(jackbridge_port_by_id(fClient, a));
CARLA_SAFE_ASSERT_RETURN(jackPortA != nullptr,);
@@ -1904,9 +1858,6 @@ protected:
CARLA_SAFE_ASSERT_RETURN(oldFullName != nullptr && oldFullName[0] != '\0',);
CARLA_SAFE_ASSERT_RETURN(newFullName != nullptr && newFullName[0] != '\0',);
- // ignore this if on internal patchbay mode
- if (! fExternalPatchbay) return;
-
const jack_port_t* const jackPort(jackbridge_port_by_id(fClient, port));
CARLA_SAFE_ASSERT_RETURN(jackPort != nullptr,);
@@ -1991,7 +1942,6 @@ protected:
private:
jack_client_t* fClient;
- bool fExternalPatchbay;
bool fFreewheel;
// -------------------------------------------------------------------
@@ -2072,7 +2022,6 @@ private:
void initJackPatchbay(const char* const ourName)
{
- CARLA_SAFE_ASSERT_RETURN(pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY || fExternalPatchbay,);
CARLA_SAFE_ASSERT_RETURN(ourName != nullptr && ourName[0] != '\0',);
StringArray parsedGroups;
diff --git a/source/backend/engine/CarlaEngineJuce.cpp b/source/backend/engine/CarlaEngineJuce.cpp
deleted file mode 100644
index 553c211ad..000000000
--- a/source/backend/engine/CarlaEngineJuce.cpp
+++ /dev/null
@@ -1,941 +0,0 @@
-/*
- * Carla Plugin Host
- * Copyright (C) 2011-2017 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 GPL.txt file
- */
-
-#include "CarlaEngineGraph.hpp"
-#include "CarlaEngineInternal.hpp"
-#include "CarlaBackendUtils.hpp"
-#include "CarlaStringList.hpp"
-
-#include "RtLinkedList.hpp"
-
-#include "juce_audio_devices/juce_audio_devices.h"
-
-using namespace juce;
-
-CARLA_BACKEND_START_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
-
-struct MidiInPort {
- MidiInput* port;
- char name[STR_MAX+1];
-};
-
-struct MidiOutPort {
- MidiOutput* port;
- char name[STR_MAX+1];
-};
-
-struct RtMidiEvent {
- uint64_t time; // needs to compare to internal time
- uint8_t size;
- uint8_t data[EngineMidiEvent::kDataSize];
-};
-
-// -------------------------------------------------------------------------------------------------------------------
-// Fallback data
-
-static const MidiInPort kMidiInPortFallback = { nullptr, { '\0' } };
-static /* */ MidiInPort kMidiInPortFallbackNC = { nullptr, { '\0' } };
-static const MidiOutPort kMidiOutPortFallback = { nullptr, { '\0' } };
-static /* */ MidiOutPort kMidiOutPortFallbackNC = { nullptr, { '\0' } };
-static const RtMidiEvent kRtMidiEventFallback = { 0, 0, { 0 } };
-
-// -------------------------------------------------------------------------------------------------------------------
-// Global static data
-
-static CharStringListPtr gDeviceNames;
-static OwnedArray gDeviceTypes;
-
-struct JuceCleanup : public DeletedAtShutdown {
- JuceCleanup() noexcept {}
- ~JuceCleanup()
- {
- gDeviceTypes.clear(true);
- }
-};
-
-// -------------------------------------------------------------------------------------------------------------------
-// Cleanup
-
-static void initJuceDevicesIfNeeded()
-{
- static AudioDeviceManager sDeviceManager;
-
- if (gDeviceTypes.size() != 0)
- return;
-
- sDeviceManager.createAudioDeviceTypes(gDeviceTypes);
-
- CARLA_SAFE_ASSERT_RETURN(gDeviceTypes.size() != 0,);
-
- new JuceCleanup();
-
- // remove JACK from device list
- for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
- {
- if (gDeviceTypes[i]->getTypeName() == "JACK")
- {
- gDeviceTypes.remove(i, true);
- break;
- }
- }
-}
-
-// -------------------------------------------------------------------------------------------------------------------
-// Juce Engine
-
-class CarlaEngineJuce : public CarlaEngine,
- public AudioIODeviceCallback,
- public MidiInputCallback
-{
-public:
- CarlaEngineJuce(AudioIODeviceType* const devType)
- : CarlaEngine(),
- AudioIODeviceCallback(),
- fDevice(),
- fDeviceType(devType),
- fMidiIns(),
- fMidiInEvents(),
- fMidiOuts(),
- fMidiOutMutex()
- {
- carla_debug("CarlaEngineJuce::CarlaEngineJuce(%p)", devType);
-
- // just to make sure
- pData->options.transportMode = ENGINE_TRANSPORT_MODE_INTERNAL;
- }
-
- ~CarlaEngineJuce() override
- {
- carla_debug("CarlaEngineJuce::~CarlaEngineJuce()");
- }
-
- // -------------------------------------
-
- bool init(const char* const clientName) override
- {
- CARLA_SAFE_ASSERT_RETURN(clientName != nullptr && clientName[0] != '\0', false);
- carla_debug("CarlaEngineJuce::init(\"%s\")", clientName);
-
- if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK && pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY)
- {
- setLastError("Invalid process mode");
- return false;
- }
-
- String deviceName;
-
- if (pData->options.audioDevice != nullptr && pData->options.audioDevice[0] != '\0')
- {
- deviceName = pData->options.audioDevice;
- }
- else
- {
- const int defaultIndex(fDeviceType->getDefaultDeviceIndex(false));
- StringArray deviceNames(fDeviceType->getDeviceNames());
-
- if (defaultIndex >= 0 && defaultIndex < deviceNames.size())
- deviceName = deviceNames[defaultIndex];
- }
-
- if (deviceName.isEmpty())
- {
- setLastError("Audio device has not been selected yet and a default one is not available");
- return false;
- }
-
- fDevice = fDeviceType->createDevice(deviceName, deviceName);
-
- if (fDevice == nullptr)
- {
- setLastError("Failed to create device");
- return false;
- }
-
- StringArray inputNames(fDevice->getInputChannelNames());
- StringArray outputNames(fDevice->getOutputChannelNames());
-
- if (inputNames.size() < 0 || outputNames.size() <= 0)
- {
- setLastError("Selected device does not have any outputs");
- return false;
- }
-
- BigInteger inputChannels;
- inputChannels.setRange(0, inputNames.size(), true);
-
- BigInteger outputChannels;
- outputChannels.setRange(0, outputNames.size(), true);
-
- String error = fDevice->open(inputChannels, outputChannels, pData->options.audioSampleRate, static_cast(pData->options.audioBufferSize));
-
- if (error.isNotEmpty())
- {
- setLastError(error.toUTF8());
- fDevice = nullptr;
- return false;
- }
-
- if (! pData->init(clientName))
- {
- close();
- setLastError("Failed to init internal data");
- return false;
- }
-
- pData->bufferSize = static_cast(fDevice->getCurrentBufferSizeSamples());
- pData->sampleRate = fDevice->getCurrentSampleRate();
- pData->initTime(pData->options.transportExtra);
-
- pData->graph.create(static_cast(inputNames.size()), static_cast(outputNames.size()));
-
- fDevice->start(this);
-
- patchbayRefresh(false);
-
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- refreshExternalGraphPorts(pData->graph.getPatchbayGraph(), false);
-
- callback(ENGINE_CALLBACK_ENGINE_STARTED, 0, pData->options.processMode, pData->options.transportMode, 0.0f, getCurrentDriverName());
- return true;
- }
-
- bool close() override
- {
- carla_debug("CarlaEngineJuce::close()");
-
- bool hasError = false;
-
- // stop stream first
- if (fDevice != nullptr && fDevice->isPlaying())
- fDevice->stop();
-
- // clear engine data
- CarlaEngine::close();
-
- pData->graph.destroy();
-
- for (LinkedList::Itenerator it = fMidiIns.begin2(); it.valid(); it.next())
- {
- MidiInPort& inPort(it.getValue(kMidiInPortFallbackNC));
- CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr);
-
- inPort.port->stop();
- delete inPort.port;
- }
-
- fMidiIns.clear();
- fMidiInEvents.clear();
-
- fMidiOutMutex.lock();
-
- for (LinkedList::Itenerator it = fMidiOuts.begin2(); it.valid(); it.next())
- {
- MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC));
- CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr);
-
- outPort.port->stopBackgroundThread();
- delete outPort.port;
- }
-
- fMidiOuts.clear();
- fMidiOutMutex.unlock();
-
- // close stream
- if (fDevice != nullptr)
- {
- if (fDevice->isOpen())
- fDevice->close();
-
- fDevice = nullptr;
- }
-
- return !hasError;
- }
-
- bool isRunning() const noexcept override
- {
- return fDevice != nullptr && fDevice->isOpen();
- }
-
- bool isOffline() const noexcept override
- {
- return false;
- }
-
- EngineType getType() const noexcept override
- {
- return kEngineTypeJuce;
- }
-
- const char* getCurrentDriverName() const noexcept override
- {
- return fDeviceType->getTypeName().toRawUTF8();
- }
-
- // -------------------------------------------------------------------
- // Patchbay
-
- template
- bool refreshExternalGraphPorts(Graph* const graph, const bool sendCallback)
- {
- CARLA_SAFE_ASSERT_RETURN(graph != nullptr, false);
-
- char strBuf[STR_MAX+1];
- strBuf[STR_MAX] = '\0';
-
- ExternalGraph& extGraph(graph->extGraph);
-
- // ---------------------------------------------------------------
- // clear last ports
-
- extGraph.clear();
-
- // ---------------------------------------------------------------
- // fill in new ones
-
- // Audio In
- {
- StringArray inputNames(fDevice->getInputChannelNames());
-
- for (int i=0, count=inputNames.size(); igetOutputChannelNames());
-
- for (int i=0, count=outputNames.size(); igetName());
-
- if (deviceName.isNotEmpty())
- deviceName = deviceName.dropLastCharacters(deviceName.fromFirstOccurrenceOf(", ", true, false).length());
-
- graph->refresh(deviceName.toRawUTF8());
- }
-
- // ---------------------------------------------------------------
- // add midi connections
-
- for (LinkedList::Itenerator it=fMidiIns.begin2(); it.valid(); it.next())
- {
- const MidiInPort& inPort(it.getValue(kMidiInPortFallback));
- CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr);
-
- const uint portId(extGraph.midiPorts.getPortId(true, inPort.name));
- CARLA_SAFE_ASSERT_CONTINUE(portId < extGraph.midiPorts.ins.count());
-
- ConnectionToId connectionToId;
- connectionToId.setData(++(extGraph.connections.lastId), kExternalGraphGroupMidiIn, portId, kExternalGraphGroupCarla, kExternalGraphCarlaPortMidiIn);
-
- std::snprintf(strBuf, STR_MAX, "%i:%i:%i:%i", connectionToId.groupA, connectionToId.portA, connectionToId.groupB, connectionToId.portB);
-
- callback(ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED, connectionToId.id, 0, 0, 0.0f, strBuf);
-
- extGraph.connections.list.append(connectionToId);
- }
-
- fMidiOutMutex.lock();
-
- for (LinkedList::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next())
- {
- const MidiOutPort& outPort(it.getValue(kMidiOutPortFallback));
- CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr);
-
- const uint portId(extGraph.midiPorts.getPortId(false, outPort.name));
- CARLA_SAFE_ASSERT_CONTINUE(portId < extGraph.midiPorts.outs.count());
-
- ConnectionToId connectionToId;
- connectionToId.setData(++(extGraph.connections.lastId), kExternalGraphGroupCarla, kExternalGraphCarlaPortMidiOut, kExternalGraphGroupMidiOut, portId);
-
- std::snprintf(strBuf, STR_MAX, "%i:%i:%i:%i", connectionToId.groupA, connectionToId.portA, connectionToId.groupB, connectionToId.portB);
-
- callback(ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED, connectionToId.id, 0, 0, 0.0f, strBuf);
-
- extGraph.connections.list.append(connectionToId);
- }
-
- fMidiOutMutex.unlock();
-
- return true;
- }
-
- bool patchbayRefresh(const bool external) override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false);
-
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
- {
- return refreshExternalGraphPorts(pData->graph.getRackGraph(), true);
- }
- else
- {
- pData->graph.setUsingExternal(external);
-
- if (external)
- return refreshExternalGraphPorts(pData->graph.getPatchbayGraph(), true);
- else
- return CarlaEngine::patchbayRefresh(false);
- }
-
- return false;
- }
-
- // -------------------------------------------------------------------
-
-protected:
- void audioDeviceIOCallback(const float** inputChannelData, int numInputChannels, float** outputChannelData,
- int numOutputChannels, int numSamples) override
- {
- const PendingRtEventsRunner prt(this, numSamples);
-
- // assert juce buffers
- CARLA_SAFE_ASSERT_RETURN(numInputChannels >= 0,);
- CARLA_SAFE_ASSERT_RETURN(numOutputChannels > 0,);
- CARLA_SAFE_ASSERT_RETURN(outputChannelData != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(numSamples == static_cast(pData->bufferSize),);
-
- const uint32_t nframes(static_cast(numSamples));
-
- // initialize juce output
- for (int i=0; i < numOutputChannels; ++i)
- FloatVectorOperations::clear(outputChannelData[i], numSamples);
-
- // initialize events
- carla_zeroStructs(pData->events.in, kMaxEngineEventInternalCount);
- carla_zeroStructs(pData->events.out, kMaxEngineEventInternalCount);
-
- if (fMidiInEvents.mutex.tryLock())
- {
- uint32_t engineEventIndex = 0;
- fMidiInEvents.splice();
-
- for (LinkedList::Itenerator it = fMidiInEvents.data.begin2(); it.valid(); it.next())
- {
- const RtMidiEvent& midiEvent(it.getValue(kRtMidiEventFallback));
- CARLA_SAFE_ASSERT_CONTINUE(midiEvent.size > 0);
-
- EngineEvent& engineEvent(pData->events.in[engineEventIndex++]);
-
- if (midiEvent.time < pData->timeInfo.frame)
- {
- engineEvent.time = 0;
- }
- else if (midiEvent.time >= pData->timeInfo.frame + nframes)
- {
- carla_stderr("MIDI Event in the future!, %i vs %i", engineEvent.time, pData->timeInfo.frame);
- engineEvent.time = static_cast(pData->timeInfo.frame) + nframes - 1;
- }
- else
- engineEvent.time = static_cast(midiEvent.time - pData->timeInfo.frame);
-
- engineEvent.fillFromMidiData(midiEvent.size, midiEvent.data, 0);
-
- if (engineEventIndex >= kMaxEngineEventInternalCount)
- break;
- }
-
- fMidiInEvents.data.clear();
- fMidiInEvents.mutex.unlock();
- }
-
- pData->graph.process(pData, inputChannelData, outputChannelData, nframes);
-
- fMidiOutMutex.lock();
-
- if (fMidiOuts.count() > 0)
- {
- uint8_t size = 0;
- uint8_t data[3] = { 0, 0, 0 };
- const uint8_t* dataPtr = data;
-
- for (ushort i=0; i < kMaxEngineEventInternalCount; ++i)
- {
- const EngineEvent& engineEvent(pData->events.out[i]);
-
- if (engineEvent.type == kEngineEventTypeNull)
- break;
-
- else if (engineEvent.type == kEngineEventTypeControl)
- {
- const EngineControlEvent& ctrlEvent(engineEvent.ctrl);
- ctrlEvent.convertToMidiData(engineEvent.channel, size, data);
- dataPtr = data;
- }
- else if (engineEvent.type == kEngineEventTypeMidi)
- {
- const EngineMidiEvent& midiEvent(engineEvent.midi);
-
- size = midiEvent.size;
-
- if (size > EngineMidiEvent::kDataSize && midiEvent.dataExt != nullptr)
- dataPtr = midiEvent.dataExt;
- else
- dataPtr = midiEvent.data;
- }
- else
- {
- continue;
- }
-
- if (size > 0)
- {
- MidiMessage message(static_cast(dataPtr), static_cast(size), static_cast(engineEvent.time)/nframes);
-
- for (LinkedList::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next())
- {
- MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC));
- CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr);
-
- outPort.port->sendMessageNow(message);
- }
- }
- }
- }
-
- fMidiOutMutex.unlock();
- }
-
- void audioDeviceAboutToStart(AudioIODevice* /*device*/) override
- {
- }
-
- void audioDeviceStopped() override
- {
- }
-
- void audioDeviceError(const String& errorMessage) override
- {
- callback(ENGINE_CALLBACK_ERROR, 0, 0, 0, 0.0f, errorMessage.toRawUTF8());
- }
-
- // -------------------------------------------------------------------
-
- void handleIncomingMidiMessage(MidiInput* /*source*/, const MidiMessage& message) override
- {
- const int messageSize(message.getRawDataSize());
-
- if (messageSize <= 0 || messageSize > EngineMidiEvent::kDataSize)
- return;
-
- const uint8_t* const messageData(message.getRawData());
-
- RtMidiEvent midiEvent;
- midiEvent.time = 0; // TODO
-
- midiEvent.size = static_cast(messageSize);
-
- int i=0;
- for (; i < messageSize; ++i)
- midiEvent.data[i] = messageData[i];
- for (; i < EngineMidiEvent::kDataSize; ++i)
- midiEvent.data[i] = 0;
-
- fMidiInEvents.append(midiEvent);
- }
-
- // -------------------------------------------------------------------
-
- bool connectExternalGraphPort(const uint connectionType, const uint portId, const char* const portName) override
- {
- CARLA_SAFE_ASSERT_RETURN(connectionType != 0 || (portName != nullptr && portName[0] != '\0'), false);
- carla_stdout("CarlaEngineJuce::connectExternalGraphPort(%u, %u, \"%s\")", connectionType, portId, portName);
-
- switch (connectionType)
- {
- case kExternalGraphConnectionAudioIn1:
- case kExternalGraphConnectionAudioIn2:
- case kExternalGraphConnectionAudioOut1:
- case kExternalGraphConnectionAudioOut2:
- return CarlaEngine::connectExternalGraphPort(connectionType, portId, portName);
-
- case kExternalGraphConnectionMidiInput: {
- StringArray midiIns(MidiInput::getDevices());
-
- if (! midiIns.contains(portName))
- return false;
-
- MidiInput* const juceMidiIn(MidiInput::openDevice(midiIns.indexOf(portName), this));
- juceMidiIn->start();
-
- MidiInPort midiPort;
- midiPort.port = juceMidiIn;
-
- std::strncpy(midiPort.name, portName, STR_MAX);
- midiPort.name[STR_MAX] = '\0';
-
- fMidiIns.append(midiPort);
- return true;
- } break;
-
- case kExternalGraphConnectionMidiOutput: {
- StringArray midiOuts(MidiOutput::getDevices());
-
- if (! midiOuts.contains(portName))
- return false;
-
- MidiOutput* const juceMidiOut(MidiOutput::openDevice(midiOuts.indexOf(portName)));
- juceMidiOut->startBackgroundThread();
-
- MidiOutPort midiPort;
- midiPort.port = juceMidiOut;
-
- std::strncpy(midiPort.name, portName, STR_MAX);
- midiPort.name[STR_MAX] = '\0';
-
- const CarlaMutexLocker cml(fMidiOutMutex);
-
- fMidiOuts.append(midiPort);
- return true;
- } break;
- }
-
- return false;
- }
-
- bool disconnectExternalGraphPort(const uint connectionType, const uint portId, const char* const portName) override
- {
- CARLA_SAFE_ASSERT_RETURN(connectionType != 0 || (portName != nullptr && portName[0] != '\0'), false);
- carla_debug("CarlaEngineJuce::disconnectExternalGraphPort(%u, %u, \"%s\")", connectionType, portId, portName);
-
- switch (connectionType)
- {
- case kExternalGraphConnectionAudioIn1:
- case kExternalGraphConnectionAudioIn2:
- case kExternalGraphConnectionAudioOut1:
- case kExternalGraphConnectionAudioOut2:
- return CarlaEngine::disconnectExternalGraphPort(connectionType, portId, portName);
-
- case kExternalGraphConnectionMidiInput:
- for (LinkedList::Itenerator it=fMidiIns.begin2(); it.valid(); it.next())
- {
- MidiInPort& inPort(it.getValue(kMidiInPortFallbackNC));
- CARLA_SAFE_ASSERT_CONTINUE(inPort.port != nullptr);
-
- if (std::strcmp(inPort.name, portName) != 0)
- continue;
-
- inPort.port->stop();
- delete inPort.port;
-
- fMidiIns.remove(it);
- return true;
- }
- break;
-
- case kExternalGraphConnectionMidiOutput: {
- const CarlaMutexLocker cml(fMidiOutMutex);
-
- for (LinkedList::Itenerator it=fMidiOuts.begin2(); it.valid(); it.next())
- {
- MidiOutPort& outPort(it.getValue(kMidiOutPortFallbackNC));
- CARLA_SAFE_ASSERT_CONTINUE(outPort.port != nullptr);
-
- if (std::strcmp(outPort.name, portName) != 0)
- continue;
-
- outPort.port->stopBackgroundThread();
- delete outPort.port;
-
- fMidiOuts.remove(it);
- return true;
- }
- } break;
- }
-
- return false;
- }
-
- // -------------------------------------
-
-private:
- ScopedPointer fDevice;
- AudioIODeviceType* const fDeviceType;
-
- struct RtMidiEvents {
- CarlaMutex mutex;
- RtLinkedList::Pool dataPool;
- RtLinkedList data;
- RtLinkedList dataPending;
-
- RtMidiEvents()
- : mutex(),
- dataPool(512, 512),
- data(dataPool),
- dataPending(dataPool) {}
-
- ~RtMidiEvents()
- {
- clear();
- }
-
- void append(const RtMidiEvent& event)
- {
- mutex.lock();
- dataPending.append(event);
- mutex.unlock();
- }
-
- void clear()
- {
- mutex.lock();
- data.clear();
- dataPending.clear();
- mutex.unlock();
- }
-
- void splice()
- {
- if (dataPending.count() > 0)
- dataPending.moveTo(data, true /* append */);
- }
- };
-
- LinkedList fMidiIns;
- RtMidiEvents fMidiInEvents;
-
- LinkedList fMidiOuts;
- CarlaMutex fMidiOutMutex;
-
- CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineJuce)
-};
-
-// -----------------------------------------
-
-CarlaEngine* CarlaEngine::newJuce(const AudioApi api)
-{
- initJuceDevicesIfNeeded();
-
- String juceApi;
-
- switch (api)
- {
- case AUDIO_API_NULL:
- case AUDIO_API_OSS:
- case AUDIO_API_PULSE:
- break;
- case AUDIO_API_JACK:
- juceApi = "JACK";
- break;
- case AUDIO_API_ALSA:
- juceApi = "ALSA";
- break;
- case AUDIO_API_CORE:
- juceApi = "CoreAudio";
- break;
- case AUDIO_API_ASIO:
- juceApi = "ASIO";
- break;
- case AUDIO_API_DS:
- juceApi = "DirectSound";
- break;
- }
-
- if (juceApi.isEmpty())
- return nullptr;
-
- AudioIODeviceType* deviceType = nullptr;
-
- for (int i=0, count=gDeviceTypes.size(); i < count; ++i)
- {
- deviceType = gDeviceTypes[i];
-
- if (deviceType == nullptr || deviceType->getTypeName() == juceApi)
- break;
- }
-
- if (deviceType == nullptr)
- return nullptr;
-
- deviceType->scanForDevices();
-
- return new CarlaEngineJuce(deviceType);
-}
-
-uint CarlaEngine::getJuceApiCount()
-{
- initJuceDevicesIfNeeded();
-
- return static_cast(gDeviceTypes.size());
-}
-
-const char* CarlaEngine::getJuceApiName(const uint uindex)
-{
- initJuceDevicesIfNeeded();
-
- const int index(static_cast(uindex));
-
- CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
-
- AudioIODeviceType* const deviceType(gDeviceTypes[index]);
- CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr);
-
- return deviceType->getTypeName().toRawUTF8();
-}
-
-const char* const* CarlaEngine::getJuceApiDeviceNames(const uint uindex)
-{
- initJuceDevicesIfNeeded();
-
- const int index(static_cast(uindex));
-
- CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
-
- AudioIODeviceType* const deviceType(gDeviceTypes[index]);
- CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr);
-
- deviceType->scanForDevices();
-
- StringArray juceDeviceNames(deviceType->getDeviceNames());
- const int juceDeviceNameCount(juceDeviceNames.size());
-
- if (juceDeviceNameCount <= 0)
- return nullptr;
-
- CarlaStringList devNames;
-
- for (int i=0; i < juceDeviceNameCount; ++i)
- devNames.append(juceDeviceNames[i].toRawUTF8());
-
- gDeviceNames = devNames.toCharStringListPtr();
-
- return gDeviceNames;
-}
-
-const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint uindex, const char* const deviceName)
-{
- initJuceDevicesIfNeeded();
-
- const int index(static_cast(uindex));
-
- CARLA_SAFE_ASSERT_RETURN(index < gDeviceTypes.size(), nullptr);
-
- AudioIODeviceType* const deviceType(gDeviceTypes[index]);
- CARLA_SAFE_ASSERT_RETURN(deviceType != nullptr, nullptr);
-
- deviceType->scanForDevices();
-
- ScopedPointer device(deviceType->createDevice(deviceName, deviceName));
-
- if (device == nullptr)
- return nullptr;
-
- static EngineDriverDeviceInfo devInfo = { 0x0, nullptr, nullptr };
- static uint32_t dummyBufferSizes[11] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 0 };
- static double dummySampleRates[14] = { 22050.0, 32000.0, 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0, 0.0 };
-
- // reset
- devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE | ENGINE_DRIVER_DEVICE_VARIABLE_SAMPLE_RATE;
-
- // cleanup
- if (devInfo.bufferSizes != nullptr && devInfo.bufferSizes != dummyBufferSizes)
- {
- delete[] devInfo.bufferSizes;
- devInfo.bufferSizes = nullptr;
- }
-
- if (devInfo.sampleRates != nullptr && devInfo.sampleRates != dummySampleRates)
- {
- delete[] devInfo.sampleRates;
- devInfo.sampleRates = nullptr;
- }
-
- if (device->hasControlPanel())
- devInfo.hints |= ENGINE_DRIVER_DEVICE_HAS_CONTROL_PANEL;
-
- Array juceBufferSizes = device->getAvailableBufferSizes();
- if (int bufferSizesCount = juceBufferSizes.size())
- {
- uint32_t* const bufferSizes(new uint32_t[bufferSizesCount+1]);
-
- for (int i=0; i < bufferSizesCount; ++i)
- bufferSizes[i] = static_cast(juceBufferSizes[i]);
- bufferSizes[bufferSizesCount] = 0;
-
- devInfo.bufferSizes = bufferSizes;
- }
- else
- {
- devInfo.bufferSizes = dummyBufferSizes;
- }
-
- Array juceSampleRates = device->getAvailableSampleRates();
- if (int sampleRatesCount = juceSampleRates.size())
- {
- double* const sampleRates(new double[sampleRatesCount+1]);
-
- for (int i=0; i < sampleRatesCount; ++i)
- sampleRates[i] = juceSampleRates[i];
- sampleRates[sampleRatesCount] = 0.0;
-
- devInfo.sampleRates = sampleRates;
- }
- else
- {
- devInfo.sampleRates = dummySampleRates;
- }
-
- return &devInfo;
-}
-
-// -----------------------------------------
-
-CARLA_BACKEND_END_NAMESPACE
diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp
index 761554923..7e077c649 100644
--- a/source/backend/engine/CarlaEngineNative.cpp
+++ b/source/backend/engine/CarlaEngineNative.cpp
@@ -36,17 +36,9 @@
#include "juce_audio_basics/juce_audio_basics.h"
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# include "juce_gui_basics/juce_gui_basics.h"
-#else
-# include "juce_events/juce_events.h"
-#endif
-
using juce::File;
using juce::FloatVectorOperations;
using juce::MemoryOutputStream;
-using juce::MessageManager;
-using juce::ScopedJuceInitialiser_GUI;
using juce::ScopedPointer;
using juce::SharedResourcePointer;
using juce::String;
@@ -55,62 +47,6 @@ using juce::XmlElement;
CARLA_BACKEND_START_NAMESPACE
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
-
-static int numScopedInitInstances = 0;
-
-class SharedMessageThread : public juce::Thread
-{
-public:
- SharedMessageThread()
- : juce::Thread ("SharedMessageThread"),
- initialised (false) {}
-
- ~SharedMessageThread()
- {
- CARLA_SAFE_ASSERT(numScopedInitInstances == 0);
-
- // in case something fails
- MessageManager::getInstance()->stopDispatchLoop();
- waitForThreadToExit (5000);
- }
-
- void incRef()
- {
- if (numScopedInitInstances++ == 0)
- {
- startThread (7);
-
- while (! initialised)
- sleep (1);
- }
- }
-
- void decRef()
- {
- if (--numScopedInitInstances == 0)
- {
- MessageManager::getInstance()->stopDispatchLoop();
- waitForThreadToExit (5000);
- }
- }
-
-protected:
- void run() override
- {
- const ScopedJuceInitialiser_GUI juceInitialiser;
-
- MessageManager::getInstance()->setCurrentThreadAsMessageThread();
- initialised = true;
-
- MessageManager::getInstance()->runDispatchLoop();
- }
-
-private:
- volatile bool initialised;
-};
-#endif
-
// -----------------------------------------------------------------------
class CarlaEngineNativeUI : public CarlaExternalUI
@@ -225,7 +161,7 @@ protected:
else if (std::strcmp(msg, "patchbay_refresh") == 0)
{
try {
- ok = fEngine->patchbayRefresh(false);
+ ok = fEngine->patchbayRefresh();
} CARLA_SAFE_EXCEPTION("patchbayRefresh");
}
else if (std::strcmp(msg, "transport_play") == 0)
@@ -653,14 +589,9 @@ private:
class CarlaEngineNative : public CarlaEngine
{
public:
- CarlaEngineNative(const NativeHostDescriptor* const host, const bool isPatchbay, const uint32_t inChan = 2, uint32_t outChan = 0)
+ CarlaEngineNative(const NativeHostDescriptor* const host, const uint32_t inChan = 2, uint32_t outChan = 0)
: CarlaEngine(),
pHost(host),
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
- kNeedsJuceMsgThread(host->dispatcher(pHost->handle,
- NATIVE_HOST_OPCODE_INTERNAL_PLUGIN, 0, 0, nullptr, 0.0f) == 0),
-#endif
- kIsPatchbay(isPatchbay),
fIsActive(false),
fIsRunning(false),
fUiServer(this),
@@ -678,34 +609,15 @@ public:
if (outChan == 0)
outChan = inChan;
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
- if (kNeedsJuceMsgThread)
- fJuceMsgThread->incRef();
-#endif
-
- // set-up engine
- if (kIsPatchbay)
- {
- pData->options.processMode = ENGINE_PROCESS_MODE_PATCHBAY;
- pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN;
- pData->options.forceStereo = false;
- pData->options.preferPluginBridges = false;
- pData->options.preferUiBridges = false;
- init("Carla-Patchbay");
- pData->graph.create(inChan, outChan);
- }
- else
- {
- CARLA_SAFE_ASSERT(inChan == 2);
- CARLA_SAFE_ASSERT(outChan == 2);
- pData->options.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK;
- pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN;
- pData->options.forceStereo = true;
- pData->options.preferPluginBridges = false;
- pData->options.preferUiBridges = false;
- init("Carla-Rack");
- pData->graph.create(0, 0);
- }
+ CARLA_SAFE_ASSERT(inChan == 2);
+ CARLA_SAFE_ASSERT(outChan == 2);
+ pData->options.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK;
+ pData->options.transportMode = ENGINE_TRANSPORT_MODE_PLUGIN;
+ pData->options.forceStereo = true;
+ pData->options.preferPluginBridges = false;
+ pData->options.preferUiBridges = false;
+ init("Carla-Rack");
+ pData->graph.create(0, 0); // FIXME?
if (pData->options.resourceDir != nullptr)
delete[] pData->options.resourceDir;
@@ -732,11 +644,6 @@ public:
pData->graph.destroy();
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
- if (kNeedsJuceMsgThread)
- fJuceMsgThread->decRef();
-#endif
-
carla_debug("CarlaEngineNative::~CarlaEngineNative() - END");
}
@@ -1437,7 +1344,7 @@ protected:
// ---------------------------------------------------------------
// Do nothing if no plugins and rack mode
- if (pData->curPluginCount == 0 && ! kIsPatchbay)
+ if (pData->curPluginCount == 0)
{
if (outBuffer[0] != inBuffer[0])
FloatVectorOperations::copy(outBuffer[0], inBuffer[0], static_cast(frames));
@@ -1478,14 +1385,6 @@ protected:
}
}
- if (kIsPatchbay)
- {
- // -----------------------------------------------------------
- // process
-
- pData->graph.process(pData, inBuffer, outBuffer, frames);
- }
- else
{
// -----------------------------------------------------------
// create audio buffers
@@ -1560,10 +1459,7 @@ protected:
CarlaString path(pHost->resourceDir);
- if (kIsPatchbay)
- path += CARLA_OS_SEP_STR "carla-plugin-patchbay";
- else
- path += CARLA_OS_SEP_STR "carla-plugin";
+ path += CARLA_OS_SEP_STR "carla-plugin";
#ifdef CARLA_OS_WIN
path += ".exe";
#endif
@@ -1593,9 +1489,6 @@ protected:
}
}
- if (kIsPatchbay)
- patchbayRefresh(false);
-
if (fWaitForReadyMsg)
{
carla_stdout("Using Carla plugin embedded, waiting for it to be ready...");
@@ -1763,26 +1656,6 @@ public:
return new CarlaEngineNative(host, false);
}
- static NativePluginHandle _instantiatePatchbay(const NativeHostDescriptor* host)
- {
- return new CarlaEngineNative(host, true);
- }
-
- static NativePluginHandle _instantiatePatchbay3s(const NativeHostDescriptor* host)
- {
- return new CarlaEngineNative(host, true, 3, 2);
- }
-
- static NativePluginHandle _instantiatePatchbay16(const NativeHostDescriptor* host)
- {
- return new CarlaEngineNative(host, true, 16);
- }
-
- static NativePluginHandle _instantiatePatchbay32(const NativeHostDescriptor* host)
- {
- return new CarlaEngineNative(host, true, 32);
- }
-
static void _cleanup(NativePluginHandle handle)
{
delete handlePtr;
@@ -1906,12 +1779,6 @@ public:
private:
const NativeHostDescriptor* const pHost;
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
- const bool kNeedsJuceMsgThread;
- const SharedResourcePointer fJuceMsgThread;
-#endif
-
- const bool kIsPatchbay; // rack if false
bool fIsActive, fIsRunning;
CarlaEngineNativeUI fUiServer;
@@ -1979,174 +1846,6 @@ static const NativePluginDescriptor carlaRackDesc = {
CarlaEngineNative::_dispatcher
};
-static const NativePluginDescriptor carlaPatchbayDesc = {
- /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
- /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH
- |NATIVE_PLUGIN_HAS_UI
- //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
- |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
- |NATIVE_PLUGIN_USES_STATE
- |NATIVE_PLUGIN_USES_TIME),
- /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
- /* audioIns */ 2,
- /* audioOuts */ 2,
- /* midiIns */ 1,
- /* midiOuts */ 1,
- /* paramIns */ 0,
- /* paramOuts */ 0,
- /* name */ "Carla-Patchbay",
- /* label */ "carlapatchbay",
- /* maker */ "falkTX",
- /* copyright */ "GNU GPL v2+",
- CarlaEngineNative::_instantiatePatchbay,
- CarlaEngineNative::_cleanup,
- CarlaEngineNative::_get_parameter_count,
- CarlaEngineNative::_get_parameter_info,
- CarlaEngineNative::_get_parameter_value,
- CarlaEngineNative::_get_midi_program_count,
- CarlaEngineNative::_get_midi_program_info,
- CarlaEngineNative::_set_parameter_value,
- CarlaEngineNative::_set_midi_program,
- /* _set_custom_data */ nullptr,
- CarlaEngineNative::_ui_show,
- CarlaEngineNative::_ui_idle,
- /* _ui_set_parameter_value */ nullptr,
- /* _ui_set_midi_program */ nullptr,
- /* _ui_set_custom_data */ nullptr,
- CarlaEngineNative::_activate,
- CarlaEngineNative::_deactivate,
- CarlaEngineNative::_process,
- CarlaEngineNative::_get_state,
- CarlaEngineNative::_set_state,
- CarlaEngineNative::_dispatcher
-};
-
-static const NativePluginDescriptor carlaPatchbay3sDesc = {
- /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
- /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH
- |NATIVE_PLUGIN_HAS_UI
- //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
- |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
- |NATIVE_PLUGIN_USES_STATE
- |NATIVE_PLUGIN_USES_TIME),
- /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
- /* audioIns */ 3,
- /* audioOuts */ 2,
- /* midiIns */ 1,
- /* midiOuts */ 1,
- /* paramIns */ 0,
- /* paramOuts */ 0,
- /* name */ "Carla-Patchbay (sidechain)",
- /* label */ "carlapatchbay3s",
- /* maker */ "falkTX",
- /* copyright */ "GNU GPL v2+",
- CarlaEngineNative::_instantiatePatchbay3s,
- CarlaEngineNative::_cleanup,
- CarlaEngineNative::_get_parameter_count,
- CarlaEngineNative::_get_parameter_info,
- CarlaEngineNative::_get_parameter_value,
- CarlaEngineNative::_get_midi_program_count,
- CarlaEngineNative::_get_midi_program_info,
- CarlaEngineNative::_set_parameter_value,
- CarlaEngineNative::_set_midi_program,
- /* _set_custom_data */ nullptr,
- CarlaEngineNative::_ui_show,
- CarlaEngineNative::_ui_idle,
- /* _ui_set_parameter_value */ nullptr,
- /* _ui_set_midi_program */ nullptr,
- /* _ui_set_custom_data */ nullptr,
- CarlaEngineNative::_activate,
- CarlaEngineNative::_deactivate,
- CarlaEngineNative::_process,
- CarlaEngineNative::_get_state,
- CarlaEngineNative::_set_state,
- CarlaEngineNative::_dispatcher
-};
-
-static const NativePluginDescriptor carlaPatchbay16Desc = {
- /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
- /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH
- |NATIVE_PLUGIN_HAS_UI
- //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
- |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
- |NATIVE_PLUGIN_USES_STATE
- |NATIVE_PLUGIN_USES_TIME),
- /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
- /* audioIns */ 16,
- /* audioOuts */ 16,
- /* midiIns */ 1,
- /* midiOuts */ 1,
- /* paramIns */ 0,
- /* paramOuts */ 0,
- /* name */ "Carla-Patchbay (16chan)",
- /* label */ "carlapatchbay16",
- /* maker */ "falkTX",
- /* copyright */ "GNU GPL v2+",
- CarlaEngineNative::_instantiatePatchbay16,
- CarlaEngineNative::_cleanup,
- CarlaEngineNative::_get_parameter_count,
- CarlaEngineNative::_get_parameter_info,
- CarlaEngineNative::_get_parameter_value,
- CarlaEngineNative::_get_midi_program_count,
- CarlaEngineNative::_get_midi_program_info,
- CarlaEngineNative::_set_parameter_value,
- CarlaEngineNative::_set_midi_program,
- /* _set_custom_data */ nullptr,
- CarlaEngineNative::_ui_show,
- CarlaEngineNative::_ui_idle,
- /* _ui_set_parameter_value */ nullptr,
- /* _ui_set_midi_program */ nullptr,
- /* _ui_set_custom_data */ nullptr,
- CarlaEngineNative::_activate,
- CarlaEngineNative::_deactivate,
- CarlaEngineNative::_process,
- CarlaEngineNative::_get_state,
- CarlaEngineNative::_set_state,
- CarlaEngineNative::_dispatcher
-};
-
-static const NativePluginDescriptor carlaPatchbay32Desc = {
- /* category */ NATIVE_PLUGIN_CATEGORY_OTHER,
- /* hints */ static_cast(NATIVE_PLUGIN_IS_SYNTH
- |NATIVE_PLUGIN_HAS_UI
- //|NATIVE_PLUGIN_NEEDS_FIXED_BUFFERS
- |NATIVE_PLUGIN_NEEDS_UI_MAIN_THREAD
- |NATIVE_PLUGIN_USES_STATE
- |NATIVE_PLUGIN_USES_TIME),
- /* supports */ static_cast(NATIVE_PLUGIN_SUPPORTS_EVERYTHING),
- /* audioIns */ 32,
- /* audioOuts */ 32,
- /* midiIns */ 1,
- /* midiOuts */ 1,
- /* paramIns */ 0,
- /* paramOuts */ 0,
- /* name */ "Carla-Patchbay (32chan)",
- /* label */ "carlapatchbay32",
- /* maker */ "falkTX",
- /* copyright */ "GNU GPL v2+",
- CarlaEngineNative::_instantiatePatchbay32,
- CarlaEngineNative::_cleanup,
- CarlaEngineNative::_get_parameter_count,
- CarlaEngineNative::_get_parameter_info,
- CarlaEngineNative::_get_parameter_value,
- CarlaEngineNative::_get_midi_program_count,
- CarlaEngineNative::_get_midi_program_info,
- CarlaEngineNative::_set_parameter_value,
- CarlaEngineNative::_set_midi_program,
- /* _set_custom_data */ nullptr,
- CarlaEngineNative::_ui_show,
- CarlaEngineNative::_ui_idle,
- /* _ui_set_parameter_value */ nullptr,
- /* _ui_set_midi_program */ nullptr,
- /* _ui_set_custom_data */ nullptr,
- CarlaEngineNative::_activate,
- CarlaEngineNative::_deactivate,
- CarlaEngineNative::_process,
- CarlaEngineNative::_get_state,
- CarlaEngineNative::_set_state,
- CarlaEngineNative::_dispatcher
-};
-
CARLA_BACKEND_END_NAMESPACE
// -----------------------------------------------------------------------
@@ -2158,10 +1857,6 @@ void carla_register_native_plugin_carla()
{
CARLA_BACKEND_USE_NAMESPACE;
carla_register_native_plugin(&carlaRackDesc);
- carla_register_native_plugin(&carlaPatchbayDesc);
- carla_register_native_plugin(&carlaPatchbay3sDesc);
- carla_register_native_plugin(&carlaPatchbay16Desc);
- carla_register_native_plugin(&carlaPatchbay32Desc);
}
// -----------------------------------------------------------------------
@@ -2174,14 +1869,6 @@ const NativePluginDescriptor* carla_get_native_rack_plugin()
return &carlaRackDesc;
}
-CARLA_EXPORT
-const NativePluginDescriptor* carla_get_native_patchbay_plugin();
-const NativePluginDescriptor* carla_get_native_patchbay_plugin()
-{
- CARLA_BACKEND_USE_NAMESPACE;
- return &carlaPatchbayDesc;
-}
-
// -----------------------------------------------------------------------
// Extra stuff for linking purposes
@@ -2191,19 +1878,11 @@ CARLA_BACKEND_START_NAMESPACE
CarlaEngine* CarlaEngine::newJack() { return nullptr; }
-# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-CarlaEngine* CarlaEngine::newJuce(const AudioApi) { return nullptr; }
-uint CarlaEngine::getJuceApiCount() { return 0; }
-const char* CarlaEngine::getJuceApiName(const uint) { return nullptr; }
-const char* const* CarlaEngine::getJuceApiDeviceNames(const uint) { return nullptr; }
-const EngineDriverDeviceInfo* CarlaEngine::getJuceDeviceInfo(const uint, const char* const) { return nullptr; }
-# else
CarlaEngine* CarlaEngine::newRtAudio(const AudioApi) { return nullptr; }
uint CarlaEngine::getRtAudioApiCount() { return 0; }
const char* CarlaEngine::getRtAudioApiName(const uint) { return nullptr; }
const char* const* CarlaEngine::getRtAudioApiDeviceNames(const uint) { return nullptr; }
const EngineDriverDeviceInfo* CarlaEngine::getRtAudioDeviceInfo(const uint, const char* const) { return nullptr; }
-# endif
CARLA_BACKEND_END_NAMESPACE
@@ -2213,7 +1892,6 @@ CARLA_BACKEND_END_NAMESPACE
#include "CarlaPatchbayUtils.cpp"
#include "CarlaPipeUtils.cpp"
#include "CarlaStateUtils.cpp"
-#include "CarlaJuceAudioProcessors.cpp"
#endif
diff --git a/source/backend/engine/CarlaEnginePorts.cpp b/source/backend/engine/CarlaEnginePorts.cpp
index d0804fce1..428ad985b 100644
--- a/source/backend/engine/CarlaEnginePorts.cpp
+++ b/source/backend/engine/CarlaEnginePorts.cpp
@@ -89,30 +89,17 @@ CarlaEngineEventPort::CarlaEngineEventPort(const CarlaEngineClient& client, cons
kProcessMode(client.getEngine().getProccessMode())
{
carla_debug("CarlaEngineEventPort::CarlaEngineEventPort(%s)", bool2str(isInputPort));
-
- if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY)
- fBuffer = new EngineEvent[kMaxEngineEventInternalCount];
}
CarlaEngineEventPort::~CarlaEngineEventPort() noexcept
{
carla_debug("CarlaEngineEventPort::~CarlaEngineEventPort()");
-
- if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY)
- {
- CARLA_SAFE_ASSERT_RETURN(fBuffer != nullptr,);
-
- delete[] fBuffer;
- fBuffer = nullptr;
- }
}
void CarlaEngineEventPort::initBuffer() noexcept
{
if (kProcessMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || kProcessMode == ENGINE_PROCESS_MODE_BRIDGE)
fBuffer = kClient.getEngine().getInternalEventBuffer(kIsInput);
- else if (kProcessMode == ENGINE_PROCESS_MODE_PATCHBAY && ! kIsInput)
- carla_zeroStructs(fBuffer, kMaxEngineEventInternalCount);
}
uint32_t CarlaEngineEventPort::getEventCount() const noexcept
diff --git a/source/backend/engine/CarlaEngineRtAudio.cpp b/source/backend/engine/CarlaEngineRtAudio.cpp
index 16c81fddc..50905f1cd 100644
--- a/source/backend/engine/CarlaEngineRtAudio.cpp
+++ b/source/backend/engine/CarlaEngineRtAudio.cpp
@@ -196,7 +196,7 @@ public:
CARLA_SAFE_ASSERT_RETURN(clientName != nullptr && clientName[0] != '\0', false);
carla_debug("CarlaEngineRtAudio::init(\"%s\")", clientName);
- if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK && pData->options.processMode != ENGINE_PROCESS_MODE_PATCHBAY)
+ if (pData->options.processMode != ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
{
setLastError("Invalid process mode");
return false;
@@ -303,10 +303,7 @@ public:
return false;
}
- patchbayRefresh(false);
-
- if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
- refreshExternalGraphPorts(pData->graph.getPatchbayGraph(), false);
+ patchbayRefresh();
callback(ENGINE_CALLBACK_ENGINE_STARTED, 0, pData->options.processMode, pData->options.transportMode, 0.0f, getCurrentDriverName());
return true;
@@ -527,25 +524,11 @@ public:
return true;
}
- bool patchbayRefresh(const bool external) override
+ bool patchbayRefresh() override
{
CARLA_SAFE_ASSERT_RETURN(pData->graph.isReady(), false);
- if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK)
- {
- return refreshExternalGraphPorts(pData->graph.getRackGraph(), true);
- }
- else
- {
- pData->graph.setUsingExternal(external);
-
- if (external)
- return refreshExternalGraphPorts(pData->graph.getPatchbayGraph(), true);
- else
- return CarlaEngine::patchbayRefresh(false);
- }
-
- return false;
+ return refreshExternalGraphPorts(pData->graph.getRackGraph(), true);
}
// -------------------------------------------------------------------
diff --git a/source/backend/engine/Makefile b/source/backend/engine/Makefile
index 8137f2d24..45a0381b8 100644
--- a/source/backend/engine/Makefile
+++ b/source/backend/engine/Makefile
@@ -22,15 +22,8 @@ OBJS = \
OBJSa = $(OBJS) \
$(OBJDIR)/CarlaEngineJack.cpp.o \
- $(OBJDIR)/CarlaEngineNative.cpp.o
-
-ifeq ($(MACOS_OR_WIN32),true)
-OBJSa += \
- $(OBJDIR)/CarlaEngineJuce.cpp.o
-else
-OBJSa += \
+ $(OBJDIR)/CarlaEngineNative.cpp.o \
$(OBJDIR)/CarlaEngineRtAudio.cpp.o
-endif
OBJSp = $(OBJS) \
$(OBJDIR)/CarlaEngineNative.cpp.exp.o
diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp
index 6578a247b..fbf622309 100644
--- a/source/backend/plugin/CarlaPlugin.cpp
+++ b/source/backend/plugin/CarlaPlugin.cpp
@@ -88,15 +88,8 @@ CarlaPlugin::CarlaPlugin(CarlaEngine* const engine, const uint id)
{
case ENGINE_PROCESS_MODE_SINGLE_CLIENT:
case ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS:
- CARLA_SAFE_ASSERT(id < MAX_DEFAULT_PLUGINS);
- break;
-
case ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
- CARLA_SAFE_ASSERT(id < MAX_RACK_PLUGINS);
- break;
-
- case ENGINE_PROCESS_MODE_PATCHBAY:
- CARLA_SAFE_ASSERT(id < MAX_PATCHBAY_PLUGINS);
+ CARLA_SAFE_ASSERT(id < MAX_DEFAULT_PLUGINS);
break;
case ENGINE_PROCESS_MODE_BRIDGE:
diff --git a/source/backend/plugin/CarlaPluginAU.cpp b/source/backend/plugin/CarlaPluginAU.cpp
deleted file mode 100644
index 30d2b3007..000000000
--- a/source/backend/plugin/CarlaPluginAU.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Carla AU 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 "CarlaPlugin.hpp"
-#include "CarlaEngine.hpp"
-#include "CarlaUtils.hpp"
-
-CARLA_BACKEND_START_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CarlaPlugin* CarlaPlugin::newAU(const Initializer& init)
-{
- carla_debug("CarlaPlugin::newAU({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.label, init.uniqueId);
-
-#if defined(CARLA_OS_MAC)
- return newJuce(init, "AU");
-#else
- init.engine->setLastError("AU support not available");
- return nullptr;
-#endif
-}
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CARLA_BACKEND_END_NAMESPACE
diff --git a/source/backend/plugin/CarlaPluginBridge.cpp b/source/backend/plugin/CarlaPluginBridge.cpp
index 68b60396f..f83d9de8c 100644
--- a/source/backend/plugin/CarlaPluginBridge.cpp
+++ b/source/backend/plugin/CarlaPluginBridge.cpp
@@ -213,11 +213,6 @@ protected:
else
carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST2", "");
- if (options.pathVST3 != nullptr)
- carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST3", options.pathVST3);
- else
- carla_setenv("ENGINE_OPTION_PLUGIN_PATH_VST3", "");
-
if (options.pathGIG != nullptr)
carla_setenv("ENGINE_OPTION_PLUGIN_PATH_GIG", options.pathGIG);
else
diff --git a/source/backend/plugin/CarlaPluginJuce.cpp b/source/backend/plugin/CarlaPluginJuce.cpp
deleted file mode 100644
index 3339997e9..000000000
--- a/source/backend/plugin/CarlaPluginJuce.cpp
+++ /dev/null
@@ -1,1303 +0,0 @@
-/*
- * Carla Juce 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"
-
-#if (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
-
-#include "CarlaBackendUtils.hpp"
-#include "CarlaMathUtils.hpp"
-#include "JucePluginWindow.hpp"
-
-#include "juce_audio_processors/juce_audio_processors.h"
-
-using namespace juce;
-
-CARLA_BACKEND_START_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
-// Fallback data
-
-static const ExternalMidiNote kExternalMidiNoteFallback = { -1, 0, 0 };
-
-// -------------------------------------------------------------------------------------------------------------------
-
-class CarlaPluginJuce : public CarlaPlugin,
- private AudioPlayHead,
- private AudioProcessorListener
-{
-public:
- CarlaPluginJuce(CarlaEngine* const engine, const uint id)
- : CarlaPlugin(engine, id),
- fDesc(),
- fInstance(nullptr),
- fFormatManager(),
- fAudioBuffer(),
- fMidiBuffer(),
- fPosInfo(),
- fChunk(),
- fWindow()
- {
- carla_debug("CarlaPluginJuce::CarlaPluginJuce(%p, %i)", engine, id);
-
- fMidiBuffer.ensureSize(2048);
- fMidiBuffer.clear();
- fPosInfo.resetToDefault();
- }
-
- ~CarlaPluginJuce() override
- {
- carla_debug("CarlaPluginJuce::~CarlaPluginJuce()");
-
- // close UI
- if (pData->hints & PLUGIN_HAS_CUSTOM_UI)
- showCustomUI(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 (fInstance != nullptr)
- {
- delete fInstance;
- fInstance = nullptr;
- }
-
- clearBuffers();
- }
-
- // -------------------------------------------------------------------
- // Information (base)
-
- PluginType getType() const noexcept override
- {
- return getPluginTypeFromString(fDesc.pluginFormatName.toRawUTF8());
- }
-
- PluginCategory getCategory() const noexcept override
- {
- if (fDesc.isInstrument)
- return PLUGIN_CATEGORY_SYNTH;
- return getPluginCategoryFromName(fDesc.category.toRawUTF8());
- }
-
- int64_t getUniqueId() const noexcept override
- {
- return fDesc.uid;
- }
-
- // -------------------------------------------------------------------
- // Information (count)
-
- // nothing
-
- // -------------------------------------------------------------------
- // Information (current data)
-
- std::size_t getChunkData(void** const dataPtr) noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS, 0);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr, 0);
- CARLA_SAFE_ASSERT_RETURN(dataPtr != nullptr, 0);
-
- *dataPtr = nullptr;
-
- try {
- fChunk.reset();
- fInstance->getStateInformation(fChunk);
- } CARLA_SAFE_EXCEPTION_RETURN("CarlaPluginJuce::getChunkData", 0);
-
- if (const std::size_t size = fChunk.getSize())
- {
- *dataPtr = fChunk.getData();
- return size;
- }
-
- return 0;
- }
-
- // -------------------------------------------------------------------
- // Information (per-plugin data)
-
- uint getOptionsAvailable() const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr, 0x0);
-
- uint options = 0x0;
-
- options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;
- options |= PLUGIN_OPTION_USE_CHUNKS;
-
- if (fInstance->getNumPrograms() > 1)
- options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;
-
- if (fInstance->acceptsMidi())
- {
- 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);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr, 0.0f);
-
- return fInstance->getParameter(static_cast(parameterId));
- }
-
- void getLabel(char* const strBuf) const noexcept override
- {
- if (fDesc.pluginFormatName == "AU" || fDesc.pluginFormatName == "AudioUnit")
- std::strncpy(strBuf, fDesc.fileOrIdentifier.toRawUTF8(), STR_MAX);
- else
- std::strncpy(strBuf, fDesc.name.toRawUTF8(), STR_MAX);
- }
-
- void getMaker(char* const strBuf) const noexcept override
- {
- std::strncpy(strBuf, fDesc.manufacturerName.toRawUTF8(), STR_MAX);
- }
-
- void getCopyright(char* const strBuf) const noexcept override
- {
- getMaker(strBuf);
- }
-
- void getRealName(char* const strBuf) const noexcept override
- {
- std::strncpy(strBuf, fDesc.descriptiveName.toRawUTF8(), STR_MAX);
- }
-
- void getParameterName(const uint32_t parameterId, char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- std::strncpy(strBuf, fInstance->getParameterName(static_cast(parameterId), STR_MAX).toRawUTF8(), STR_MAX);
- }
-
- void getParameterText(const uint32_t parameterId, char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- std::strncpy(strBuf, fInstance->getParameterText(static_cast(parameterId), STR_MAX).toRawUTF8(), STR_MAX);
- }
-
- void getParameterUnit(const uint32_t parameterId, char* const strBuf) const noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- std::strncpy(strBuf, fInstance->getParameterLabel(static_cast(parameterId)).toRawUTF8(), STR_MAX);
- }
-
- // -------------------------------------------------------------------
- // Set data (state)
-
- // nothing
-
- // -------------------------------------------------------------------
- // Set data (internal stuff)
-
- void setName(const char* const newName) override
- {
- CarlaPlugin::setName(newName);
-
- if (fWindow != nullptr)
- {
- String uiName(pData->name);
- uiName += " (GUI)";
- fWindow->setName(uiName);
- }
- }
-
- // -------------------------------------------------------------------
- // 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(parameterId < pData->param.count,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- const float fixedValue(pData->param.getFixedValue(parameterId, value));
- fInstance->setParameter(static_cast(parameterId), value);
-
- CarlaPlugin::setParameterValue(parameterId, fixedValue, sendGui, sendOsc, sendCallback);
- }
-
- void setChunkData(const void* const data, const std::size_t dataSize) override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->options & PLUGIN_OPTION_USE_CHUNKS,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(data != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(dataSize > 0,);
-
- {
- const ScopedSingleProcessLocker spl(this, true);
- fInstance->setStateInformation(data, static_cast(dataSize));
- }
-
-#if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE)
- const bool sendOsc(pData->engine->isOscControlRegistered());
-#else
- const bool sendOsc(false);
-#endif
- pData->updateParameterValues(this, sendOsc, true, false);
- }
-
- void setProgram(const int32_t index, const bool sendGui, const bool sendOsc, const bool sendCallback) noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(index >= -1 && index < static_cast(pData->prog.count),);
-
- if (index >= 0)
- {
- const ScopedSingleProcessLocker spl(this, (sendGui || sendOsc || sendCallback));
-
- try {
- fInstance->setCurrentProgram(index);
- } CARLA_SAFE_EXCEPTION("setCurrentProgram");
- }
-
- CarlaPlugin::setProgram(index, sendGui, sendOsc, sendCallback);
- }
-
- // -------------------------------------------------------------------
- // Set ui stuff
-
- void showCustomUI(const bool yesNo) override
- {
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- if (yesNo)
- {
- if (fWindow == nullptr)
- {
- String uiName(pData->name);
- uiName += " (GUI)";
-
- fWindow = new JucePluginWindow();
- fWindow->setName(uiName);
- }
-
- if (AudioProcessorEditor* const editor = fInstance->createEditorIfNeeded())
- fWindow->show(editor);
- }
- else
- {
- if (fWindow != nullptr)
- fWindow->hide();
-
- if (AudioProcessorEditor* const editor = fInstance->getActiveEditor())
- delete editor;
-
- fWindow = nullptr;
- }
- }
-
- void uiIdle() override
- {
- if (fWindow != nullptr)
- {
- if (fWindow->wasClosedByUser())
- {
- showCustomUI(false);
- pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
- }
- }
-
- CarlaPlugin::uiIdle();
- }
-
- // -------------------------------------------------------------------
- // Plugin state
-
- void reload() override
- {
- CARLA_SAFE_ASSERT_RETURN(pData->engine != nullptr,);
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
- carla_debug("CarlaPluginJuce::reload() - start");
-
- const EngineProcessMode processMode(pData->engine->getProccessMode());
-
- // Safely disable plugin for reload
- const ScopedDisabler sd(this);
-
- if (pData->active)
- deactivate();
-
- clearBuffers();
-
- fInstance->refreshParameterList();
-
- uint32_t aIns, aOuts, mIns, mOuts, params;
- mIns = mOuts = 0;
-
- bool needsCtrlIn, needsCtrlOut;
- needsCtrlIn = needsCtrlOut = false;
-
- aIns = (fInstance->getTotalNumInputChannels() > 0) ? static_cast(fInstance->getTotalNumInputChannels()) : 0;
- aOuts = (fInstance->getTotalNumOutputChannels() > 0) ? static_cast(fInstance->getTotalNumOutputChannels()) : 0;
- params = (fInstance->getNumParameters() > 0) ? static_cast(fInstance->getNumParameters()) : 0;
-
- if (fInstance->acceptsMidi())
- {
- mIns = 1;
- needsCtrlIn = true;
- }
-
- if (fInstance->producesMidi())
- {
- mOuts = 1;
- needsCtrlOut = true;
- }
-
- 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 += ":";
- }
-
- if (aIns > 1)
- {
- portName += "input_";
- portName += CarlaString(j+1);
- }
- else
- portName += "input";
-
- portName.truncate(portNameSize);
-
- pData->audioIn.ports[j].port = (CarlaEngineAudioPort*)pData->client->addPort(kEnginePortTypeAudio, portName, true, j);
- 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 += ":";
- }
-
- if (aOuts > 1)
- {
- portName += "output_";
- portName += CarlaString(j+1);
- }
- else
- portName += "output";
-
- portName.truncate(portNameSize);
-
- pData->audioOut.ports[j].port = (CarlaEngineAudioPort*)pData->client->addPort(kEnginePortTypeAudio, portName, false, j);
- pData->audioOut.ports[j].rindex = j;
- }
-
- for (uint32_t j=0; j < params; ++j)
- {
- pData->param.data[j].type = PARAMETER_INPUT;
- pData->param.data[j].index = static_cast(j);
- pData->param.data[j].rindex = static_cast(j);
-
- float min, max, def, step, stepSmall, stepLarge;
-
- // TODO
- //const int numSteps(fInstance->getParameterNumSteps(static_cast(j)));
- {
- min = 0.0f;
- max = 1.0f;
- step = 0.001f;
- stepSmall = 0.0001f;
- stepLarge = 0.1f;
- }
-
- pData->param.data[j].hints |= PARAMETER_IS_ENABLED;
-#ifndef BUILD_BRIDGE
- pData->param.data[j].hints |= PARAMETER_USES_CUSTOM_TEXT;
-#endif
-
- if (fInstance->isParameterAutomatable(static_cast(j)))
- pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE;
-
- // FIXME?
- def = fInstance->getParameterDefaultValue(static_cast(j));
-
- if (def < min)
- def = min;
- else if (def > max)
- def = max;
-
- pData->param.ranges[j].min = min;
- pData->param.ranges[j].max = max;
- pData->param.ranges[j].def = def;
- pData->param.ranges[j].step = step;
- pData->param.ranges[j].stepSmall = stepSmall;
- pData->param.ranges[j].stepLarge = stepLarge;
- }
-
- 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, 0);
- }
-
- 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, 0);
- }
-
- // plugin hints
- pData->hints = 0x0;
- pData->hints |= PLUGIN_NEEDS_FIXED_BUFFERS;
-
- if (fDesc.isInstrument)
- pData->hints |= PLUGIN_IS_SYNTH;
-
- if (fInstance->hasEditor())
- {
- pData->hints |= PLUGIN_HAS_CUSTOM_UI;
- pData->hints |= PLUGIN_NEEDS_UI_MAIN_THREAD;
- }
-
- 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;
-
- fInstance->setPlayConfigDetails(static_cast(aIns), static_cast(aOuts), pData->engine->getSampleRate(), static_cast(pData->engine->getBufferSize()));
-
- bufferSizeChanged(pData->engine->getBufferSize());
- reloadPrograms(true);
-
- if (pData->active)
- activate();
-
- carla_debug("CarlaPluginJuce::reload() - end");
- }
-
- void reloadPrograms(const bool doInit) override
- {
- carla_debug("CarlaPluginJuce::reloadPrograms(%s)", bool2str(doInit));
- const uint32_t oldCount = pData->prog.count;
- const int32_t current = pData->prog.current;
-
- // Delete old programs
- pData->prog.clear();
-
- // Query new programs
- uint32_t newCount = (fInstance->getNumPrograms() > 0) ? static_cast(fInstance->getNumPrograms()) : 0;
-
- if (newCount > 0)
- {
- pData->prog.createNew(newCount);
-
- // Update names
- for (int i=0, count=fInstance->getNumPrograms(); iprog.names[i] = carla_strdup(fInstance->getProgramName(i).toRawUTF8());
- }
-
-#if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE)
- // Update OSC Names
- if (pData->engine->isOscControlRegistered() && pData->id < pData->engine->getCurrentPluginCount())
- {
- pData->engine->oscSend_control_set_program_count(pData->id, newCount);
-
- for (uint32_t i=0; i < newCount; ++i)
- pData->engine->oscSend_control_set_program_name(pData->id, i, pData->prog.names[i]);
- }
-#endif
-
- if (doInit)
- {
- if (newCount > 0)
- setProgram(0, false, false, false);
- }
- else
- {
- // Check if current program is invalid
- bool programChanged = false;
-
- if (newCount == oldCount+1)
- {
- // one program added, probably created by user
- pData->prog.current = static_cast(oldCount);
- programChanged = true;
- }
- else if (current < 0 && newCount > 0)
- {
- // programs exist now, but not before
- pData->prog.current = 0;
- programChanged = true;
- }
- else if (current >= 0 && newCount == 0)
- {
- // programs existed before, but not anymore
- pData->prog.current = -1;
- programChanged = true;
- }
- else if (current >= static_cast(newCount))
- {
- // current program > count
- pData->prog.current = 0;
- programChanged = true;
- }
- else
- {
- // no change
- pData->prog.current = current;
- }
-
- if (programChanged)
- {
- setProgram(pData->prog.current, true, true, true);
- }
- else
- {
- // Program was changed during update, re-set it
- if (pData->prog.current >= 0)
- fInstance->setCurrentProgram(pData->prog.current);
- }
-
- pData->engine->callback(ENGINE_CALLBACK_RELOAD_PROGRAMS, pData->id, 0, 0, 0.0f, nullptr);
- }
- }
-
- // -------------------------------------------------------------------
- // Plugin processing
-
- void activate() noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- try {
- fInstance->prepareToPlay(pData->engine->getSampleRate(), static_cast(pData->engine->getBufferSize()));
- } catch(...) {}
- }
-
- void deactivate() noexcept override
- {
- CARLA_SAFE_ASSERT_RETURN(fInstance != nullptr,);
-
- try {
- fInstance->releaseResources();
- } catch(...) {}
- }
-
- void process(const float** const audioIn, float** const audioOut, const float** const, float** const, 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)
- FloatVectorOperations::clear(audioOut[i], static_cast(frames));
- return;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Check if needs reset
-
- if (pData->needsReset)
- {
- fInstance->reset();
- pData->needsReset = false;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Event Input
-
- fMidiBuffer.clear();
-
- if (pData->event.portIn != nullptr)
- {
- // ----------------------------------------------------------------------------------------------------
- // MIDI Input (External)
-
- if (pData->extNotes.mutex.tryLock())
- {
- for (RtLinkedList::Itenerator it = pData->extNotes.data.begin2(); it.valid(); it.next())
- {
- const ExternalMidiNote& note(it.getValue(kExternalMidiNoteFallback));
- CARLA_SAFE_ASSERT_CONTINUE(note.channel >= 0 && note.channel < MAX_MIDI_CHANNELS);
-
- uint8_t midiEvent[3];
- midiEvent[0] = uint8_t((note.velo > 0 ? MIDI_STATUS_NOTE_ON : MIDI_STATUS_NOTE_OFF) | (note.channel & MIDI_CHANNEL_BIT));
- midiEvent[1] = note.note;
- midiEvent[2] = note.velo;
-
- fMidiBuffer.addEvent(midiEvent, 3, 0);
- }
-
- pData->extNotes.data.clear();
- pData->extNotes.mutex.unlock();
-
- } // End of MIDI Input (External)
-
- // ----------------------------------------------------------------------------------------------------
- // Event Input (System)
-
-#ifndef BUILD_BRIDGE
- bool allNotesOffSent = false;
-#endif
- for (uint32_t i=0, numEvents=pData->event.portIn->getEventCount(); i < numEvents; ++i)
- {
- const EngineEvent& event(pData->event.portIn->getEvent(i));
-
- if (event.time >= frames)
- continue;
-
- switch (event.type)
- {
- case kEngineEventTypeNull:
- break;
-
- case kEngineEventTypeControl: {
- const EngineControlEvent& ctrlEvent(event.ctrl);
-
- switch (ctrlEvent.type)
- {
- case kEngineControlEventTypeNull:
- break;
-
- case kEngineControlEventTypeParameter: {
-#ifndef BUILD_BRIDGE
- // Control backend stuff
- if (event.channel == pData->ctrlChannel)
- {
- float value;
-
- if (MIDI_IS_CONTROL_BREATH_CONTROLLER(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_DRYWET) != 0)
- {
- value = ctrlEvent.value;
- setDryWet(value, false, false);
- pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_DRYWET, 0, value);
- }
-
- if (MIDI_IS_CONTROL_CHANNEL_VOLUME(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_VOLUME) != 0)
- {
- value = ctrlEvent.value*127.0f/100.0f;
- setVolume(value, false, false);
- pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_VOLUME, 0, value);
- }
-
- if (MIDI_IS_CONTROL_BALANCE(ctrlEvent.param) && (pData->hints & PLUGIN_CAN_BALANCE) != 0)
- {
- float left, right;
- value = ctrlEvent.value/0.5f - 1.0f;
-
- if (value < 0.0f)
- {
- left = -1.0f;
- right = (value*2.0f)+1.0f;
- }
- else if (value > 0.0f)
- {
- left = (value*2.0f)-1.0f;
- right = 1.0f;
- }
- else
- {
- left = -1.0f;
- right = 1.0f;
- }
-
- setBalanceLeft(left, false, false);
- setBalanceRight(right, false, false);
- pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left);
- pData->postponeRtEvent(kPluginPostRtEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right);
- }
- }
-#endif
- // Control plugin parameters
- uint32_t k;
- for (k=0; k < pData->param.count; ++k)
- {
- if (pData->param.data[k].midiChannel != event.channel)
- continue;
- if (pData->param.data[k].midiCC != ctrlEvent.param)
- continue;
- if (pData->param.data[k].type != PARAMETER_INPUT)
- continue;
- if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0)
- continue;
-
- float value;
-
- if (pData->param.data[k].hints & PARAMETER_IS_BOOLEAN)
- {
- value = (ctrlEvent.value < 0.5f) ? pData->param.ranges[k].min : pData->param.ranges[k].max;
- }
- else
- {
- if (pData->param.data[k].hints & PARAMETER_IS_LOGARITHMIC)
- value = pData->param.ranges[k].getUnnormalizedLogValue(ctrlEvent.value);
- else
- value = pData->param.ranges[k].getUnnormalizedValue(ctrlEvent.value);
-
- if (pData->param.data[k].hints & PARAMETER_IS_INTEGER)
- value = std::rint(value);
- }
-
- setParameterValue(k, value, false, false, false);
- pData->postponeRtEvent(kPluginPostRtEventParameterChange, static_cast(k), 0, value);
- }
-
- if ((pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) != 0 && ctrlEvent.param < MAX_MIDI_CONTROL)
- {
- uint8_t midiData[3];
- midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
- midiData[1] = uint8_t(ctrlEvent.param);
- midiData[2] = uint8_t(ctrlEvent.value*127.0f);
-
- fMidiBuffer.addEvent(midiData, 3, static_cast(event.time));
- }
-
- break;
- } // case kEngineControlEventTypeParameter
-
- case kEngineControlEventTypeMidiBank:
- break;
-
- case kEngineControlEventTypeMidiProgram:
- if (event.channel == pData->ctrlChannel && (pData->options & PLUGIN_OPTION_MAP_PROGRAM_CHANGES) != 0)
- {
- if (ctrlEvent.param < pData->prog.count)
- {
- setProgram(ctrlEvent.param, false, false, false);
- pData->postponeRtEvent(kPluginPostRtEventProgramChange, ctrlEvent.param, 0, 0.0f);
- break;
- }
- }
- break;
-
- case kEngineControlEventTypeAllSoundOff:
- if (pData->options & PLUGIN_OPTION_SEND_ALL_SOUND_OFF)
- {
- uint8_t midiData[3];
- midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
- midiData[1] = MIDI_CONTROL_ALL_SOUND_OFF;
- midiData[2] = 0;
-
- fMidiBuffer.addEvent(midiData, 3, static_cast(event.time));
- }
- break;
-
- case kEngineControlEventTypeAllNotesOff:
- if (pData->options & PLUGIN_OPTION_SEND_ALL_SOUND_OFF)
- {
-#ifndef BUILD_BRIDGE
- if (event.channel == pData->ctrlChannel && ! allNotesOffSent)
- {
- allNotesOffSent = true;
- sendMidiAllNotesOffToCallback();
- }
-#endif
-
- uint8_t midiData[3];
- midiData[0] = uint8_t(MIDI_STATUS_CONTROL_CHANGE | (event.channel & MIDI_CHANNEL_BIT));
- midiData[1] = MIDI_CONTROL_ALL_NOTES_OFF;
- midiData[2] = 0;
-
- fMidiBuffer.addEvent(midiData, 3, static_cast(event.time));
- }
- break;
- } // switch (ctrlEvent.type)
- break;
- } // case kEngineEventTypeControl
-
- case kEngineEventTypeMidi: {
- const EngineMidiEvent& midiEvent(event.midi);
-
- const uint8_t* const midiData(midiEvent.size > EngineMidiEvent::kDataSize ? midiEvent.dataExt : midiEvent.data);
-
- uint8_t status = uint8_t(MIDI_GET_STATUS_FROM_DATA(midiData));
-
- if (status == MIDI_STATUS_CHANNEL_PRESSURE && (pData->options & PLUGIN_OPTION_SEND_CHANNEL_PRESSURE) == 0)
- continue;
- if (status == MIDI_STATUS_CONTROL_CHANGE && (pData->options & PLUGIN_OPTION_SEND_CONTROL_CHANGES) == 0)
- continue;
- if (status == MIDI_STATUS_POLYPHONIC_AFTERTOUCH && (pData->options & PLUGIN_OPTION_SEND_NOTE_AFTERTOUCH) == 0)
- continue;
- if (status == MIDI_STATUS_PITCH_WHEEL_CONTROL && (pData->options & PLUGIN_OPTION_SEND_PITCHBEND) == 0)
- continue;
-
- // Fix bad note-off
- if (status == MIDI_STATUS_NOTE_ON && midiData[2] == 0)
- status = MIDI_STATUS_NOTE_OFF;
-
- // put back channel in data
- uint8_t midiData2[midiEvent.size];
- midiData2[0] = uint8_t(status | (event.channel & MIDI_CHANNEL_BIT));
- std::memcpy(midiData2+1, midiData+1, static_cast(midiEvent.size-1));
-
- fMidiBuffer.addEvent(midiData2, midiEvent.size, static_cast(event.time));
-
- if (status == MIDI_STATUS_NOTE_ON)
- pData->postponeRtEvent(kPluginPostRtEventNoteOn, event.channel, midiData[1], midiData[2]);
- else if (status == MIDI_STATUS_NOTE_OFF)
- pData->postponeRtEvent(kPluginPostRtEventNoteOff, event.channel, midiData[1], 0.0f);
- } break;
- } // switch (event.type)
- }
-
- pData->postRtEvents.trySplice();
-
- } // End of Event Input
-
- // --------------------------------------------------------------------------------------------------------
- // Set TimeInfo
-
- const EngineTimeInfo& timeInfo(pData->engine->getTimeInfo());
-
- fPosInfo.isPlaying = timeInfo.playing;
-
- if (timeInfo.valid & EngineTimeInfo::kValidBBT)
- {
- const double ppqBar = double(timeInfo.bbt.bar - 1) * timeInfo.bbt.beatsPerBar;
- const double ppqBeat = double(timeInfo.bbt.beat - 1);
- const double ppqTick = double(timeInfo.bbt.tick) / timeInfo.bbt.ticksPerBeat;
-
- fPosInfo.bpm = timeInfo.bbt.beatsPerMinute;
-
- fPosInfo.timeSigNumerator = static_cast(timeInfo.bbt.beatsPerBar);
- fPosInfo.timeSigDenominator = static_cast(timeInfo.bbt.beatType);
-
- fPosInfo.timeInSamples = static_cast(timeInfo.frame);
- fPosInfo.timeInSeconds = static_cast(fPosInfo.timeInSamples)/pData->engine->getSampleRate();
-
- fPosInfo.ppqPosition = ppqBar + ppqBeat + ppqTick;
- fPosInfo.ppqPositionOfLastBarStart = ppqBar;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Process
-
- processSingle(audioIn, audioOut, frames);
- }
-
- bool processSingle(const float** const inBuffer, float** const outBuffer, const uint32_t frames)
- {
- 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)
- FloatVectorOperations::clear(outBuffer[i], static_cast(frames));
- return false;
- }
-
- // --------------------------------------------------------------------------------------------------------
- // Set audio in buffers
-
- for (uint32_t i=0; i < pData->audioIn.count; ++i)
- fAudioBuffer.copyFrom(static_cast(i), 0, inBuffer[i], static_cast(frames));
-
- // --------------------------------------------------------------------------------------------------------
- // Run plugin
-
- fInstance->processBlock(fAudioBuffer, fMidiBuffer);
-
- // --------------------------------------------------------------------------------------------------------
- // Set audio out buffers
-
- for (uint32_t i=0; i < pData->audioOut.count; ++i)
- FloatVectorOperations::copy(outBuffer[i], fAudioBuffer.getReadPointer(static_cast(i)), static_cast(frames));
-
- // --------------------------------------------------------------------------------------------------------
- // Midi out
-
- if (! fMidiBuffer.isEmpty())
- {
- if (pData->event.portOut != nullptr)
- {
- const uint8* midiEventData;
- int midiEventSize, midiEventPosition;
-
- for (MidiBuffer::Iterator i(fMidiBuffer); i.getNextEvent(midiEventData, midiEventSize, midiEventPosition);)
- {
- CARLA_SAFE_ASSERT_BREAK(midiEventPosition >= 0 && midiEventPosition < static_cast(frames));
- CARLA_SAFE_ASSERT_BREAK(midiEventSize > 0);
-
- if (! pData->event.portOut->writeMidiEvent(static_cast(midiEventPosition), static_cast(midiEventSize), midiEventData))
- break;
- }
- }
-
- fMidiBuffer.clear();
- }
-
- // --------------------------------------------------------------------------------------------------------
-
- pData->singleMutex.unlock();
- return true;
- }
-
- void bufferSizeChanged(const uint32_t newBufferSize) override
- {
- CARLA_ASSERT_INT(newBufferSize > 0, newBufferSize);
- carla_debug("CarlaPluginJuce::bufferSizeChanged(%i)", newBufferSize);
-
- fAudioBuffer.setSize(static_cast(std::max(pData->audioIn.count, pData->audioOut.count)), static_cast(newBufferSize));
-
- if (pData->active)
- {
- deactivate();
- activate();
- }
- }
-
- void sampleRateChanged(const double newSampleRate) override
- {
- CARLA_ASSERT_INT(newSampleRate > 0.0, newSampleRate);
- carla_debug("CarlaPluginJuce::sampleRateChanged(%g)", newSampleRate);
-
- if (pData->active)
- {
- deactivate();
- activate();
- }
- }
-
- // -------------------------------------------------------------------
- // Plugin buffers
-
- // nothing
-
- // -------------------------------------------------------------------
- // Post-poned UI Stuff
-
- // nothing
-
- // -------------------------------------------------------------------
-
- void* getNativeHandle() const noexcept override
- {
- return (fInstance != nullptr) ? fInstance->getPlatformSpecificData() : nullptr;
- }
-
- // -------------------------------------------------------------------
-
-protected:
- void audioProcessorParameterChanged(AudioProcessor*, int index, float value) override
- {
- CARLA_SAFE_ASSERT_RETURN(index >= 0,);
-
- const uint32_t uindex(static_cast(index));
- const float fixedValue(pData->param.getFixedValue(uindex, value));
-
- CarlaPlugin::setParameterValue(static_cast(index), fixedValue, false, true, true);
- }
-
- void audioProcessorChanged(AudioProcessor*) override
- {
- pData->engine->callback(ENGINE_CALLBACK_UPDATE, pData->id, 0, 0, 0.0f, nullptr);
- }
-
- void audioProcessorParameterChangeGestureBegin(AudioProcessor*, int) override {}
- void audioProcessorParameterChangeGestureEnd(AudioProcessor*, int) override {}
-
- bool getCurrentPosition(CurrentPositionInfo& result) override
- {
- carla_copyStruct(result, fPosInfo);
- return true;
- }
-
- // -------------------------------------------------------------------
-
-public:
- bool init(const char* const filename, const char* const name, const char* const label, const int64_t uniqueId, const uint options, const char* const format)
- {
- 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 (format == nullptr || format[0] == '\0')
- {
- pData->engine->setLastError("null format");
- return false;
- }
-
- // AU and VST3 require label
- if (std::strcmp(format, "AU") == 0 || std::strcmp(format, "VST3") == 0)
- {
- if (label == nullptr || label[0] == '\0')
- {
- pData->engine->setLastError("null label");
- return false;
- }
- }
-
- String fileOrIdentifier;
-
- if (std::strcmp(format, "AU") == 0)
- {
- fileOrIdentifier = label;
- }
- else
- {
- // VST2 and VST3 require filename
- if (filename == nullptr || filename[0] == '\0')
- {
- pData->engine->setLastError("null filename");
- return false;
- }
-
- String jfilename(filename);
-
-#ifdef CARLA_OS_WIN
- // Fix for wine usage
- if (juce_isRunningInWine() && filename[0] == '/')
- {
- jfilename.replace("/", "\\");
- jfilename = "Z:" + jfilename;
- }
-#endif
-
- fileOrIdentifier = jfilename;
-
- if (label != nullptr && label[0] != '\0')
- fDesc.name = label;
- }
-
- fFormatManager.addDefaultFormats();
-
- {
- OwnedArray pluginDescriptions;
- KnownPluginList plist;
- for (int i = 0; i < fFormatManager.getNumFormats(); ++i)
- plist.scanAndAddFile(fileOrIdentifier, true, pluginDescriptions, *fFormatManager.getFormat(i));
- fDesc = *pluginDescriptions[0];
- }
-
- if (uniqueId != 0)
- fDesc.uid = static_cast(uniqueId);
-
- String error;
- fInstance = fFormatManager.createPluginInstance(fDesc,
- pData->engine->getSampleRate(),
- static_cast(pData->engine->getBufferSize()),
- error);
-
- if (fInstance == nullptr)
- {
- pData->engine->setLastError(error.toRawUTF8());
- return false;
- }
-
- fInstance->fillInPluginDescription(fDesc);
- fInstance->setPlayHead(this);
- fInstance->addListener(this);
-
- // ---------------------------------------------------------------
- // get info
-
- if (name != nullptr && name[0] != '\0')
- pData->name = pData->engine->getUniquePluginName(name);
- else
- pData->name = pData->engine->getUniquePluginName(fInstance->getName().toRawUTF8());
-
- 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;
- }
-
- // ---------------------------------------------------------------
- // set default options
-
- pData->options = 0x0;
- pData->options |= PLUGIN_OPTION_FIXED_BUFFERS;
- pData->options |= PLUGIN_OPTION_USE_CHUNKS;
-
- if (fInstance->getNumPrograms() > 1)
- pData->options |= PLUGIN_OPTION_MAP_PROGRAM_CHANGES;
-
- if (fInstance->acceptsMidi())
- {
- 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;
-
- if (options & PLUGIN_OPTION_SEND_CONTROL_CHANGES)
- pData->options |= PLUGIN_OPTION_SEND_CONTROL_CHANGES;
- }
-
- return true;
- }
-
-private:
- PluginDescription fDesc;
- AudioPluginInstance* fInstance;
- AudioPluginFormatManager fFormatManager;
-
- AudioSampleBuffer fAudioBuffer;
- MidiBuffer fMidiBuffer;
- CurrentPositionInfo fPosInfo;
- MemoryBlock fChunk;
-
- ScopedPointer fWindow;
-
- CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaPluginJuce)
-};
-
-CARLA_BACKEND_END_NAMESPACE
-
-#endif // defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CARLA_BACKEND_START_NAMESPACE
-
-CarlaPlugin* CarlaPlugin::newJuce(const Initializer& init, const char* const format)
-{
- carla_debug("CarlaPlugin::newJuce({%p, \"%s\", \"%s\", \"%s\", " P_INT64 "}, %s)", init.engine, init.filename, init.name, init.label, init.uniqueId, format);
-
-#if (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
- CarlaPluginJuce* const plugin(new CarlaPluginJuce(init.engine, init.id));
-
- if (! plugin->init(init.filename, init.name, init.label, init.uniqueId, init.options, format))
- {
- delete plugin;
- return nullptr;
- }
-
- return plugin;
-#else
- init.engine->setLastError("Juce plugin not available");
- return nullptr;
- (void)format;
-#endif
-}
-
-CARLA_BACKEND_END_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
diff --git a/source/backend/plugin/CarlaPluginVST2.cpp b/source/backend/plugin/CarlaPluginVST2.cpp
index fc3154f50..581650d43 100644
--- a/source/backend/plugin/CarlaPluginVST2.cpp
+++ b/source/backend/plugin/CarlaPluginVST2.cpp
@@ -853,13 +853,9 @@ public:
}
// check initial latency
-#ifdef VESTIGE_HEADER
char* const empty3Ptr = &fEffect->empty3[0];
int32_t initialDelay = *(int32_t*)empty3Ptr;
const uint32_t latency = (initialDelay > 0) ? static_cast(initialDelay) : 0;
-#else
- const uint32_t latency = (fEffect->initialDelay > 0) ? static_cast(fEffect->initialDelay) : 0;
-#endif
if (latency != 0)
{
@@ -2122,11 +2118,7 @@ public:
return false;
}
-#ifdef VESTIGE_HEADER
fEffect->ptr1 = this;
-#else
- fEffect->resvd1 = (intptr_t)this;
-#endif
dispatcher(effOpen, 0, 0, nullptr, 0.0f);
@@ -2360,21 +2352,12 @@ private:
if (effect != nullptr)
{
-#ifdef VESTIGE_HEADER
if (effect->ptr1 != nullptr)
{
self = (CarlaPluginVST2*)effect->ptr1;
if (self->fUnique1 != self->fUnique2)
self = nullptr;
}
-#else
- if (effect->resvd1 != 0)
- {
- self = (CarlaPluginVST2*)effect->resvd1;
- if (self->fUnique1 != self->fUnique2)
- self = nullptr;
- }
-#endif
if (self != nullptr)
{
@@ -2389,11 +2372,7 @@ private:
}
else if (sLastCarlaPluginVST2 != nullptr)
{
-#ifdef VESTIGE_HEADER
effect->ptr1 = sLastCarlaPluginVST2;
-#else
- effect->resvd1 = (intptr_t)sLastCarlaPluginVST2;
-#endif
self = sLastCarlaPluginVST2;
}
}
diff --git a/source/backend/plugin/CarlaPluginVST3.cpp b/source/backend/plugin/CarlaPluginVST3.cpp
deleted file mode 100644
index 0a0ebe3b4..000000000
--- a/source/backend/plugin/CarlaPluginVST3.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Carla VST3 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 "CarlaPlugin.hpp"
-#include "CarlaEngine.hpp"
-#include "CarlaUtils.hpp"
-
-CARLA_BACKEND_START_NAMESPACE
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CarlaPlugin* CarlaPlugin::newVST3(const Initializer& init)
-{
- carla_debug("CarlaPlugin::newVST3({%p, \"%s\", \"%s\", " P_INT64 "})", init.engine, init.filename, init.name, init.uniqueId);
-
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
- return newJuce(init, "VST3");
-#else
- init.engine->setLastError("VST3 support not available");
- return nullptr;
-#endif
-}
-
-// -------------------------------------------------------------------------------------------------------------------
-
-CARLA_BACKEND_END_NAMESPACE
diff --git a/source/backend/plugin/Makefile b/source/backend/plugin/Makefile
index aded98d31..43c8da095 100644
--- a/source/backend/plugin/Makefile
+++ b/source/backend/plugin/Makefile
@@ -18,9 +18,6 @@ OBJS = \
$(OBJDIR)/CarlaPluginDSSI.cpp.o \
$(OBJDIR)/CarlaPluginLV2.cpp.o \
$(OBJDIR)/CarlaPluginVST2.cpp.o \
- $(OBJDIR)/CarlaPluginVST3.cpp.o \
- $(OBJDIR)/CarlaPluginAU.cpp.o \
- $(OBJDIR)/CarlaPluginJuce.cpp.o \
$(OBJDIR)/CarlaPluginFluidSynth.cpp.o \
$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \
$(OBJDIR)/CarlaPluginJack.cpp.o
diff --git a/source/bridges-plugin/CarlaBridgeLV2.cpp b/source/bridges-plugin/CarlaBridgeLV2.cpp
index 29b74ce0d..2eb1e31be 100644
--- a/source/bridges-plugin/CarlaBridgeLV2.cpp
+++ b/source/bridges-plugin/CarlaBridgeLV2.cpp
@@ -29,15 +29,7 @@
#include "juce_audio_basics/juce_audio_basics.h"
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# include "juce_gui_basics/juce_gui_basics.h"
-#else
-# include "juce_events/juce_events.h"
-#endif
-
using juce::FloatVectorOperations;
-using juce::ScopedJuceInitialiser_GUI;
-using juce::SharedResourcePointer;
// ---------------------------------------------------------------------------------------------------------------------
@@ -551,8 +543,6 @@ private:
} fUI;
- SharedResourcePointer sJuceInitialiser;
-
// -------------------------------------------------------------------
#define handlePtr ((CarlaEngineLV2Single*)handle)
diff --git a/source/bridges-plugin/CarlaBridgePlugin.cpp b/source/bridges-plugin/CarlaBridgePlugin.cpp
index 42c5aed67..1f2a08ea8 100644
--- a/source/bridges-plugin/CarlaBridgePlugin.cpp
+++ b/source/bridges-plugin/CarlaBridgePlugin.cpp
@@ -38,22 +38,12 @@
#include "AppConfig.h"
#include "juce_core/juce_core.h"
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# include "juce_gui_basics/juce_gui_basics.h"
-using juce::JUCEApplication;
-using juce::JUCEApplicationBase;
-using juce::Timer;
-#else
-# include "juce_events/juce_events.h"
-#endif
-
using CarlaBackend::CarlaEngine;
using CarlaBackend::EngineCallbackOpcode;
using CarlaBackend::EngineCallbackOpcode2Str;
using juce::CharPointer_UTF8;
using juce::File;
-using juce::ScopedJuceInitialiser_GUI;
using juce::String;
// -------------------------------------------------------------------------
@@ -126,52 +116,6 @@ static void gIdle()
// -------------------------------------------------------------------------
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-class CarlaJuceApp : public JUCEApplication,
- private Timer
-{
-public:
- CarlaJuceApp() {}
- ~CarlaJuceApp() {}
-
- void initialise(const String&) override
- {
- startTimer(8);
- }
-
- void shutdown() override
- {
- gCloseNow = true;
- stopTimer();
- }
-
- const String getApplicationName() override
- {
- return "CarlaPlugin";
- }
-
- const String getApplicationVersion() override
- {
- return CARLA_VERSION_STRING;
- }
-
- void timerCallback() override
- {
- gIdle();
-
- if (gCloseNow)
- {
- quit();
- gCloseNow = false;
- }
- }
-};
-
-static JUCEApplicationBase* juce_CreateApplication() { return new CarlaJuceApp(); }
-#endif
-
-// -------------------------------------------------------------------------
-
class CarlaBridgePlugin
{
public:
@@ -181,7 +125,8 @@ public:
fUsingBridge(false)
{
CARLA_ASSERT(clientName != nullptr && clientName[0] != '\0');
- carla_debug("CarlaBridgePlugin::CarlaBridgePlugin(%s, \"%s\", %s, %s, %s, %s)", bool2str(useBridge), clientName, audioPoolBaseName, rtClientBaseName, nonRtClientBaseName, nonRtServerBaseName);
+ carla_debug("CarlaBridgePlugin::CarlaBridgePlugin(%s, \"%s\", %s, %s, %s, %s)",
+ bool2str(useBridge), clientName, audioPoolBaseName, rtClientBaseName, nonRtClientBaseName, nonRtServerBaseName);
carla_set_engine_callback(callback, this);
@@ -228,16 +173,11 @@ public:
gIsInitiated = true;
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
- JUCEApplicationBase::createInstance = &juce_CreateApplication;
- JUCEApplicationBase::main(JUCE_MAIN_FUNCTION_ARGS);
-#else
for (; ! gCloseNow;)
{
gIdle();
carla_msleep(8);
}
-#endif
carla_set_engine_about_to_close();
carla_remove_plugin(0);
@@ -275,8 +215,6 @@ private:
const CarlaEngine* fEngine;
bool fUsingBridge;
- const ScopedJuceInitialiser_GUI kJuceInitialiser;
-
static void callback(void* ptr, EngineCallbackOpcode action, unsigned int pluginId, int value1, int value2, float value3, const char* valueStr)
{
carla_debug("CarlaBridgePlugin::callback(%p, %i:%s, %i, %i, %i, %f, \"%s\")", ptr, action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr);
diff --git a/source/bridges-plugin/Makefile b/source/bridges-plugin/Makefile
index aab2e035b..e0904cb1b 100644
--- a/source/bridges-plugin/Makefile
+++ b/source/bridges-plugin/Makefile
@@ -26,10 +26,6 @@ BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/include
BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin
BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
-ifeq ($(CARLA_VESTIGE_HEADER),true)
-BUILD_CXX_FLAGS += -DVESTIGE_HEADER
-endif
-
32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
@@ -61,13 +57,6 @@ LIBS_win32 += $(MODULEDIR)/juce_core.win32.a
LIBS_win64 += $(MODULEDIR)/juce_core.win64.a
LINK_FLAGS += $(JUCE_CORE_LIBS)
-LIBS_native += $(MODULEDIR)/juce_events.a
-LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_events.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_events.win64.a
-LINK_FLAGS += $(JUCE_EVENTS_LIBS)
-
LIBS_native += $(MODULEDIR)/lilv.a
LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a
LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a
@@ -82,43 +71,6 @@ LIBS_win32 += $(MODULEDIR)/rtmempool.win32.a
LIBS_win64 += $(MODULEDIR)/rtmempool.win64.a
LINK_FLAGS += $(RTMEMPOOL_LIBS)
-ifeq ($(MACOS_OR_WIN32),true)
-LIBS_native += $(MODULEDIR)/juce_audio_processors.a
-LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a
-LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
-
-LIBS_native += $(MODULEDIR)/juce_data_structures.a
-LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a
-LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
-
-LIBS_native += $(MODULEDIR)/juce_graphics.a
-LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a
-LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
-
-LIBS_native += $(MODULEDIR)/juce_gui_basics.a
-LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a
-LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
-
-ifeq ($(MACOS),true)
-LIBS_native += $(MODULEDIR)/juce_gui_extra.a
-LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a
-LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
-endif
-endif
-
ifeq ($(HAVE_LIBLO),true)
LINK_FLAGS += $(LIBLO_LIBS)
endif
@@ -150,9 +102,6 @@ NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
endif
-LIBS_native += $(MODULEDIR)/juce_audio_formats.a
-NATIVE_LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
-
LIBS_native += $(MODULEDIR)/native-plugins.a
NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
@@ -183,9 +132,6 @@ OBJS_native = \
$(OBJDIR)/CarlaPluginDSSI.cpp.o \
$(OBJDIR)/CarlaPluginLV2.cpp.o \
$(OBJDIR)/CarlaPluginVST2.cpp.o \
- $(OBJDIR)/CarlaPluginVST3.cpp.o \
- $(OBJDIR)/CarlaPluginAU.cpp.o \
- $(OBJDIR)/CarlaPluginJuce.cpp.o \
$(OBJDIR)/CarlaPluginFluidSynth.cpp.o \
$(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \
$(OBJDIR)/CarlaStandalone.cpp.o
@@ -213,9 +159,6 @@ OBJS_arch = \
$(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \
$(OBJDIR)/CarlaPluginLV2.cpp.arch.o \
$(OBJDIR)/CarlaPluginVST2.cpp.arch.o \
- $(OBJDIR)/CarlaPluginVST3.cpp.arch.o \
- $(OBJDIR)/CarlaPluginAU.cpp.arch.o \
- $(OBJDIR)/CarlaPluginJuce.cpp.arch.o \
$(OBJDIR)/CarlaStandalone.cpp.arch.o
OBJS_posix32 = $(OBJS_arch:%.arch.o=%.posix32.o)
diff --git a/source/carla-control b/source/carla-control
index e01b64a1f..ac18a8b71 100755
--- a/source/carla-control
+++ b/source/carla-control
@@ -51,7 +51,7 @@ if __name__ == '__main__':
# Init host backend
host = initHost(initName, libPrefix, True, False, True, CarlaHostOSC)
- host.processMode = ENGINE_PROCESS_MODE_PATCHBAY
+ host.processMode = ENGINE_PROCESS_MODE_BRIDGE
host.processModeForced = True
loadHostSettings(host)
diff --git a/source/carla-patchbay b/source/carla-patchbay
deleted file mode 100755
index 64d679578..000000000
--- a/source/carla-patchbay
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Carla plugin host
-# Copyright (C) 2011-2017 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.
-
-# ----------------------------------------------------------------------------------------------------------------------
-# Imports (Custom Stuff)
-
-from carla_host import *
-
-# ----------------------------------------------------------------------------------------------------------------------
-# Main
-
-if __name__ == '__main__':
- # ------------------------------------------------------------------------------------------------------------------
- # Read CLI args
-
- initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
-
- # ------------------------------------------------------------------------------------------------------------------
- # App initialization
-
- app = CarlaApplication("Carla2-Patchbay", libPrefix)
-
- # ------------------------------------------------------------------------------------------------------------------
- # Set-up custom signal handling
-
- setUpSignals()
-
- # ------------------------------------------------------------------------------------------------------------------
- # Init host backend
-
- host = initHost(initName, libPrefix, False, False, True)
- host.processMode = ENGINE_PROCESS_MODE_PATCHBAY
- host.processModeForced = True
- loadHostSettings(host)
-
- # ------------------------------------------------------------------------------------------------------------------
- # Create GUI
-
- gui = HostWindow(host, True)
-
- # ------------------------------------------------------------------------------------------------------------------
- # Show GUI
-
- gui.show()
-
- # ------------------------------------------------------------------------------------------------------------------
- # App-Loop
-
- app.exit_exec()
diff --git a/source/carla_backend.pro b/source/carla_backend.pro
index e2c3292ed..58f5c5c17 100644
--- a/source/carla_backend.pro
+++ b/source/carla_backend.pro
@@ -56,8 +56,7 @@ SOURCES = \
backend/plugin/CarlaPluginLinuxSampler.cpp \
backend/plugin/CarlaPluginLV2.cpp \
backend/plugin/CarlaPluginNative.cpp \
- backend/plugin/CarlaPluginVST2.cpp \
- backend/plugin/CarlaPluginVST3.cpp
+ backend/plugin/CarlaPluginVST2.cpp
HEADERS = \
# C API
diff --git a/source/carla_backend.py b/source/carla_backend.py
index 5996bd04b..5f353b2e6 100644
--- a/source/carla_backend.py
+++ b/source/carla_backend.py
@@ -144,12 +144,6 @@ def structToDict(struct):
# Maximum default number of loadable plugins.
MAX_DEFAULT_PLUGINS = 99
-# Maximum number of loadable plugins in rack mode.
-MAX_RACK_PLUGINS = 16
-
-# Maximum number of loadable plugins in patchbay mode.
-MAX_PATCHBAY_PLUGINS = 255
-
# Maximum default number of parameters allowed.
# @see ENGINE_OPTION_MAX_PARAMETERS
MAX_DEFAULT_PARAMETERS = 200
@@ -387,24 +381,17 @@ PLUGIN_LV2 = 4
# VST2 plugin.
PLUGIN_VST2 = 5
-# VST3 plugin.
-PLUGIN_VST3 = 6
-
-# AU plugin.
-# @note MacOS only
-PLUGIN_AU = 7
-
# GIG file.
-PLUGIN_GIG = 8
+PLUGIN_GIG = 6
# SF2 file (SoundFont).
-PLUGIN_SF2 = 9
+PLUGIN_SF2 = 7
# SFZ file.
-PLUGIN_SFZ = 10
+PLUGIN_SFZ = 8
# JACK application.
-PLUGIN_JACK = 11
+PLUGIN_JACK = 9
# ------------------------------------------------------------------------------------------------------------
# Plugin Category
@@ -717,7 +704,7 @@ ENGINE_CALLBACK_QUIT = 40
ENGINE_OPTION_DEBUG = 0
# Set the engine processing mode.
-# Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_PATCHBAY for all other OSes.
+# Default is ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS on Linux and ENGINE_PROCESS_MODE_CONTINUOUS_RACK for all other OSes.
# @see EngineProcessMode
ENGINE_OPTION_PROCESS_MODE = 1
@@ -828,11 +815,8 @@ ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS = 1
# Processes plugins in order of Id, with forced stereo always on.
ENGINE_PROCESS_MODE_CONTINUOUS_RACK = 2
-# Single client, 'patchbay' mode.
-ENGINE_PROCESS_MODE_PATCHBAY = 3
-
# Special mode, used in plugin-bridges only.
-ENGINE_PROCESS_MODE_BRIDGE = 4
+ENGINE_PROCESS_MODE_BRIDGE = 3
# ------------------------------------------------------------------------------------------------------------
# Engine Transport Mode
@@ -1245,9 +1229,9 @@ class CarlaHostMeta(object):
self.nsmOK = False
# settings
- self.processMode = ENGINE_PROCESS_MODE_PATCHBAY
+ self.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK
self.transportMode = ENGINE_TRANSPORT_MODE_INTERNAL
- self.nextProcessMode = ENGINE_PROCESS_MODE_PATCHBAY
+ self.nextProcessMode = self.processMode
self.processModeForced = False
self.audioDriverForced = None
@@ -1388,7 +1372,7 @@ class CarlaHostMeta(object):
# @param external Wherever to show external/hardware ports instead of internal ones.
# Only valid in patchbay engine mode, other modes will ignore this.
@abstractmethod
- def patchbay_refresh(self, external):
+ def patchbay_refresh(self):
raise NotImplementedError
# Start playback of the engine transport.
@@ -1942,7 +1926,7 @@ class CarlaHostNull(CarlaHostMeta):
def patchbay_disconnect(self, connectionId):
return False
- def patchbay_refresh(self, external):
+ def patchbay_refresh(self):
return False
def transport_play(self):
@@ -2224,7 +2208,7 @@ class CarlaHostDLL(CarlaHostMeta):
self.lib.carla_patchbay_disconnect.argtypes = [c_uint]
self.lib.carla_patchbay_disconnect.restype = c_bool
- self.lib.carla_patchbay_refresh.argtypes = [c_bool]
+ self.lib.carla_patchbay_refresh.argtypes = None
self.lib.carla_patchbay_refresh.restype = c_bool
self.lib.carla_transport_play.argtypes = None
@@ -2498,8 +2482,8 @@ class CarlaHostDLL(CarlaHostMeta):
def patchbay_disconnect(self, connectionId):
return bool(self.lib.carla_patchbay_disconnect(connectionId))
- def patchbay_refresh(self, external):
- return bool(self.lib.carla_patchbay_refresh(external))
+ def patchbay_refresh(self):
+ return bool(self.lib.carla_patchbay_refresh())
def transport_play(self):
self.lib.carla_transport_play()
@@ -2835,8 +2819,7 @@ class CarlaHostPlugin(CarlaHostMeta):
def patchbay_disconnect(self, connectionId):
return self.sendMsgAndSetError(["patchbay_disconnect", connectionId])
- def patchbay_refresh(self, external):
- # don't send external param, never used in plugins
+ def patchbay_refresh(self):
return self.sendMsgAndSetError(["patchbay_refresh"])
def transport_play(self):
diff --git a/source/carla_database.py b/source/carla_database.py
index 58e6717f8..2b31ffc41 100755
--- a/source/carla_database.py
+++ b/source/carla_database.py
@@ -89,15 +89,6 @@ def findBinaries(binPath, OS):
return binaries
-def findVST3Binaries(binPath):
- binaries = []
-
- for root, dirs, files in os.walk(binPath):
- for name in [name for name in files if name.lower().endswith(".vst3")]:
- binaries.append(os.path.join(root, name))
-
- return binaries
-
def findLV2Bundles(bundlePath):
bundles = []
@@ -108,12 +99,12 @@ def findLV2Bundles(bundlePath):
return bundles
-def findMacVSTBundles(bundlePath, isVST3):
+def findMacVSTBundles(bundlePath):
bundles = []
for root, dirs, files in os.walk(bundlePath, followlinks=True):
#if root == bundlePath: continue # FIXME
- for name in [name for name in dirs if name.lower().endswith(".vst3" if isVST3 else ".vst")]:
+ for name in [name for name in dirs if name.lower().endswith(".vst")]:
bundles.append(os.path.join(root, name))
return bundles
@@ -354,12 +345,6 @@ def checkPluginLV2(filename, tool, wineSettings=None):
def checkPluginVST2(filename, tool, wineSettings=None):
return runCarlaDiscovery(PLUGIN_VST2, "VST2", filename, tool, wineSettings)
-def checkPluginVST3(filename, tool, wineSettings=None):
- return runCarlaDiscovery(PLUGIN_VST3, "VST3", filename, tool, wineSettings)
-
-def checkPluginAU(tool):
- return runCarlaDiscovery(None, PLUGIN_AU, "AU", ":all", tool)
-
def checkFileGIG(filename, tool):
return runCarlaDiscovery(None, PLUGIN_GIG, "GIG", filename, tool)
@@ -391,7 +376,6 @@ class SearchPluginsThread(QThread):
self.fCheckDSSI = False
self.fCheckLV2 = False
self.fCheckVST2 = False
- self.fCheckVST3 = False
self.fCheckAU = False
self.fCheckGIG = False
self.fCheckSF2 = False
@@ -426,7 +410,6 @@ class SearchPluginsThread(QThread):
self.fDssiPlugins = []
self.fLv2Plugins = []
self.fVst2Plugins = []
- self.fVst3Plugins = []
self.fAuPlugins = []
self.fKitPlugins = []
@@ -442,13 +425,11 @@ class SearchPluginsThread(QThread):
self.fCheckWin32 = win32
self.fCheckWin64 = win64
- def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, vst3, au, gig, sf2, sfz):
+ def setSearchPluginTypes(self, ladspa, dssi, lv2, vst2, gig, sf2, sfz):
self.fCheckLADSPA = ladspa
self.fCheckDSSI = dssi
self.fCheckLV2 = lv2
self.fCheckVST2 = vst2
- self.fCheckVST3 = vst3 and (MACOS or WINDOWS)
- self.fCheckAU = au and MACOS
self.fCheckGIG = gig
self.fCheckSF2 = sf2
self.fCheckSFZ = sfz
@@ -468,26 +449,16 @@ class SearchPluginsThread(QThread):
if self.fCheckLADSPA: pluginCount += 1
if self.fCheckDSSI: pluginCount += 1
if self.fCheckVST2: pluginCount += 1
- if self.fCheckVST3: pluginCount += 1
# Increase count by the number of externally discoverable plugin types
if self.fCheckNative:
self.fCurCount += pluginCount
- # MacOS and Windows are the only VST3 supported OSes
- if self.fCheckVST3 and not (MACOS or WINDOWS):
- self.fCurCount -= 1
if self.fCheckPosix32:
self.fCurCount += pluginCount
- # MacOS is the only VST3 supported posix OS
- if self.fCheckVST3 and not MACOS:
- self.fCurCount -= 1
if self.fCheckPosix64:
self.fCurCount += pluginCount
- # MacOS is the only VST3 supported posix OS
- if self.fCheckVST3 and not MACOS:
- self.fCurCount -= 1
if self.fCheckWin32:
self.fCurCount += pluginCount
@@ -626,7 +597,7 @@ class SearchPluginsThread(QThread):
if not self.fContinueChecking: return
if self.fCheckLV2:
- self._checkCached(True)
+ self._checkLv2Cached()
settingsDB.setValue("Plugins/LV2", self.fLv2Plugins)
if not self.fContinueChecking: return
@@ -659,45 +630,6 @@ class SearchPluginsThread(QThread):
settingsDB.sync()
if not self.fContinueChecking: return
- if self.fCheckVST3:
- if self.fCheckNative and (MACOS or WINDOWS):
- self._checkVST3(self.fToolNative)
- settingsDB.setValue("Plugins/VST3_native", self.fVst3Plugins)
- if not self.fContinueChecking: return
-
- if self.fCheckPosix32 and MACOS:
- self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-posix32"))
- settingsDB.setValue("Plugins/VST3_posix32", self.fVst3Plugins)
- if not self.fContinueChecking: return
-
- if self.fCheckPosix64 and MACOS:
- self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-posix64"))
- settingsDB.setValue("Plugins/VST3_posix64", self.fVst3Plugins)
- if not self.fContinueChecking: return
-
- if self.fCheckWin32:
- self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-win32.exe"), not WINDOWS)
- settingsDB.setValue("Plugins/VST3_win32", self.fVst3Plugins)
- if not self.fContinueChecking: return
-
- if self.fCheckWin64:
- self._checkVST3(os.path.join(self.fPathBinaries, "carla-discovery-win64.exe"), not WINDOWS)
- settingsDB.setValue("Plugins/VST3_win64", self.fVst3Plugins)
-
- settingsDB.sync()
- if not self.fContinueChecking: return
-
- if self.fCheckAU:
- if self.fCheckNative:
- self._checkCached(True)
- settingsDB.setValue("Plugins/AU", self.fAuPlugins)
- if not self.fContinueChecking: return
-
- if self.fCheckPosix32:
- self._checkAU(os.path.join(self.fPathBinaries, "carla-discovery-posix32"))
- settingsDB.setValue("Plugins/AU_posix32", self.fAuPlugins)
- if not self.fContinueChecking: return
-
if self.fCheckGIG:
settings = QSettings("falkTX", "Carla2")
GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH))
@@ -831,54 +763,6 @@ class SearchPluginsThread(QThread):
self.fLastCheckValue += self.fCurPercentValue
- def _checkVST3(self, tool, isWine=False):
- vst3Binaries = []
- self.fVst3Plugins = []
-
- if MACOS and not isWine:
- self._pluginLook(self.fLastCheckValue, "VST3 bundles...")
- else:
- self._pluginLook(self.fLastCheckValue, "VST3 plugins...")
-
- settings = QSettings("falkTX", "Carla2")
- VST3_PATH = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH))
- del settings
-
- for iPATH in VST3_PATH:
- if MACOS and not isWine:
- binaries = findMacVSTBundles(iPATH, True)
- else:
- binaries = findVST3Binaries(iPATH)
- for binary in binaries:
- if binary not in vst3Binaries:
- vst3Binaries.append(binary)
-
- vst3Binaries.sort()
-
- if not self.fContinueChecking: return
-
- for i in range(len(vst3Binaries)):
- vst3 = vst3Binaries[i]
- percent = ( float(i) / len(vst3Binaries) ) * self.fCurPercentValue
- self._pluginLook(self.fLastCheckValue + percent, vst3)
-
- plugins = checkPluginVST3(vst3, tool, self.fWineSettings if isWine else None)
- if plugins:
- self.fVst3Plugins.append(plugins)
-
- if not self.fContinueChecking: break
-
- self.fLastCheckValue += self.fCurPercentValue
-
- def _checkAU(self, tool):
- self.fAuPlugins = []
-
- plugins = checkPluginAU(tool)
- if plugins:
- self.fAuPlugins.append(plugins)
-
- self.fLastCheckValue += self.fCurPercentValue
-
def _checkKIT(self, kitPATH, kitExtension):
kitFiles = []
self.fKitPlugins = []
@@ -914,35 +798,27 @@ class SearchPluginsThread(QThread):
self.fLastCheckValue += self.fCurPercentValue
- def _checkCached(self, isLV2):
- if isLV2:
- settings = QSettings("falkTX", "Carla2")
- PLUG_PATH = splitter.join(toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)))
- del settings
- PLUG_TEXT = "LV2"
- PLUG_TYPE = PLUGIN_LV2
- self.fLv2Plugins = []
- PLUG_LIST = self.fLv2Plugins
- else:
- PLUG_PATH = ""
- PLUG_TEXT = "AU"
- PLUG_TYPE = PLUGIN_AU
- self.fAuPlugins = []
- PLUG_LIST = self.fAuPlugins
+ def _checkLv2Cached(self):
+ settings = QSettings("falkTX", "Carla2")
+ PLUG_PATH = splitter.join(toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH)))
+ del settings
+
+ self.fLv2Plugins = []
+ PLUG_LIST = self.fLv2Plugins
- self._pluginLook(self.fLastCheckValue, "%s plugins..." % PLUG_TEXT)
+ self._pluginLook(self.fLastCheckValue, "LV2 plugins...")
- count = gCarla.utils.get_cached_plugin_count(PLUG_TYPE, PLUG_PATH)
+ count = gCarla.utils.get_cached_plugin_count(PLUGIN_LV2, PLUG_PATH)
if not self.fContinueChecking: return
for i in range(count):
- descInfo = gCarla.utils.get_cached_plugin_info(PLUG_TYPE, i)
+ descInfo = gCarla.utils.get_cached_plugin_info(PLUGIN_LV2, i)
percent = ( float(i) / count ) * self.fCurPercentValue
self._pluginLook(self.fLastCheckValue + percent, descInfo['label'])
- plugins = checkPluginCached(descInfo, PLUG_TYPE)
+ plugins = checkPluginCached(descInfo, PLUGIN_LV2)
if plugins:
PLUG_LIST.append(plugins)
@@ -1054,14 +930,6 @@ class PluginRefreshW(QDialog):
self.ui.ico_posix32.setVisible(False)
self.ui.label_posix32.setVisible(False)
- if not MACOS:
- self.ui.ch_au.setEnabled(False)
- self.ui.ch_au.setVisible(False)
-
- if not (hasWin32 or hasWin64):
- self.ui.ch_vst3.setEnabled(False)
- self.ui.ch_vst3.setVisible(False)
-
if hasNative:
self.ui.ico_native.setPixmap(self.fIconYes)
else:
@@ -1074,7 +942,6 @@ class PluginRefreshW(QDialog):
self.ui.ch_ladspa.setEnabled(False)
self.ui.ch_dssi.setEnabled(False)
self.ui.ch_vst.setEnabled(False)
- self.ui.ch_vst3.setEnabled(False)
# --------------------------------------------------------------------------------------------------------------
# Load settings
@@ -1142,8 +1009,6 @@ class PluginRefreshW(QDialog):
self.ui.ch_dssi.clicked.connect(self.slot_checkTools)
self.ui.ch_lv2.clicked.connect(self.slot_checkTools)
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_gig.clicked.connect(self.slot_checkTools)
self.ui.ch_sf2.clicked.connect(self.slot_checkTools)
self.ui.ch_sfz.clicked.connect(self.slot_checkTools)
@@ -1172,18 +1037,6 @@ class PluginRefreshW(QDialog):
check = settings.value("PluginDatabase/SearchVST2", True, type=bool) and self.ui.ch_vst.isEnabled()
self.ui.ch_vst.setChecked(check)
- if MACOS or WINDOWS:
- check = settings.value("PluginDatabase/SearchVST3", True, type=bool) and self.ui.ch_vst3.isEnabled()
- else:
- check = False
- self.ui.ch_vst3.setChecked(check)
-
- if MACOS:
- check = settings.value("PluginDatabase/SearchAU", True, type=bool) and self.ui.ch_au.isEnabled()
- else:
- check = False
- self.ui.ch_au.setChecked(check)
-
check = settings.value("PluginDatabase/SearchGIG", False, type=bool) and self.ui.ch_gig.isEnabled()
self.ui.ch_gig.setChecked(check)
@@ -1219,8 +1072,6 @@ class PluginRefreshW(QDialog):
settings.setValue("PluginDatabase/SearchDSSI", self.ui.ch_dssi.isChecked())
settings.setValue("PluginDatabase/SearchLV2", self.ui.ch_lv2.isChecked())
settings.setValue("PluginDatabase/SearchVST2", 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/SearchGIG", self.ui.ch_gig.isChecked())
settings.setValue("PluginDatabase/SearchSF2", self.ui.ch_sf2.isChecked())
settings.setValue("PluginDatabase/SearchSFZ", self.ui.ch_sfz.isChecked())
@@ -1253,14 +1104,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, 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())
+ ladspa, dssi, lv2, vst, 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_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, gig, sf2, sfz)
+ self.fThread.setSearchPluginTypes(ladspa, dssi, lv2, vst, gig, sf2, sfz)
self.fThread.start()
# ------------------------------------------------------------------------------------------------------------------
@@ -1277,8 +1127,8 @@ class PluginRefreshW(QDialog):
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
+ 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_gig.isChecked() or self.ui.ch_sf2.isChecked() or self.ui.ch_sfz.isChecked())
self.ui.b_start.setEnabled(enabled1 and enabled2)
@@ -1408,8 +1258,6 @@ class PluginDatabaseW(QDialog):
self.ui.ch_dssi.clicked.connect(self.slot_checkFilters)
self.ui.ch_lv2.clicked.connect(self.slot_checkFilters)
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_kits.clicked.connect(self.slot_checkFilters)
self.ui.ch_native.clicked.connect(self.slot_checkFilters)
self.ui.ch_bridged.clicked.connect(self.slot_checkFilters)
@@ -1470,8 +1318,6 @@ class PluginDatabaseW(QDialog):
settings.setValue("PluginDatabase/ShowDSSI", self.ui.ch_dssi.isChecked())
settings.setValue("PluginDatabase/ShowLV2", self.ui.ch_lv2.isChecked())
settings.setValue("PluginDatabase/ShowVST2", 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/ShowKits", self.ui.ch_kits.isChecked())
settings.setValue("PluginDatabase/ShowNative", self.ui.ch_native.isChecked())
settings.setValue("PluginDatabase/ShowBridged", self.ui.ch_bridged.isChecked())
@@ -1495,8 +1341,6 @@ class PluginDatabaseW(QDialog):
self.ui.ch_dssi.setChecked(settings.value("PluginDatabase/ShowDSSI", True, type=bool))
self.ui.ch_lv2.setChecked(settings.value("PluginDatabase/ShowLV2", True, type=bool))
self.ui.ch_vst.setChecked(settings.value("PluginDatabase/ShowVST2", 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_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))
@@ -1529,8 +1373,6 @@ class PluginDatabaseW(QDialog):
hideDssi = not self.ui.ch_dssi.isChecked()
hideLV2 = not self.ui.ch_lv2.isChecked()
hideVST2 = not self.ui.ch_vst.isChecked()
- hideVST3 = not self.ui.ch_vst3.isChecked()
- hideAU = not self.ui.ch_au.isChecked()
hideKits = not self.ui.ch_kits.isChecked()
hideNative = not self.ui.ch_native.isChecked()
@@ -1595,10 +1437,6 @@ class PluginDatabaseW(QDialog):
self.ui.tableWidget.hideRow(i)
elif hideVST2 and ptype == "VST2":
self.ui.tableWidget.hideRow(i)
- elif hideVST3 and ptype == "VST3":
- self.ui.tableWidget.hideRow(i)
- elif hideAU and ptype == "AU":
- self.ui.tableWidget.hideRow(i)
elif hideNative and isNative:
self.ui.tableWidget.hideRow(i)
elif hideBridged and isBridged:
@@ -1695,8 +1533,6 @@ class PluginDatabaseW(QDialog):
dssiCount = 0
lv2Count = 0
vstCount = 0
- vst3Count = 0
- auCount = 0
kitCount = 0
settings = QSettings("falkTX", "Carla2")
@@ -1767,39 +1603,6 @@ class PluginDatabaseW(QDialog):
del lv2CountNew
del lv2Plugins
- # ----------------------------------------------------------------------------------------------------
- # Cached plugins (AU)
-
- if MACOS:
- auPlugins = toList(settingsDB.value("Plugins/AU", []))
-
- for plugins in auPlugins:
- auCount += len(plugins)
-
- auCountNew = gCarla.utils.get_cached_plugin_count(PLUGIN_AU, "")
-
- if auCountNew != auCount or (len(auPlugins) > 0 and
- len(auPlugins[0]) > 0 and
- auPlugins[0][0]['API'] != PLUGIN_QUERY_API_VERSION):
- auCount = auCountNew
- auPlugins = []
-
- for i in range(auCountNew):
- descInfo = gCarla.utils.get_cached_plugin_info(PLUGIN_AU, i)
- plugins = checkPluginCached(descInfo, PLUGIN_AU)
-
- if plugins:
- auPlugins.append(plugins)
-
- settingsDB.setValue("Plugins/AU", auPlugins)
-
- for plugins in auPlugins:
- for plugin in plugins:
- self._addPluginToTable(plugin, "AU")
-
- del auCountNew
- del auPlugins
-
# ----------------------------------------------------------------------------------------------------
# LADSPA
@@ -1851,36 +1654,6 @@ class PluginDatabaseW(QDialog):
del vst2Plugins
- # ----------------------------------------------------------------------------------------------------
- # VST3
-
- vst3Plugins = []
- vst3Plugins += toList(settingsDB.value("Plugins/VST3_native", []))
- vst3Plugins += toList(settingsDB.value("Plugins/VST3_posix32", []))
- vst3Plugins += toList(settingsDB.value("Plugins/VST3_posix64", []))
- vst3Plugins += toList(settingsDB.value("Plugins/VST3_win32", []))
- vst3Plugins += toList(settingsDB.value("Plugins/VST3_win64", []))
-
- for plugins in vst3Plugins:
- for plugin in plugins:
- self._addPluginToTable(plugin, "VST3")
- vst3Count += 1
-
- del vst3Plugins
-
- # ----------------------------------------------------------------------------------------------------
- # AU (extra non-cached)
-
- if MACOS:
- auPlugins = toList(settingsDB.value("Plugins/AU_posix32", []))
-
- for plugins in auPlugins:
- for plugin in plugins:
- self._addPluginToTable(plugin, "AU")
- auCount += 1
-
- del auPlugins
-
# ----------------------------------------------------------------------------------------------------
# Kits
@@ -1919,12 +1692,8 @@ class PluginDatabaseW(QDialog):
self.ui.tableWidget.setSortingEnabled(True)
- if MACOS:
- self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2, %i VST, %i VST3 and %i AudioUnit plugins, plus %i Sound Kits" % (
- internalCount, ladspaCount, dssiCount, lv2Count, vstCount, vst3Count, auCount, kitCount)))
- 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)))
+ self.ui.label.setText(self.tr("Have %i Internal, %i LADSPA, %i DSSI, %i LV2 and %i VST plugins, plus %i Sound Kits" % (
+ internalCount, ladspaCount, dssiCount, lv2Count, vstCount, kitCount)))
self._checkFilters()
diff --git a/source/carla_host.py b/source/carla_host.py
index 1b23093f7..0e922d425 100644
--- a/source/carla_host.py
+++ b/source/carla_host.py
@@ -158,10 +158,7 @@ class HostWindow(QMainWindow):
# Internal stuff (patchbay)
self.fExportImage = QImage()
-
self.fPeaksCleared = True
-
- self.fExternalPatchbay = False
self.fSelectedPlugins = []
self.fCanvasWidth = 0
@@ -219,11 +216,6 @@ class HostWindow(QMainWindow):
self.ui.act_engine_stop.setEnabled(False)
self.ui.act_plugin_remove_all.setEnabled(False)
- self.ui.act_canvas_show_internal.setChecked(False)
- self.ui.act_canvas_show_internal.setVisible(False)
- self.ui.act_canvas_show_external.setChecked(False)
- self.ui.act_canvas_show_external.setVisible(False)
-
self.ui.menu_PluginMacros.setEnabled(False)
self.ui.menu_Canvas.setEnabled(False)
@@ -231,8 +223,6 @@ class HostWindow(QMainWindow):
self.ui.dockWidget.setTitleBarWidget(self.ui.dockWidgetTitleBar)
if not withCanvas:
- self.ui.act_canvas_show_internal.setVisible(False)
- self.ui.act_canvas_show_external.setVisible(False)
self.ui.act_canvas_arrange.setVisible(False)
self.ui.act_canvas_refresh.setVisible(False)
self.ui.act_canvas_save_image.setVisible(False)
@@ -411,8 +401,6 @@ class HostWindow(QMainWindow):
self.ui.act_plugins_expand.triggered.connect(self.slot_pluginsExpand)
self.ui.act_plugins_panic.triggered.connect(self.slot_pluginsDisable)
- self.ui.act_canvas_show_internal.triggered.connect(self.slot_canvasShowInternal)
- self.ui.act_canvas_show_external.triggered.connect(self.slot_canvasShowExternal)
self.ui.act_canvas_arrange.triggered.connect(self.slot_canvasArrange)
self.ui.act_canvas_refresh.triggered.connect(self.slot_canvasRefresh)
self.ui.act_canvas_zoom_fit.triggered.connect(self.slot_canvasZoomFit)
@@ -429,7 +417,6 @@ class HostWindow(QMainWindow):
self.ui.act_settings_configure.triggered.connect(self.slot_configureCarla)
self.ui.act_help_about.triggered.connect(self.slot_aboutCarla)
- self.ui.act_help_about_juce.triggered.connect(self.slot_aboutJuce)
self.ui.act_help_about_qt.triggered.connect(self.slot_aboutQt)
self.ui.cb_disk.currentIndexChanged.connect(self.slot_diskFolderChanged)
@@ -511,10 +498,6 @@ class HostWindow(QMainWindow):
if self.host.isPlugin:
self.startTimers()
- # Start in patchbay tab if using forced patchbay mode
- if host.processModeForced and host.processMode == ENGINE_PROCESS_MODE_PATCHBAY and not host.isControl:
- self.ui.tabWidget.setCurrentIndex(1)
-
# Load initial project file if set
if not (self.host.isControl or self.host.isPlugin):
projectFile = getInitialProjectFile(QApplication.instance())
@@ -762,23 +745,6 @@ class HostWindow(QMainWindow):
self.ui.menu_PluginMacros.setEnabled(True)
self.ui.menu_Canvas.setEnabled(True)
- self.ui.act_canvas_show_internal.blockSignals(True)
- self.ui.act_canvas_show_external.blockSignals(True)
-
- if processMode == ENGINE_PROCESS_MODE_PATCHBAY and not (self.host.isControl or self.host.isPlugin):
- self.ui.act_canvas_show_internal.setChecked(True)
- self.ui.act_canvas_show_internal.setVisible(True)
- self.ui.act_canvas_show_external.setChecked(False)
- self.ui.act_canvas_show_external.setVisible(True)
- else:
- self.ui.act_canvas_show_internal.setChecked(False)
- self.ui.act_canvas_show_internal.setVisible(False)
- self.ui.act_canvas_show_external.setChecked(False)
- self.ui.act_canvas_show_external.setVisible(False)
-
- self.ui.act_canvas_show_internal.blockSignals(False)
- self.ui.act_canvas_show_external.blockSignals(False)
-
if not (self.host.isControl or self.host.isPlugin):
canSave = (self.fProjectFilename and os.path.exists(self.fProjectFilename)) or not self.fSessionManagerName
self.ui.act_file_save.setEnabled(canSave)
@@ -1200,28 +1166,6 @@ class HostWindow(QMainWindow):
# --------------------------------------------------------------------------------------------------------
# Canvas (menu actions)
- @pyqtSlot()
- def slot_canvasShowInternal(self):
- self.fExternalPatchbay = False
- self.ui.act_canvas_show_internal.blockSignals(True)
- self.ui.act_canvas_show_external.blockSignals(True)
- self.ui.act_canvas_show_internal.setChecked(True)
- self.ui.act_canvas_show_external.setChecked(False)
- self.ui.act_canvas_show_internal.blockSignals(False)
- self.ui.act_canvas_show_external.blockSignals(False)
- self.slot_canvasRefresh()
-
- @pyqtSlot()
- def slot_canvasShowExternal(self):
- self.fExternalPatchbay = True
- self.ui.act_canvas_show_internal.blockSignals(True)
- self.ui.act_canvas_show_external.blockSignals(True)
- self.ui.act_canvas_show_internal.setChecked(False)
- self.ui.act_canvas_show_external.setChecked(True)
- self.ui.act_canvas_show_internal.blockSignals(False)
- self.ui.act_canvas_show_external.blockSignals(False)
- self.slot_canvasRefresh()
-
@pyqtSlot()
def slot_canvasArrange(self):
patchcanvas.arrange()
@@ -1234,7 +1178,7 @@ class HostWindow(QMainWindow):
return
if self.host.is_engine_running():
- self.host.patchbay_refresh(self.fExternalPatchbay)
+ self.host.patchbay_refresh()
self.updateMiniCanvasLater()
@@ -1558,7 +1502,7 @@ class HostWindow(QMainWindow):
if self.host.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK and self.host.isPlugin:
pass
elif self.host.is_engine_running():
- self.host.patchbay_refresh(self.fExternalPatchbay)
+ self.host.patchbay_refresh()
for pitem in self.fPluginList:
if pitem is None:
@@ -1573,10 +1517,6 @@ class HostWindow(QMainWindow):
def slot_aboutCarla(self):
CarlaAboutW(self.fParentOrSelf, self.host).exec_()
- @pyqtSlot()
- def slot_aboutJuce(self):
- JuceAboutW(self.fParentOrSelf).exec_()
-
@pyqtSlot()
def slot_aboutQt(self):
QApplication.instance().aboutQt()
@@ -2659,7 +2599,6 @@ def setEngineSettings(host):
DSSI_PATH = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH))
LV2_PATH = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH))
VST2_PATH = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH))
- VST3_PATH = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH))
GIG_PATH = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH))
SF2_PATH = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH))
SFZ_PATH = toList(settings.value(CARLA_KEY_PATHS_SFZ, CARLA_DEFAULT_SFZ_PATH))
@@ -2668,7 +2607,6 @@ def setEngineSettings(host):
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(DSSI_PATH))
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(LV2_PATH))
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(VST2_PATH))
- host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(VST3_PATH))
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(GIG_PATH))
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SF2, splitter.join(SF2_PATH))
host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SFZ, splitter.join(SFZ_PATH))
diff --git a/source/carla_settings.py b/source/carla_settings.py
index de499c454..3c570dc35 100755
--- a/source/carla_settings.py
+++ b/source/carla_settings.py
@@ -202,7 +202,6 @@ class CarlaSettingsW(QDialog):
PATH_INDEX_DSSI = 1
PATH_INDEX_LV2 = 2
PATH_INDEX_VST2 = 3
- PATH_INDEX_VST3 = 4
PATH_INDEX_GIG = 5
PATH_INDEX_SF2 = 6
PATH_INDEX_SFZ = 7
@@ -315,7 +314,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_dssi.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_lv2.currentRowChanged.connect(self.slot_pluginPathRowChanged)
self.ui.lw_vst.currentRowChanged.connect(self.slot_pluginPathRowChanged)
- self.ui.lw_vst3.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)
@@ -332,7 +330,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_dssi.setCurrentRow(0)
self.ui.lw_lv2.setCurrentRow(0)
self.ui.lw_vst.setCurrentRow(0)
- self.ui.lw_vst3.setCurrentRow(0)
self.ui.lw_gig.setCurrentRow(0)
self.ui.lw_sf2.setCurrentRow(0)
self.ui.lw_sfz.setCurrentRow(0)
@@ -436,7 +433,6 @@ class CarlaSettingsW(QDialog):
dssis = toList(settings.value(CARLA_KEY_PATHS_DSSI, CARLA_DEFAULT_DSSI_PATH))
lv2s = toList(settings.value(CARLA_KEY_PATHS_LV2, CARLA_DEFAULT_LV2_PATH))
vst2s = toList(settings.value(CARLA_KEY_PATHS_VST2, CARLA_DEFAULT_VST2_PATH))
- vst3s = toList(settings.value(CARLA_KEY_PATHS_VST3, CARLA_DEFAULT_VST3_PATH))
gigs = toList(settings.value(CARLA_KEY_PATHS_GIG, CARLA_DEFAULT_GIG_PATH))
sf2s = toList(settings.value(CARLA_KEY_PATHS_SF2, CARLA_DEFAULT_SF2_PATH))
sfzs = toList(settings.value(CARLA_KEY_PATHS_SFZ, CARLA_DEFAULT_SFZ_PATH))
@@ -445,7 +441,6 @@ class CarlaSettingsW(QDialog):
dssis.sort()
lv2s.sort()
vst2s.sort()
- vst3s.sort()
gigs.sort()
sf2s.sort()
sfzs.sort()
@@ -466,10 +461,6 @@ class CarlaSettingsW(QDialog):
if not vst2: continue
self.ui.lw_vst.addItem(vst2)
- for vst3 in vst3s:
- if not vst3: continue
- self.ui.lw_vst3.addItem(vst3)
-
for gig in gigs:
if not gig: continue
self.ui.lw_gig.addItem(gig)
@@ -629,7 +620,6 @@ class CarlaSettingsW(QDialog):
dssis = []
lv2s = []
vst2s = []
- vst3s = []
gigs = []
sf2s = []
sfzs = []
@@ -646,9 +636,6 @@ class CarlaSettingsW(QDialog):
for i in range(self.ui.lw_vst.count()):
vst2s.append(self.ui.lw_vst.item(i).text())
- for i in range(self.ui.lw_vst3.count()):
- vst3s.append(self.ui.lw_vst3.item(i).text())
-
for i in range(self.ui.lw_gig.count()):
gigs.append(self.ui.lw_gig.item(i).text())
@@ -662,7 +649,6 @@ class CarlaSettingsW(QDialog):
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_DSSI, splitter.join(dssis))
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_LV2, splitter.join(lv2s))
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST2, splitter.join(vst2s))
- self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_VST3, splitter.join(vst3s))
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_GIG, splitter.join(gigs))
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SF2, splitter.join(sf2s))
self.host.set_engine_option(ENGINE_OPTION_PLUGIN_PATH, PLUGIN_SFZ, splitter.join(sfzs))
@@ -671,7 +657,6 @@ class CarlaSettingsW(QDialog):
settings.setValue(CARLA_KEY_PATHS_DSSI, dssis)
settings.setValue(CARLA_KEY_PATHS_LV2, lv2s)
settings.setValue(CARLA_KEY_PATHS_VST2, vst2s)
- settings.setValue(CARLA_KEY_PATHS_VST3, vst3s)
settings.setValue(CARLA_KEY_PATHS_GIG, gigs)
settings.setValue(CARLA_KEY_PATHS_SF2, sf2s)
settings.setValue(CARLA_KEY_PATHS_SFZ, sfzs)
@@ -787,15 +772,6 @@ class CarlaSettingsW(QDialog):
if not path: continue
self.ui.lw_vst.addItem(path)
- elif curIndex == self.PATH_INDEX_VST3:
- paths = CARLA_DEFAULT_VST3_PATH
- paths.sort()
- self.ui.lw_vst3.clear()
-
- for path in paths:
- if not path: continue
- self.ui.lw_vst3.addItem(path)
-
elif curIndex == self.PATH_INDEX_GIG:
paths = CARLA_DEFAULT_GIG_PATH
paths.sort()
@@ -928,8 +904,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_lv2.addItem(newPath)
elif curIndex == self.PATH_INDEX_VST2:
self.ui.lw_vst.addItem(newPath)
- elif curIndex == self.PATH_INDEX_VST3:
- self.ui.lw_vst3.addItem(newPath)
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.addItem(newPath)
elif curIndex == self.PATH_INDEX_SF2:
@@ -949,8 +923,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_lv2.takeItem(self.ui.lw_lv2.currentRow())
elif curIndex == self.PATH_INDEX_VST2:
self.ui.lw_vst.takeItem(self.ui.lw_vst.currentRow())
- elif curIndex == self.PATH_INDEX_VST3:
- self.ui.lw_vst3.takeItem(self.ui.lw_vst3.currentRow())
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.takeItem(self.ui.lw_gig.currentRow())
elif curIndex == self.PATH_INDEX_SF2:
@@ -970,8 +942,6 @@ class CarlaSettingsW(QDialog):
currentPath = self.ui.lw_lv2.currentItem().text()
elif curIndex == self.PATH_INDEX_VST2:
currentPath = self.ui.lw_vst.currentItem().text()
- elif curIndex == self.PATH_INDEX_VST3:
- currentPath = self.ui.lw_vst3.currentItem().text()
elif curIndex == self.PATH_INDEX_GIG:
currentPath = self.ui.lw_gig.currentItem().text()
elif curIndex == self.PATH_INDEX_SF2:
@@ -994,8 +964,6 @@ class CarlaSettingsW(QDialog):
self.ui.lw_lv2.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_VST2:
self.ui.lw_vst.currentItem().setText(newPath)
- elif curIndex == self.PATH_INDEX_VST3:
- self.ui.lw_vst3.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_GIG:
self.ui.lw_gig.currentItem().setText(newPath)
elif curIndex == self.PATH_INDEX_SF2:
@@ -1015,8 +983,6 @@ class CarlaSettingsW(QDialog):
row = self.ui.lw_lv2.currentRow()
elif index == self.PATH_INDEX_VST2:
row = self.ui.lw_vst.currentRow()
- elif index == self.PATH_INDEX_VST3:
- row = self.ui.lw_vst3.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 1468ee2bf..de5f39b03 100644
--- a/source/carla_shared.py
+++ b/source/carla_shared.py
@@ -222,7 +222,6 @@ CARLA_KEY_PATHS_LADSPA = "Paths/LADSPA"
CARLA_KEY_PATHS_DSSI = "Paths/DSSI"
CARLA_KEY_PATHS_LV2 = "Paths/LV2"
CARLA_KEY_PATHS_VST2 = "Paths/VST2"
-CARLA_KEY_PATHS_VST3 = "Paths/VST3"
CARLA_KEY_PATHS_GIG = "Paths/GIG"
CARLA_KEY_PATHS_SF2 = "Paths/SF2"
CARLA_KEY_PATHS_SFZ = "Paths/SFZ"
@@ -294,7 +293,7 @@ if LINUX:
CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS
CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_JACK
else:
- CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_PATCHBAY
+ CARLA_DEFAULT_PROCESS_MODE = ENGINE_PROCESS_MODE_CONTINUOUS_RACK
CARLA_DEFAULT_TRANSPORT_MODE = ENGINE_TRANSPORT_MODE_INTERNAL
# Wine
@@ -320,7 +319,6 @@ DEFAULT_LADSPA_PATH = ""
DEFAULT_DSSI_PATH = ""
DEFAULT_LV2_PATH = ""
DEFAULT_VST2_PATH = ""
-DEFAULT_VST3_PATH = ""
DEFAULT_GIG_PATH = ""
DEFAULT_SF2_PATH = ""
DEFAULT_SFZ_PATH = ""
@@ -362,8 +360,6 @@ if WINDOWS:
if kIs64bit:
DEFAULT_VST2_PATH += ";" + COMMONPROGRAMFILES + "\\VST2"
- DEFAULT_VST3_PATH = COMMONPROGRAMFILES + "\\VST3"
-
DEFAULT_GIG_PATH = APPDATA + "\\GIG"
DEFAULT_SF2_PATH = APPDATA + "\\SF2"
DEFAULT_SFZ_PATH = APPDATA + "\\SFZ"
@@ -374,9 +370,6 @@ if WINDOWS:
DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\VstPlugins"
DEFAULT_VST2_PATH += ";" + PROGRAMFILESx86 + "\\Steinberg\\VstPlugins"
- if COMMONPROGRAMFILESx86:
- DEFAULT_VST3_PATH += COMMONPROGRAMFILESx86 + "\\VST3"
-
elif HAIKU:
splitter = ":"
@@ -392,9 +385,6 @@ elif HAIKU:
DEFAULT_VST2_PATH = HOME + "/.vst"
DEFAULT_VST2_PATH += ":/boot/common/add-ons/vst"
- DEFAULT_VST3_PATH = HOME + "/.vst3"
- DEFAULT_VST3_PATH += ":/boot/common/add-ons/vst3"
-
elif MACOS:
splitter = ":"
@@ -410,9 +400,6 @@ elif MACOS:
DEFAULT_VST2_PATH = HOME + "/Library/Audio/Plug-Ins/VST"
DEFAULT_VST2_PATH += ":/Library/Audio/Plug-Ins/VST"
- DEFAULT_VST3_PATH = HOME + "/Library/Audio/Plug-Ins/VST3"
- DEFAULT_VST3_PATH += ":/Library/Audio/Plug-Ins/VST3"
-
else:
splitter = ":"
@@ -432,10 +419,6 @@ else:
DEFAULT_VST2_PATH += ":/usr/lib/vst"
DEFAULT_VST2_PATH += ":/usr/local/lib/vst"
- DEFAULT_VST3_PATH = HOME + "/.vst3"
- DEFAULT_VST3_PATH += ":/usr/lib/vst3"
- DEFAULT_VST3_PATH += ":/usr/local/lib/vst3"
-
DEFAULT_GIG_PATH = HOME + "/.sounds/gig"
DEFAULT_GIG_PATH += ":/usr/share/sounds/gig"
@@ -453,11 +436,9 @@ if not WINDOWS:
if os.path.exists(winePrefix):
DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins"
- DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3"
if kIs64bit and os.path.exists(winePrefix + "/drive_c/Program Files (x86)"):
DEFAULT_VST2_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins"
- DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3"
del winePrefix
@@ -487,7 +468,6 @@ if readEnvVars:
CARLA_DEFAULT_DSSI_PATH = os.getenv("DSSI_PATH", DEFAULT_DSSI_PATH).split(splitter)
CARLA_DEFAULT_LV2_PATH = os.getenv("LV2_PATH", DEFAULT_LV2_PATH).split(splitter)
CARLA_DEFAULT_VST2_PATH = os.getenv("VST_PATH", DEFAULT_VST2_PATH).split(splitter)
- CARLA_DEFAULT_VST3_PATH = os.getenv("VST3_PATH", DEFAULT_VST3_PATH).split(splitter)
CARLA_DEFAULT_GIG_PATH = os.getenv("GIG_PATH", DEFAULT_GIG_PATH).split(splitter)
CARLA_DEFAULT_SF2_PATH = os.getenv("SF2_PATH", DEFAULT_SF2_PATH).split(splitter)
CARLA_DEFAULT_SFZ_PATH = os.getenv("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter)
@@ -497,7 +477,6 @@ else:
CARLA_DEFAULT_DSSI_PATH = DEFAULT_DSSI_PATH.split(splitter)
CARLA_DEFAULT_LV2_PATH = DEFAULT_LV2_PATH.split(splitter)
CARLA_DEFAULT_VST2_PATH = DEFAULT_VST2_PATH.split(splitter)
- CARLA_DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter)
CARLA_DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter)
CARLA_DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter)
CARLA_DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter)
@@ -509,7 +488,6 @@ del DEFAULT_LADSPA_PATH
del DEFAULT_DSSI_PATH
del DEFAULT_LV2_PATH
del DEFAULT_VST2_PATH
-del DEFAULT_VST3_PATH
del DEFAULT_GIG_PATH
del DEFAULT_SF2_PATH
del DEFAULT_SFZ_PATH
diff --git a/source/carla_skin.py b/source/carla_skin.py
index f399d6cc8..6b059f6c4 100755
--- a/source/carla_skin.py
+++ b/source/carla_skin.py
@@ -1813,7 +1813,7 @@ def getSkinStyle(host, pluginId):
pluginMaker = pluginInfo['maker']
uniqueId = pluginInfo['uniqueId']
- if pluginInfo['type'] in (PLUGIN_VST2, PLUGIN_VST3, PLUGIN_AU):
+ if pluginInfo['type'] == PLUGIN_VST2:
progCount = host.get_program_count(pluginId)
else:
progCount = host.get_midi_program_count(pluginId)
@@ -1853,7 +1853,7 @@ def getSkinStyle(host, pluginId):
# Presets
if progCount > 1 and (pluginInfo['hints'] & PLUGIN_USES_MULTI_PROGS) == 0:
- if pluginInfo['type'] in (PLUGIN_VST2, PLUGIN_VST3, PLUGIN_AU):
+ if pluginInfo['type'] == PLUGIN_VST2:
return "presets"
return "mpresets"
diff --git a/source/carla_utils.py b/source/carla_utils.py
index 28ee1fdb1..6b3478fab 100644
--- a/source/carla_utils.py
+++ b/source/carla_utils.py
@@ -42,10 +42,6 @@ def getPluginTypeAsString(ptype):
return "LV2"
if ptype == PLUGIN_VST2:
return "VST2"
- if ptype == PLUGIN_VST3:
- return "VST3"
- if ptype == PLUGIN_AU:
- return "AU"
if ptype == PLUGIN_GIG:
return "GIG"
if ptype == PLUGIN_SF2:
@@ -76,10 +72,6 @@ def getPluginTypeFromString(stype):
return PLUGIN_LV2
if stype in ("vst2", "vst"):
return PLUGIN_VST2
- if stype == "vst3":
- return PLUGIN_VST3
- if stype in ("au", "audiounit"):
- return PLUGIN_AU
if stype == "gig":
return PLUGIN_GIG
if stype == "sf2":
@@ -172,9 +164,6 @@ class CarlaUtils(object):
self.lib.carla_get_complete_license_text.argtypes = None
self.lib.carla_get_complete_license_text.restype = c_char_p
- self.lib.carla_get_juce_version.argtypes = None
- self.lib.carla_get_juce_version.restype = c_char_p
-
self.lib.carla_get_supported_file_extensions.argtypes = None
self.lib.carla_get_supported_file_extensions.restype = c_char_p
@@ -270,10 +259,6 @@ class CarlaUtils(object):
def get_complete_license_text(self):
return charPtrToString(self.lib.carla_get_complete_license_text())
- # Get the juce version used in the current Carla build.
- def get_juce_version(self):
- return charPtrToString(self.lib.carla_get_juce_version())
-
# Get all the supported file extensions in carla_load_file().
# Returned string uses this syntax:
# @code
diff --git a/source/carla_widgets.py b/source/carla_widgets.py
index 6f44b0c9d..7dde6767c 100755
--- a/source/carla_widgets.py
+++ b/source/carla_widgets.py
@@ -37,7 +37,6 @@ else:
# Imports (Custom)
import ui_carla_about
-import ui_carla_about_juce
import ui_carla_edit
import ui_carla_parameter
@@ -150,25 +149,8 @@ class CarlaAboutW(QDialog):
"http://ll-plugins.nongnu.org/lv2/ext/midimap "
"http://ll-plugins.nongnu.org/lv2/ext/miditype "
""))
- if MACOS or WINDOWS:
- self.ui.l_vst2.setText(self.tr("Using Juce host"))
- self.ui.l_vst3.setText(self.tr("Using Juce host"))
- if MACOS:
- self.ui.l_au.setText(self.tr("Using Juce host"))
- else:
- self.ui.line_vst3.hide()
- self.ui.l_au.hide()
- self.ui.lid_au.hide()
-
- else:
- self.ui.l_vst2.setText(self.tr("About 85% complete (missing vst bank/presets and some minor stuff)"))
- self.ui.line_vst2.hide()
- self.ui.l_vst3.hide()
- self.ui.lid_vst3.hide()
- self.ui.line_vst3.hide()
- self.ui.l_au.hide()
- self.ui.lid_au.hide()
+ self.ui.l_vst2.setText(self.tr("About 85% complete (missing vst bank/presets and some minor stuff)"))
# 2nd tab is usually longer than the 1st
# adjust appropriately
@@ -185,27 +167,6 @@ class CarlaAboutW(QDialog):
QDialog.done(self, r)
self.close()
-# ------------------------------------------------------------------------------------------------------------
-# JUCE About dialog
-
-class JuceAboutW(QDialog):
- def __init__(self, parent):
- QDialog.__init__(self, parent)
- self.ui = ui_carla_about_juce.Ui_JuceAboutW()
- self.ui.setupUi(self)
-
- self.ui.l_text2.setText(self.tr("This program uses JUCE version %s." % gCarla.utils.get_juce_version()))
-
- self.adjustSize()
- self.setFixedSize(self.size())
-
- if WINDOWS:
- self.setWindowFlags(self.windowFlags()|Qt.MSWindowsFixedSizeDialogHint)
-
- def done(self, r):
- QDialog.done(self, r)
- self.close()
-
# ------------------------------------------------------------------------------------------------------------
# Plugin Parameter
diff --git a/source/discovery/Makefile b/source/discovery/Makefile
index 64ae3a699..344966f4a 100644
--- a/source/discovery/Makefile
+++ b/source/discovery/Makefile
@@ -29,11 +29,6 @@ endif
# ----------------------------------------------------------------------------------------------------------------------------
BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules
-BUILD_CXX_FLAGS += -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3
-
-ifeq ($(CARLA_VESTIGE_HEADER),true)
-BUILD_CXX_FLAGS += -DVESTIGE_HEADER
-endif
ifeq ($(MACOS),true)
BUILD_CXX_FLAGS += -ObjC++
@@ -78,53 +73,6 @@ LIBS_win32 += $(MODULEDIR)/lilv.win32.a
LIBS_win64 += $(MODULEDIR)/lilv.win64.a
LINK_FLAGS += $(LILV_LIBS)
-ifeq ($(MACOS_OR_WIN32),true)
-LIBS_native += $(MODULEDIR)/juce_audio_basics.a
-LIBS_posix32 += $(MODULEDIR)/juce_audio_basics.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_audio_basics.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_audio_basics.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_audio_basics.win64.a
-LIBS_native += $(MODULEDIR)/juce_audio_processors.a
-LIBS_posix32 += $(MODULEDIR)/juce_audio_processors.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_audio_processors.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_audio_processors.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_audio_processors.win64.a
-LIBS_native += $(MODULEDIR)/juce_data_structures.a
-LIBS_posix32 += $(MODULEDIR)/juce_data_structures.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_data_structures.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_data_structures.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_data_structures.win64.a
-LIBS_native += $(MODULEDIR)/juce_events.a
-LIBS_posix32 += $(MODULEDIR)/juce_events.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_events.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_events.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_events.win64.a
-LIBS_native += $(MODULEDIR)/juce_graphics.a
-LIBS_posix32 += $(MODULEDIR)/juce_graphics.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_graphics.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_graphics.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_graphics.win64.a
-LIBS_native += $(MODULEDIR)/juce_gui_basics.a
-LIBS_posix32 += $(MODULEDIR)/juce_gui_basics.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_gui_basics.posix64.a
-LIBS_win32 += $(MODULEDIR)/juce_gui_basics.win32.a
-LIBS_win64 += $(MODULEDIR)/juce_gui_basics.win64.a
-ifeq ($(MACOS),true)
-LIBS_native += $(MODULEDIR)/juce_gui_extra.a
-LIBS_posix32 += $(MODULEDIR)/juce_gui_extra.posix32.a
-LIBS_posix64 += $(MODULEDIR)/juce_gui_extra.posix64.a
-endif
-LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
-LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
-LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
-LINK_FLAGS += $(JUCE_EVENTS_LIBS)
-LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
-LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
-ifeq ($(MACOS),true)
-LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
-endif
-endif
-
ifeq ($(UNIX),true)
LINK_FLAGS += -ldl
endif
diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp
index b41f96ec2..384b9befa 100644
--- a/source/discovery/carla-discovery.cpp
+++ b/source/discovery/carla-discovery.cpp
@@ -23,11 +23,6 @@
#include "AppConfig.h"
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# define USE_JUCE_PROCESSORS
-# include "juce_audio_processors/juce_audio_processors.h"
-#endif
-
#ifdef BUILD_BRIDGE
# undef HAVE_FLUIDSYNTH
# undef HAVE_LINUXSAMPLER
@@ -1439,124 +1434,6 @@ static void do_vst_check(lib_t& libHandle, const bool doInit)
}
#endif // ! CARLA_OS_MAC
-#ifdef USE_JUCE_PROCESSORS
-static void do_juce_check(const char* const filename_, const char* const stype, const bool doInit)
-{
- CARLA_SAFE_ASSERT_RETURN(stype != nullptr && stype[0] != 0,) // FIXME
- carla_debug("do_juce_check(%s, %s, %s)", filename_, stype, bool2str(doInit));
-
- using namespace juce;
- juce::String filename;
-
-#ifdef CARLA_OS_WIN
- // Fix for wine usage
- if (juce_isRunningInWine() && filename_[0] == '/')
- {
- filename = filename_;
- filename.replace("/", "\\");
- filename = "Z:" + filename;
- }
- else
-#endif
- filename = File(filename_).getFullPathName();
-
- juce::ScopedPointer pluginFormat;
-
- /* */ if (std::strcmp(stype, "VST2") == 0)
- {
-#if JUCE_PLUGINHOST_VST
- pluginFormat = new VSTPluginFormat();
-#else
- DISCOVERY_OUT("error", "VST support not available");
-#endif
- }
- else if (std::strcmp(stype, "VST3") == 0)
- {
-#if JUCE_PLUGINHOST_VST3
- pluginFormat = new VST3PluginFormat();
-#else
- DISCOVERY_OUT("error", "VST3 support not available");
-#endif
- }
- else if (std::strcmp(stype, "AU") == 0)
- {
-#if JUCE_PLUGINHOST_AU
- pluginFormat = new AudioUnitPluginFormat();
-#else
- DISCOVERY_OUT("error", "AU support not available");
-#endif
- }
-
- if (pluginFormat == nullptr)
- {
- DISCOVERY_OUT("error", stype << " support not available");
- return;
- }
-
-#ifdef CARLA_OS_WIN
- CARLA_SAFE_ASSERT_RETURN(File(filename).existsAsFile(),);
-#endif
- CARLA_SAFE_ASSERT_RETURN(pluginFormat->fileMightContainThisPluginType(filename),);
-
- OwnedArray results;
- pluginFormat->findAllTypesForFile(results, filename);
-
- if (results.size() == 0)
- {
- DISCOVERY_OUT("error", "No plugins found");
- return;
- }
-
- for (PluginDescription **it = results.begin(), **end = results.end(); it != end; ++it)
- {
- PluginDescription* const desc(*it);
-
- uint hints = 0x0;
- int audioIns = desc->numInputChannels;
- int audioOuts = desc->numOutputChannels;
- int midiIns = 0;
- int midiOuts = 0;
- int parameters = 0;
-
- if (desc->isInstrument)
- hints |= PLUGIN_IS_SYNTH;
-
- if (doInit)
- {
- if (AudioPluginInstance* const instance = pluginFormat->createInstanceFromDescription(*desc, kSampleRate, kBufferSize))
- {
- instance->refreshParameterList();
-
- parameters = instance->getNumParameters();
-
- if (instance->hasEditor())
- hints |= PLUGIN_HAS_CUSTOM_UI;
- if (instance->acceptsMidi())
- midiIns = 1;
- if (instance->producesMidi())
- midiOuts = 1;
-
- delete instance;
- }
- }
-
- DISCOVERY_OUT("init", "-----------");
- DISCOVERY_OUT("build", BINARY_NATIVE);
- DISCOVERY_OUT("hints", hints);
- DISCOVERY_OUT("name", desc->descriptiveName);
- DISCOVERY_OUT("label", desc->name);
- DISCOVERY_OUT("maker", desc->manufacturerName);
- DISCOVERY_OUT("uniqueId", desc->uid);
- DISCOVERY_OUT("audio.ins", audioIns);
- DISCOVERY_OUT("audio.outs", audioOuts);
- DISCOVERY_OUT("midi.ins", midiIns);
- DISCOVERY_OUT("midi.outs", midiOuts);
- DISCOVERY_OUT("parameters.ins", parameters);
- DISCOVERY_OUT("end", "------------");
- }
-}
-#endif
-
static void do_fluidsynth_check(const char* const filename, const bool doInit)
{
#ifdef HAVE_FLUIDSYNTH
@@ -1772,25 +1649,7 @@ int main(int argc, char* argv[])
do_lv2_check(filename, doInit);
break;
case PLUGIN_VST2:
-#ifdef CARLA_OS_MAC
- do_juce_check(filename, "VST2", doInit);
-#else
do_vst_check(handle, doInit);
-#endif
- break;
- case PLUGIN_VST3:
-#ifdef USE_JUCE_PROCESSORS
- do_juce_check(filename, "VST3", doInit);
-#else
- DISCOVERY_OUT("error", "VST3 support not available");
-#endif
- break;
- case PLUGIN_AU:
-#ifdef USE_JUCE_PROCESSORS
- do_juce_check(filename, "AU", doInit);
-#else
- DISCOVERY_OUT("error", "AU support not available");
-#endif
break;
case PLUGIN_GIG:
do_linuxsampler_check(filename, "gig", doInit);
diff --git a/source/modules/AppConfig.h b/source/modules/AppConfig.h
index efc2d0b35..443c4ca09 100644
--- a/source/modules/AppConfig.h
+++ b/source/modules/AppConfig.h
@@ -29,7 +29,6 @@
// always enabled
#define JUCE_MODULE_AVAILABLE_juce_audio_basics 1
-#define JUCE_MODULE_AVAILABLE_juce_audio_formats 1
#define JUCE_MODULE_AVAILABLE_juce_core 1
// always disabled
@@ -39,24 +38,15 @@
#define JUCE_MODULE_AVAILABLE_juce_opengl 0
#define JUCE_MODULE_AVAILABLE_juce_video 0
-// conditional
-#if defined(APPCONFIG_OS_MAC) || defined(APPCONFIG_OS_WIN)
-# define JUCE_MODULE_AVAILABLE_juce_audio_devices 1
-# define JUCE_MODULE_AVAILABLE_juce_audio_processors 1
-# define JUCE_MODULE_AVAILABLE_juce_data_structures 1
-# define JUCE_MODULE_AVAILABLE_juce_events 1
-# define JUCE_MODULE_AVAILABLE_juce_graphics 1
-# define JUCE_MODULE_AVAILABLE_juce_gui_basics 1
-# define JUCE_MODULE_AVAILABLE_juce_gui_extra 1
-#else
-# define JUCE_MODULE_AVAILABLE_juce_audio_devices 0
-# define JUCE_MODULE_AVAILABLE_juce_audio_processors 0
-# define JUCE_MODULE_AVAILABLE_juce_data_structures 0
-# define JUCE_MODULE_AVAILABLE_juce_events 0
-# define JUCE_MODULE_AVAILABLE_juce_graphics 0
-# define JUCE_MODULE_AVAILABLE_juce_gui_basics 0
-# define JUCE_MODULE_AVAILABLE_juce_gui_extra 0
-#endif
+// also disabled
+#define JUCE_MODULE_AVAILABLE_juce_audio_devices 0
+#define JUCE_MODULE_AVAILABLE_juce_audio_formats 0
+#define JUCE_MODULE_AVAILABLE_juce_audio_processors 0
+#define JUCE_MODULE_AVAILABLE_juce_data_structures 0
+#define JUCE_MODULE_AVAILABLE_juce_events 0
+#define JUCE_MODULE_AVAILABLE_juce_graphics 0
+#define JUCE_MODULE_AVAILABLE_juce_gui_basics 0
+#define JUCE_MODULE_AVAILABLE_juce_gui_extra 0
// misc
#define JUCE_DISABLE_JUCE_VERSION_PRINTING 1
diff --git a/source/modules/Makefile b/source/modules/Makefile
index 0746d3ab6..eb951f2d6 100644
--- a/source/modules/Makefile
+++ b/source/modules/Makefile
@@ -10,15 +10,7 @@ all:
clean:
$(MAKE) clean -C juce_audio_basics
- $(MAKE) clean -C juce_audio_devices
- $(MAKE) clean -C juce_audio_formats
- $(MAKE) clean -C juce_audio_processors
$(MAKE) clean -C juce_core
- $(MAKE) clean -C juce_data_structures
- $(MAKE) clean -C juce_events
- $(MAKE) clean -C juce_graphics
- $(MAKE) clean -C juce_gui_basics
- $(MAKE) clean -C juce_gui_extra
$(MAKE) clean -C lilv
$(MAKE) clean -C rtaudio
$(MAKE) clean -C rtmempool
diff --git a/source/native-plugins/_data.cpp b/source/native-plugins/_data.cpp
index df279df67..bc174d465 100644
--- a/source/native-plugins/_data.cpp
+++ b/source/native-plugins/_data.cpp
@@ -166,6 +166,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = {
},
+#if 0
// -----------------------------------------------------------------------
// Audio file
@@ -186,6 +187,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = {
/* copyright */ "GNU GPL v2+",
DESCFUNCS
},
+#endif
// -----------------------------------------------------------------------
// MIDI file and sequencer
diff --git a/source/native-plugins/audio-file.cpp b/source/native-plugins/audio-file.cpp
index ce02e7267..0fd816e78 100644
--- a/source/native-plugins/audio-file.cpp
+++ b/source/native-plugins/audio-file.cpp
@@ -17,25 +17,15 @@
#include "CarlaNative.hpp"
+#if 0
+
#include "CarlaMutex.hpp"
#include "CarlaString.hpp"
-#include "AppConfig.h"
-#include "juce_audio_formats/juce_audio_formats.h"
-
using namespace juce;
// -----------------------------------------------------------------------
-static AudioFormatManager& getAudioFormatManagerInstance()
-{
- static AudioFormatManager afm;
- afm.registerBasicFormats();
- return afm;
-}
-
-// -----------------------------------------------------------------------
-
class AudioFilePlugin : public NativePluginClass
{
public:
@@ -302,13 +292,15 @@ static const NativePluginDescriptor audiofileDesc = {
// -----------------------------------------------------------------------
+#endif
+
CARLA_EXPORT
void carla_register_native_plugin_audiofile();
CARLA_EXPORT
void carla_register_native_plugin_audiofile()
{
- carla_register_native_plugin(&audiofileDesc);
+ //carla_register_native_plugin(&audiofileDesc);
}
// -----------------------------------------------------------------------
diff --git a/source/native-plugins/resources/carla-plugin b/source/native-plugins/resources/carla-plugin
index 0c55dfaae..0831d894c 100755
--- a/source/native-plugins/resources/carla-plugin
+++ b/source/native-plugins/resources/carla-plugin
@@ -471,17 +471,10 @@ class CarlaEmbedW(QEmbedWidget):
self.addShortcutActions(self.gui.ui.menu_Settings.actions())
self.addShortcutActions(self.gui.ui.menu_Help.actions())
- if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY:
- self.addShortcutActions(self.gui.ui.menu_Canvas.actions())
- self.addShortcutActions(self.gui.ui.menu_Canvas_Zoom.actions())
-
self.addWidget(self.gui.ui.menubar)
self.addLine()
self.addWidget(self.gui.ui.toolBar)
- if self.host.processMode == ENGINE_PROCESS_MODE_PATCHBAY:
- self.addLine()
-
self.addWidget(self.gui.centralWidget())
self.finalSetup(self.gui, winId)
@@ -571,7 +564,7 @@ if __name__ == '__main__':
# Init host backend
host = initHost("Carla-Plugin", None, False, True, True, PluginHost)
- host.processMode = ENGINE_PROCESS_MODE_PATCHBAY if sys.argv[0].lower().endswith("/carla-plugin-patchbay") else ENGINE_PROCESS_MODE_CONTINUOUS_RACK
+ host.processMode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK
host.processModeForced = True
host.nextProcessMode = host.processMode
loadHostSettings(host)
diff --git a/source/plugin/Makefile b/source/plugin/Makefile
index feeac9047..98178183a 100644
--- a/source/plugin/Makefile
+++ b/source/plugin/Makefile
@@ -51,9 +51,7 @@ LIBS = $(MODULEDIR)/carla_engine_plugin.a
LIBS += $(MODULEDIR)/carla_plugin.a
LIBS += $(MODULEDIR)/jackbridge.a
LIBS += $(MODULEDIR)/juce_audio_basics.a
-LIBS += $(MODULEDIR)/juce_audio_formats.a
LIBS += $(MODULEDIR)/juce_core.a
-LIBS += $(MODULEDIR)/juce_events.a
LIBS += $(MODULEDIR)/lilv.a
LIBS += $(MODULEDIR)/native-plugins.a
LIBS += $(MODULEDIR)/rtmempool.a
@@ -66,40 +64,16 @@ ifeq ($(HAVE_HYLIA),true)
LIBS += $(MODULEDIR)/hylia.a
endif
-ifeq ($(MACOS_OR_WIN32),true)
-LIBS += $(MODULEDIR)/juce_audio_processors.a
-LIBS += $(MODULEDIR)/juce_data_structures.a
-LIBS += $(MODULEDIR)/juce_graphics.a
-LIBS += $(MODULEDIR)/juce_gui_basics.a
-endif
-
-ifeq ($(MACOS),true)
-LIBS += $(MODULEDIR)/juce_gui_extra.a
-endif
-
# ----------------------------------------------------------------------------------------------------------------------------
# Link flags
LINK_FLAGS += $(JACKBRIDGE_LIBS)
LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
-LINK_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
LINK_FLAGS += $(JUCE_CORE_LIBS)
LINK_FLAGS += $(LILV_LIBS)
LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
LINK_FLAGS += $(RTMEMPOOL_LIBS)
-ifeq ($(MACOS_OR_WIN32),true)
-LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
-LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
-LINK_FLAGS += $(JUCE_EVENTS_LIBS)
-LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
-LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
-endif
-
-ifeq ($(MACOS),true)
-LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
-endif
-
ifeq ($(HAVE_LIBLO),true)
LINK_FLAGS += $(LIBLO_LIBS)
endif
diff --git a/source/plugin/carla-lv2.cpp b/source/plugin/carla-lv2.cpp
index 3f8be05ea..2da024436 100644
--- a/source/plugin/carla-lv2.cpp
+++ b/source/plugin/carla-lv2.cpp
@@ -22,18 +22,6 @@
#include "CarlaMathUtils.hpp"
#include "CarlaString.hpp"
-#include "juce_audio_basics/juce_audio_basics.h"
-
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# include "juce_gui_basics/juce_gui_basics.h"
-#else
-# include "juce_events/juce_events.h"
-#endif
-
-using juce::FloatVectorOperations;
-using juce::ScopedJuceInitialiser_GUI;
-using juce::SharedResourcePointer;
-
// -----------------------------------------------------------------------
// -Weffc++ compat ext widget
@@ -88,8 +76,7 @@ public:
fLastPositionData(),
fURIs(),
fUI(),
- fPorts(),
- sJuceInitialiser()
+ fPorts()
{
run = extui_run;
show = extui_show;
@@ -1456,8 +1443,6 @@ private:
CARLA_DECLARE_NON_COPY_STRUCT(Ports);
} fPorts;
- SharedResourcePointer sJuceInitialiser;
-
// -------------------------------------------------------------------
#define handlePtr ((NativePlugin*)handle)
diff --git a/source/plugin/carla-vst.cpp b/source/plugin/carla-vst.cpp
index 10adacbe9..98c85378d 100644
--- a/source/plugin/carla-vst.cpp
+++ b/source/plugin/carla-vst.cpp
@@ -31,14 +31,7 @@
#include "AppConfig.h"
#include "juce_core/juce_core.h"
-#if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
-# include "juce_gui_basics/juce_gui_basics.h"
-#else
-# include "juce_events/juce_events.h"
-#endif
-
-#ifdef VESTIGE_HEADER
-# include "vestige/aeffectx.h"
+#include "vestige/aeffectx.h"
#define effFlagsProgramChunks (1 << 5)
#define effGetParamLabel 6
#define effGetChunk 23
@@ -50,12 +43,6 @@
struct ERect {
int16_t top, left, bottom, right;
};
-#else
-# include "vst2/aeffectx.h"
-#endif
-
-using juce::ScopedJuceInitialiser_GUI;
-using juce::SharedResourcePointer;
static uint32_t d_lastBufferSize = 0;
static double d_lastSampleRate = 0.0;
@@ -83,8 +70,7 @@ public:
fVstRect(),
fHostType(kHostTypeNull),
fMidiOutEvents(),
- fStateChunk(nullptr),
- sJuceInitialiser()
+ fStateChunk(nullptr)
{
fHost.handle = this;
fHost.uiName = carla_strdup("CarlaVST");
@@ -640,8 +626,6 @@ private:
char* fStateChunk;
- SharedResourcePointer sJuceInitialiser;
-
// -------------------------------------------------------------------
#define handlePtr ((NativePlugin*)handle)
@@ -714,17 +698,10 @@ struct VstObject {
NativePlugin* plugin;
};
-#ifdef VESTIGE_HEADER
-# define validObject effect != nullptr && effect->ptr3 != nullptr
-# define validPlugin effect != nullptr && effect->ptr3 != nullptr && ((VstObject*)effect->ptr3)->plugin != nullptr
-# define vstObjectPtr (VstObject*)effect->ptr3
-#else
-# define validObject effect != nullptr && effect->object != nullptr
-# define validPlugin effect != nullptr && effect->object != nullptr && ((VstObject*)effect->object)->plugin != nullptr
-# define vstObjectPtr (VstObject*)effect->object
-#endif
-
-#define pluginPtr (vstObjectPtr)->plugin
+#define validObject effect != nullptr && effect->ptr3 != nullptr
+#define validPlugin effect != nullptr && effect->ptr3 != nullptr && ((VstObject*)effect->ptr3)->plugin != nullptr
+#define vstObjectPtr (VstObject*)effect->ptr3
+#define pluginPtr (vstObjectPtr)->plugin
static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t index, intptr_t value, void* ptr, float opt)
{
@@ -798,11 +775,7 @@ static intptr_t vst_dispatcherCallback(AEffect* effect, int32_t opcode, int32_t
/* This code invalidates the object created in VSTPluginMain
* Probably not safe against all hosts */
obj->audioMaster = nullptr;
-# ifdef VESTIGE_HEADER
effect->ptr3 = nullptr;
-# else
- vstObjectPtr = nullptr;
-# endif
delete obj;
#endif
@@ -939,12 +912,8 @@ const AEffect* VSTPluginMain(audioMasterCallback audioMaster)
// vst fields
effect->magic = kEffectMagic;
-#ifdef VESTIGE_HEADER
int32_t* const version = (int32_t*)&effect->unknown1;
*version = CARLA_VERSION_HEX;
-#else
- effect->version = CARLA_VERSION_HEX;
-#endif
static const int32_t uniqueId = CCONST('C', 'r', 'l', 'a');
#if CARLA_PLUGIN_SYNTH
@@ -995,11 +964,8 @@ const AEffect* VSTPluginMain(audioMasterCallback audioMaster)
VstObject* const obj(new VstObject());
obj->audioMaster = audioMaster;
obj->plugin = nullptr;
-#ifdef VESTIGE_HEADER
- effect->ptr3 = obj;
-#else
- effect->object = obj;
-#endif
+
+ effect->ptr3 = obj;
return effect;
}
diff --git a/source/tests/CarlaUtils2.cpp b/source/tests/CarlaUtils2.cpp
index e39255d65..7b8b9ce10 100644
--- a/source/tests/CarlaUtils2.cpp
+++ b/source/tests/CarlaUtils2.cpp
@@ -1,6 +1,6 @@
/*
* Carla Utility Tests
- * Copyright (C) 2013-2014 Filipe Coelho
+ * Copyright (C) 2013-2017 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
@@ -19,8 +19,6 @@
# error Build this file with debug ON please
#endif
-#define VESTIGE_HEADER
-
#include "CarlaLadspaUtils.hpp"
#include "CarlaDssiUtils.cpp"
#include "CarlaLv2Utils.hpp"
diff --git a/source/utils/CarlaBackendUtils.hpp b/source/utils/CarlaBackendUtils.hpp
index dbed2a638..5ddc226d5 100644
--- a/source/utils/CarlaBackendUtils.hpp
+++ b/source/utils/CarlaBackendUtils.hpp
@@ -96,10 +96,6 @@ const char* PluginType2Str(const PluginType type) noexcept
return "PLUGIN_LV2";
case PLUGIN_VST2:
return "PLUGIN_VST2";
- case PLUGIN_VST3:
- return "PLUGIN_VST3";
- case PLUGIN_AU:
- return "PLUGIN_AU";
case PLUGIN_GIG:
return "PLUGIN_GIG";
case PLUGIN_SF2:
@@ -362,8 +358,6 @@ const char* EngineProcessMode2Str(const EngineProcessMode mode) noexcept
return "ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS";
case ENGINE_PROCESS_MODE_CONTINUOUS_RACK:
return "ENGINE_PROCESS_MODE_CONTINUOUS_RACK";
- case ENGINE_PROCESS_MODE_PATCHBAY:
- return "ENGINE_PROCESS_MODE_PATCHBAY";
case ENGINE_PROCESS_MODE_BRIDGE:
return "ENGINE_PROCESS_MODE_BRIDGE";
}
@@ -484,10 +478,6 @@ const char* getPluginTypeAsString(const PluginType type) noexcept
return "LV2";
case PLUGIN_VST2:
return "VST2";
- case PLUGIN_VST3:
- return "VST3";
- case PLUGIN_AU:
- return "AU";;
case PLUGIN_GIG:
return "GIG";
case PLUGIN_SF2:
@@ -527,10 +517,6 @@ PluginType getPluginTypeFromString(const char* const ctype) noexcept
return PLUGIN_LV2;
if (stype == "vst2" || stype == "vst")
return PLUGIN_VST2;
- if (stype == "vst3")
- return PLUGIN_VST3;
- if (stype == "au" || stype == "audiounit")
- return PLUGIN_AU;
if (stype == "gig")
return PLUGIN_GIG;
if (stype == "sf2")
diff --git a/source/utils/CarlaEngineUtils.hpp b/source/utils/CarlaEngineUtils.hpp
index 1f91a3e30..a767c6bbf 100644
--- a/source/utils/CarlaEngineUtils.hpp
+++ b/source/utils/CarlaEngineUtils.hpp
@@ -44,8 +44,6 @@ const char* EngineType2Str(const EngineType type) noexcept
return "kEngineTypeNull";
case kEngineTypeJack:
return "kEngineTypeJack";
- case kEngineTypeJuce:
- return "kEngineTypeJuce";
case kEngineTypeRtAudio:
return "kEngineTypeRtAudio";
case kEngineTypePlugin:
diff --git a/source/utils/CarlaJuceAudioProcessors.cpp b/source/utils/CarlaJuceAudioProcessors.cpp
deleted file mode 100644
index fc7518416..000000000
--- a/source/utils/CarlaJuceAudioProcessors.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Mini version of juce_audio_processors
- * Copyright (C) 2014-2017 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 "CarlaDefines.h"
-
-// -------------------------------------------------------------------------------------------------------------------
-
-#if ! (defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN))
-
-#undef KeyPress
-#include "juce_audio_processors/juce_audio_processors.h"
-
-#include "juce_audio_processors/processors/juce_AudioProcessor.cpp"
-#include "juce_audio_processors/processors/juce_AudioProcessorGraph.cpp"
-#include "juce_audio_processors/utilities/juce_AudioProcessorParameters.cpp"
-
-#endif // ! CARLA_OS_MAC || CARLA_OS_WIN
diff --git a/source/utils/CarlaStateUtils.cpp b/source/utils/CarlaStateUtils.cpp
index 11dfdf63a..9fad224ce 100644
--- a/source/utils/CarlaStateUtils.cpp
+++ b/source/utils/CarlaStateUtils.cpp
@@ -522,13 +522,6 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const
infoXml << " " << xmlSafeString(binary, true) << " \n";
infoXml << " " << juce::int64(uniqueId) << " \n";
break;
- case PLUGIN_VST3:
- infoXml << " " << xmlSafeString(binary, true) << " \n";
- infoXml << " " << xmlSafeString(label, true) << " \n";
- break;
- case PLUGIN_AU:
- infoXml << " " << xmlSafeString(label, true) << " \n";
- break;
case PLUGIN_GIG:
case PLUGIN_SF2:
infoXml << " " << xmlSafeString(binary, true) << " \n";
diff --git a/source/utils/CarlaVstUtils.hpp b/source/utils/CarlaVstUtils.hpp
index 53bb026e0..3da5c466c 100644
--- a/source/utils/CarlaVstUtils.hpp
+++ b/source/utils/CarlaVstUtils.hpp
@@ -34,7 +34,6 @@
#define VST_2_4_EXTENSIONS 1
#define VST_FORCE_DEPRECATED 0
-#ifdef VESTIGE_HEADER
#include "vestige/aeffectx.h"
#define audioMasterGetOutputSpeakerArrangement audioMasterGetSpeakerArrangement
#define effFlagsProgramChunks (1 << 5)
@@ -110,18 +109,6 @@
struct ERect {
int16_t top, left, bottom, right;
};
-#else
-#ifdef CARLA_OS_MAC
-# undef __ppc__
-# define __ppc__ 0
-#else
-# undef TARGET_API_MAC_CARBON
-# define TARGET_API_MAC_CARBON 0
-#endif
-#undef VST_64BIT_PLATFORM
-#define VST_64BIT_PLATFORM (defined(_WIN64) || defined(__LP64__) || defined (_LP64))
-#include "vst2/pluginterfaces/vst2.x/aeffectx.h"
-#endif
// -----------------------------------------------------------------------
// Plugin callback
diff --git a/source/widgets/racklistwidget.py b/source/widgets/racklistwidget.py
index a3b067331..0ef5a6685 100644
--- a/source/widgets/racklistwidget.py
+++ b/source/widgets/racklistwidget.py
@@ -200,9 +200,7 @@ class RackListWidget(QListWidget):
# FIXME not for disabled bridges
exts.append(".dll")
- if MACOS or WINDOWS:
- exts.append(".vst3")
- else:
+ if not (MACOS or WINDOWS):
exts.append(".so")
self.fSupportedExtensions = tuple(i.replace("*","").lower() for i in exts)
@@ -244,7 +242,7 @@ class RackListWidget(QListWidget):
if os.path.isdir(filename):
#if os.path.exists(os.path.join(filename, "manifest.ttl")):
#return True
- if MACOS and filename.lower().endswith((".vst", ".vst3")):
+ if MACOS and filename.lower().endswith(".vst"):
return True
elif os.path.isfile(filename):