diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 8936b0935..8fbf77bad 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -967,6 +967,8 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons carla_debug("CarlaEngine::addPlugin(%i:%s, %i:%s, \"%s\", \"%s\", \"%s\", " P_INT64 ", %p)", btype, BinaryType2Str(btype), ptype, PluginType2Str(ptype), filename, name, label, uniqueId, extra); uint id; + +#ifndef BUILD_BRIDGE CarlaPlugin* oldPlugin = nullptr; if (pData->nextPluginId < pData->curPluginCount) @@ -979,6 +981,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons CARLA_SAFE_ASSERT_RETURN_ERR(oldPlugin != nullptr, "Invalid replace plugin Id"); } else +#endif { id = pData->curPluginCount; @@ -1182,7 +1185,9 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons if (plugin == nullptr) { +#ifndef BUILD_BRIDGE pData->plugins[id].plugin = oldPlugin; +#endif return false; } @@ -1195,6 +1200,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons pluginData.outsPeak[0] = 0.0f; pluginData.outsPeak[1] = 0.0f; +#ifndef BUILD_BRIDGE if (oldPlugin != nullptr) { bool wasActive = (oldPlugin->getInternalParameterValue(PARAMETER_ACTIVE) >= 0.5f); @@ -1214,6 +1220,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons plugin->setVolume(oldVolume, true, true); } else +#endif { ++pData->curPluginCount; callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName()); diff --git a/source/discovery/carla-discovery.cpp b/source/discovery/carla-discovery.cpp index 176c917d9..7b4de374a 100644 --- a/source/discovery/carla-discovery.cpp +++ b/source/discovery/carla-discovery.cpp @@ -1500,7 +1500,6 @@ static void do_juce_check(const char* const filename, const char* const stype, c int midiIns = 0; int midiOuts = 0; int parameters = 0; - int programs = 0; if (desc->isInstrument) hints |= PLUGIN_IS_SYNTH; @@ -1512,7 +1511,6 @@ static void do_juce_check(const char* const filename, const char* const stype, c instance->refreshParameterList(); parameters = instance->getNumParameters(); - programs = instance->getNumPrograms(); if (instance->hasEditor()) hints |= PLUGIN_HAS_CUSTOM_UI;