From 8beac188a5321fd00de78954ccb1358c534413bf Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 10 Jul 2014 03:32:31 +0100 Subject: [PATCH] Misc --- source/backend/engine/CarlaEngineJack.cpp | 8 ++---- source/backend/engine/CarlaEngineThread.cpp | 27 ++++++++++----------- source/backend/engine/CarlaEngineThread.hpp | 6 +---- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp index 9fb0139fe..fac34a1e6 100644 --- a/source/backend/engine/CarlaEngineJack.cpp +++ b/source/backend/engine/CarlaEngineJack.cpp @@ -39,15 +39,11 @@ using juce::FloatVectorOperations; using juce::String; using juce::StringArray; -CARLA_BACKEND_START_NAMESPACE - -#if 0 -} // Fix editor indentation -#endif - class CarlaEngineJack; class CarlaEngineJackClient; +CARLA_BACKEND_START_NAMESPACE + // ----------------------------------------------------------------------- // Fallback data diff --git a/source/backend/engine/CarlaEngineThread.cpp b/source/backend/engine/CarlaEngineThread.cpp index 2e83bc58d..be10da895 100644 --- a/source/backend/engine/CarlaEngineThread.cpp +++ b/source/backend/engine/CarlaEngineThread.cpp @@ -25,7 +25,7 @@ CARLA_BACKEND_START_NAMESPACE CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) noexcept : CarlaThread("CarlaEngineThread"), - fEngine(engine) + kEngine(engine) { CARLA_SAFE_ASSERT(engine != nullptr); carla_debug("CarlaEngineThread::CarlaEngineThread(%p)", engine); @@ -35,24 +35,24 @@ CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) noexcept void CarlaEngineThread::run() noexcept { - CARLA_SAFE_ASSERT_RETURN(fEngine != nullptr,); - CARLA_SAFE_ASSERT(fEngine->isRunning()); + CARLA_SAFE_ASSERT_RETURN(kEngine != nullptr,); + CARLA_SAFE_ASSERT(kEngine->isRunning()); carla_debug("CarlaEngineThread::run()"); bool hasUi, oscRegisted, needsSingleThread; float value; - for (; fEngine->isRunning() && ! shouldThreadExit();) + for (; kEngine->isRunning() && ! shouldThreadExit();) { #ifdef BUILD_BRIDGE - oscRegisted = fEngine->isOscBridgeRegistered(); + oscRegisted = kEngine->isOscBridgeRegistered(); #else - oscRegisted = fEngine->isOscControlRegistered(); + oscRegisted = kEngine->isOscControlRegistered(); #endif - for (uint i=0, count = fEngine->getCurrentPluginCount(); i < count; ++i) + for (uint i=0, count = kEngine->getCurrentPluginCount(); i < count; ++i) { - CarlaPlugin* const plugin(fEngine->getPluginUnchecked(i)); + CarlaPlugin* const plugin(kEngine->getPluginUnchecked(i)); CARLA_SAFE_ASSERT_CONTINUE(plugin != nullptr && plugin->isEnabled()); CARLA_SAFE_ASSERT_UINT2(i == plugin->getId(), i, plugin->getId()); @@ -69,8 +69,7 @@ void CarlaEngineThread::run() noexcept { try { plugin->postRtEventsRun(); - } - CARLA_SAFE_EXCEPTION("postRtEventsRun()") + } CARLA_SAFE_EXCEPTION("postRtEventsRun()") } if (oscRegisted || (hasUi && ! needsSingleThread)) @@ -89,9 +88,9 @@ void CarlaEngineThread::run() noexcept if (oscRegisted) { #ifdef BUILD_BRIDGE - fEngine->oscSend_bridge_parameter_value(j, value); + kEngine->oscSend_bridge_parameter_value(j, value); #else - fEngine->oscSend_control_set_parameter_value(i, static_cast(j), value); + kEngine->oscSend_control_set_parameter_value(i, static_cast(j), value); #endif } @@ -106,7 +105,7 @@ void CarlaEngineThread::run() noexcept // Update OSC control client peaks if (oscRegisted) - fEngine->oscSend_control_set_peaks(i); + kEngine->oscSend_control_set_peaks(i); #endif } } @@ -116,7 +115,7 @@ void CarlaEngineThread::run() noexcept // Send pong if (oscRegisted) - fEngine->oscSend_bridge_pong(); + kEngine->oscSend_bridge_pong(); #endif carla_msleep(25); diff --git a/source/backend/engine/CarlaEngineThread.hpp b/source/backend/engine/CarlaEngineThread.hpp index 6e743418b..18d174f32 100644 --- a/source/backend/engine/CarlaEngineThread.hpp +++ b/source/backend/engine/CarlaEngineThread.hpp @@ -23,10 +23,6 @@ CARLA_BACKEND_START_NAMESPACE -#if 0 -} // Fix editor indentation -#endif - // ----------------------------------------------------------------------- // CarlaEngineThread @@ -39,7 +35,7 @@ protected: void run() noexcept override; private: - CarlaEngine* const fEngine; + CarlaEngine* const kEngine; CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineThread) };