From b025063f663f58db0851bedf62f29cde6b500023 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 7 Nov 2013 12:13:31 +0000 Subject: [PATCH] Misc --- source/backend/engine/CarlaEngine.cpp | 40 +++++++++++++-------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/source/backend/engine/CarlaEngine.cpp b/source/backend/engine/CarlaEngine.cpp index 248effb50..b1cbf939f 100644 --- a/source/backend/engine/CarlaEngine.cpp +++ b/source/backend/engine/CarlaEngine.cpp @@ -1601,7 +1601,23 @@ void CarlaEngine::setOscBridgeData(const CarlaOscData* const oscData) noexcept #endif // ----------------------------------------------------------------------- -// protected calls +// Helper functions + +EngineEvent* CarlaEngine::getInternalEventBuffer(const bool isInput) const noexcept +{ + return isInput ? pData->bufEvents.in : pData->bufEvents.out; +} + +void CarlaEngine::registerEnginePlugin(const unsigned int id, CarlaPlugin* const plugin) +{ + CARLA_SAFE_ASSERT_RETURN(id == pData->curPluginCount,); + carla_debug("CarlaEngine::registerEnginePlugin(%i, %p)", id, plugin); + + pData->plugins[id].plugin = plugin; +} + +// ----------------------------------------------------------------------- +// Internal stuff void CarlaEngine::bufferSizeChanged(const uint32_t newBufferSize) { @@ -1670,19 +1686,6 @@ void CarlaEngine::setPluginPeaks(const unsigned int pluginId, float const inPeak pluginData.outsPeak[1] = outPeaks[1]; } -EngineEvent* CarlaEngine::getInternalEventBuffer(const bool isInput) const noexcept -{ - return isInput ? pData->bufEvents.in : pData->bufEvents.out; -} - -void CarlaEngine::registerEnginePlugin(const unsigned int id, CarlaPlugin* const plugin) -{ - CARLA_SAFE_ASSERT_RETURN(id == pData->curPluginCount,); - carla_debug("CarlaEngine::registerEnginePlugin(%i, %p)", id, plugin); - - pData->plugins[id].plugin = plugin; -} - #ifndef BUILD_BRIDGE void CarlaEngine::processRack(float* inBufReal[2], float* outBuf[2], const uint32_t frames) { @@ -1798,7 +1801,7 @@ void CarlaEngine::processPatchbay(float** inBuf, float** outBuf, const uint32_t #endif // ----------------------------------------------------------------------- -// Carla Engine OSC stuff +// Bridge/Controller OSC stuff #ifndef BUILD_BRIDGE void CarlaEngine::oscSend_control_add_plugin_start(const int32_t pluginId, const char* const pluginName) @@ -1955,12 +1958,7 @@ void CarlaEngine::oscSend_control_set_parameter_value(const int32_t pluginId, co { CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast(pData->maxPluginNumber),); -#if DEBUG - if (index < 0) - carla_debug("CarlaEngine::oscSend_control_set_parameter_value(%i, %s, %f)", pluginId, InternalParametersIndex2Str((InternalParametersIndex)index), value); - else - carla_debug("CarlaEngine::oscSend_control_set_parameter_value(%i, %i, %f)", pluginId, index, value); -#endif + carla_debug("CarlaEngine::oscSend_control_set_parameter_value(%i, %i:%s, %f)", pluginId, index, (index < 0) ? InternalParametersIndex2Str(static_cast(index)) : "(none)", value); if (pData->oscData->target != nullptr) {