Browse Source

Misc

tags/1.9.4
falkTX 10 years ago
parent
commit
8beac188a5
3 changed files with 16 additions and 25 deletions
  1. +2
    -6
      source/backend/engine/CarlaEngineJack.cpp
  2. +13
    -14
      source/backend/engine/CarlaEngineThread.cpp
  3. +1
    -5
      source/backend/engine/CarlaEngineThread.hpp

+ 2
- 6
source/backend/engine/CarlaEngineJack.cpp View File

@@ -39,15 +39,11 @@ using juce::FloatVectorOperations;
using juce::String; using juce::String;
using juce::StringArray; using juce::StringArray;


CARLA_BACKEND_START_NAMESPACE

#if 0
} // Fix editor indentation
#endif

class CarlaEngineJack; class CarlaEngineJack;
class CarlaEngineJackClient; class CarlaEngineJackClient;


CARLA_BACKEND_START_NAMESPACE

// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// Fallback data // Fallback data




+ 13
- 14
source/backend/engine/CarlaEngineThread.cpp View File

@@ -25,7 +25,7 @@ CARLA_BACKEND_START_NAMESPACE


CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) noexcept CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) noexcept
: CarlaThread("CarlaEngineThread"), : CarlaThread("CarlaEngineThread"),
fEngine(engine)
kEngine(engine)
{ {
CARLA_SAFE_ASSERT(engine != nullptr); CARLA_SAFE_ASSERT(engine != nullptr);
carla_debug("CarlaEngineThread::CarlaEngineThread(%p)", engine); carla_debug("CarlaEngineThread::CarlaEngineThread(%p)", engine);
@@ -35,24 +35,24 @@ CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) noexcept


void CarlaEngineThread::run() 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()"); carla_debug("CarlaEngineThread::run()");


bool hasUi, oscRegisted, needsSingleThread; bool hasUi, oscRegisted, needsSingleThread;
float value; float value;


for (; fEngine->isRunning() && ! shouldThreadExit();)
for (; kEngine->isRunning() && ! shouldThreadExit();)
{ {
#ifdef BUILD_BRIDGE #ifdef BUILD_BRIDGE
oscRegisted = fEngine->isOscBridgeRegistered();
oscRegisted = kEngine->isOscBridgeRegistered();
#else #else
oscRegisted = fEngine->isOscControlRegistered();
oscRegisted = kEngine->isOscControlRegistered();
#endif #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_CONTINUE(plugin != nullptr && plugin->isEnabled());
CARLA_SAFE_ASSERT_UINT2(i == plugin->getId(), i, plugin->getId()); CARLA_SAFE_ASSERT_UINT2(i == plugin->getId(), i, plugin->getId());
@@ -69,8 +69,7 @@ void CarlaEngineThread::run() noexcept
{ {
try { try {
plugin->postRtEventsRun(); plugin->postRtEventsRun();
}
CARLA_SAFE_EXCEPTION("postRtEventsRun()")
} CARLA_SAFE_EXCEPTION("postRtEventsRun()")
} }


if (oscRegisted || (hasUi && ! needsSingleThread)) if (oscRegisted || (hasUi && ! needsSingleThread))
@@ -89,9 +88,9 @@ void CarlaEngineThread::run() noexcept
if (oscRegisted) if (oscRegisted)
{ {
#ifdef BUILD_BRIDGE #ifdef BUILD_BRIDGE
fEngine->oscSend_bridge_parameter_value(j, value);
kEngine->oscSend_bridge_parameter_value(j, value);
#else #else
fEngine->oscSend_control_set_parameter_value(i, static_cast<int32_t>(j), value);
kEngine->oscSend_control_set_parameter_value(i, static_cast<int32_t>(j), value);
#endif #endif
} }


@@ -106,7 +105,7 @@ void CarlaEngineThread::run() noexcept
// Update OSC control client peaks // Update OSC control client peaks


if (oscRegisted) if (oscRegisted)
fEngine->oscSend_control_set_peaks(i);
kEngine->oscSend_control_set_peaks(i);
#endif #endif
} }
} }
@@ -116,7 +115,7 @@ void CarlaEngineThread::run() noexcept
// Send pong // Send pong


if (oscRegisted) if (oscRegisted)
fEngine->oscSend_bridge_pong();
kEngine->oscSend_bridge_pong();
#endif #endif


carla_msleep(25); carla_msleep(25);


+ 1
- 5
source/backend/engine/CarlaEngineThread.hpp View File

@@ -23,10 +23,6 @@


CARLA_BACKEND_START_NAMESPACE CARLA_BACKEND_START_NAMESPACE


#if 0
} // Fix editor indentation
#endif

// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// CarlaEngineThread // CarlaEngineThread


@@ -39,7 +35,7 @@ protected:
void run() noexcept override; void run() noexcept override;


private: private:
CarlaEngine* const fEngine;
CarlaEngine* const kEngine;


CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineThread) CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineThread)
}; };


Loading…
Cancel
Save