Browse Source

Cleanup previous test stuff

tags/v2.1-rc1
falkTX 4 years ago
parent
commit
49b1bec938
4 changed files with 14 additions and 13 deletions
  1. +3
    -3
      source/backend/engine/CarlaEngine.cpp
  2. +9
    -8
      source/backend/engine/CarlaEngineGraph.cpp
  3. +1
    -1
      source/backend/engine/CarlaEngineGraph.hpp
  4. +1
    -1
      source/backend/engine/CarlaEngineInternal.hpp

+ 3
- 3
source/backend/engine/CarlaEngine.cpp View File

@@ -711,7 +711,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype,

#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
pData->graph.addPlugin(plugin, 1);
pData->graph.addPlugin(plugin);
#endif
}

@@ -2579,7 +2579,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc)
callback(true, true, ENGINE_CALLBACK_PLUGIN_ADDED, pluginId, 0, 0, 0, 0.0f, plugin->getName());

if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
pData->graph.addPlugin(plugin, 1);
pData->graph.addPlugin(plugin);
}
else
{
@@ -2722,7 +2722,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc)

#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH
if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY)
pData->graph.addPlugin(plugin, 1);
pData->graph.addPlugin(plugin);
#endif
}
else


+ 9
- 8
source/backend/engine/CarlaEngineGraph.cpp View File

@@ -1796,14 +1796,14 @@ void PatchbayGraph::setOffline(const bool offline)
graph.setNonRealtime(offline);
}

AudioProcessorGraph::Node* PatchbayGraph::addPlugin(CarlaPlugin* const plugin, bool)
void PatchbayGraph::addPlugin(CarlaPlugin* const plugin)
{
CARLA_SAFE_ASSERT_RETURN(plugin != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(plugin != nullptr,);
carla_debug("PatchbayGraph::addPlugin(%p)", plugin);

CarlaPluginInstance* const instance(new CarlaPluginInstance(kEngine, plugin));
AudioProcessorGraph::Node* const node(graph.addNode(instance));
CARLA_SAFE_ASSERT_RETURN(node != nullptr, nullptr);
CARLA_SAFE_ASSERT_RETURN(node != nullptr,);

const bool sendHost = !usingExternalHost;
const bool sendOSC = !usingExternalOSC;
@@ -1814,8 +1814,6 @@ AudioProcessorGraph::Node* PatchbayGraph::addPlugin(CarlaPlugin* const plugin, b
node->properties.set("pluginId", static_cast<int>(plugin->getId()));

addNodeToPatchbay(sendHost, sendOSC, kEngine, node->nodeId, static_cast<int>(plugin->getId()), instance);

return node;
}

void PatchbayGraph::replacePlugin(CarlaPlugin* const oldPlugin, CarlaPlugin* const newPlugin)
@@ -1873,6 +1871,9 @@ void PatchbayGraph::reconfigureForCV(CarlaPlugin* const plugin, const uint portI
CARLA_SAFE_ASSERT_RETURN(plugin != nullptr,);
carla_debug("PatchbayGraph::reconfigureForCV(%p, %u, %s)", plugin, portIndex, bool2str(added));

if (graph.isSuspended())
return;

AudioProcessorGraph::Node* const node = graph.getNodeForId(plugin->getPatchbayNodeId());
CARLA_SAFE_ASSERT_RETURN(node != nullptr,);

@@ -2517,10 +2518,10 @@ void EngineInternalGraph::processRack(CarlaEngine::ProtectedData* const data, co
// -----------------------------------------------------------------------
// used for internal patchbay mode

water::AudioProcessorGraph::Node* EngineInternalGraph::addPlugin(CarlaPlugin* const plugin, bool x)
void EngineInternalGraph::addPlugin(CarlaPlugin* const plugin)
{
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr, nullptr);
return fPatchbay->addPlugin(plugin, x);
CARLA_SAFE_ASSERT_RETURN(fPatchbay != nullptr,);
fPatchbay->addPlugin(plugin);
}

void EngineInternalGraph::replacePlugin(CarlaPlugin* const oldPlugin, CarlaPlugin* const newPlugin)


+ 1
- 1
source/backend/engine/CarlaEngineGraph.hpp View File

@@ -179,7 +179,7 @@ public:
void setSampleRate(double sampleRate);
void setOffline(bool offline);

AudioProcessorGraph::Node* addPlugin(CarlaPlugin* plugin, bool);
void addPlugin(CarlaPlugin* plugin);
void replacePlugin(CarlaPlugin* oldPlugin, CarlaPlugin* newPlugin);
void renamePlugin(CarlaPlugin* plugin, const char* newName);
void reconfigureForCV(CarlaPlugin* const plugin, const uint portIndex, bool added);


+ 1
- 1
source/backend/engine/CarlaEngineInternal.hpp View File

@@ -95,7 +95,7 @@ public:
void processRack(CarlaEngine::ProtectedData* data, const float* inBuf[2], float* outBuf[2], uint32_t frames);

// used for internal patchbay mode
water::AudioProcessorGraph::Node* addPlugin(CarlaPlugin* plugin, bool);
void addPlugin(CarlaPlugin* plugin);
void replacePlugin(CarlaPlugin* oldPlugin, CarlaPlugin* newPlugin);
void renamePlugin(CarlaPlugin* plugin, const char* newName);
void removePlugin(CarlaPlugin* plugin);


Loading…
Cancel
Save