| @@ -607,7 +607,7 @@ typedef enum { | |||||
| */ | */ | ||||
| PARAMETER_NULL = -1, | PARAMETER_NULL = -1, | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * Active parameter, boolean type. | * Active parameter, boolean type. | ||||
| * Default is 'false'. | * Default is 'false'. | ||||
| @@ -716,7 +716,7 @@ typedef enum { | |||||
| */ | */ | ||||
| ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED = 6, | ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED = 6, | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * A parameter's MIDI CC has changed. | * A parameter's MIDI CC has changed. | ||||
| * @a pluginId Plugin Id | * @a pluginId Plugin Id | ||||
| @@ -814,7 +814,7 @@ typedef enum { | |||||
| */ | */ | ||||
| ENGINE_CALLBACK_RELOAD_ALL = 19, | ENGINE_CALLBACK_RELOAD_ALL = 19, | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * A patchbay client has been added. | * A patchbay client has been added. | ||||
| * @a pluginId Client Id | * @a pluginId Client Id | ||||
| @@ -821,7 +821,7 @@ public: | |||||
| */ | */ | ||||
| bool removeAllPlugins(); | bool removeAllPlugins(); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * Rename plugin with id @a id to @a newName. | * Rename plugin with id @a id to @a newName. | ||||
| * Returns the new name, or null if the operation failed. | * Returns the new name, or null if the operation failed. | ||||
| @@ -965,7 +965,7 @@ public: | |||||
| */ | */ | ||||
| void setFileCallback(const FileCallbackFunc func, void* const ptr) noexcept; | void setFileCallback(const FileCallbackFunc func, void* const ptr) noexcept; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Patchbay | // Patchbay | ||||
| @@ -1052,7 +1052,6 @@ public: | |||||
| * Check if OSC controller is registered. | * Check if OSC controller is registered. | ||||
| */ | */ | ||||
| bool isOscControlRegistered() const noexcept; | bool isOscControlRegistered() const noexcept; | ||||
| #endif | |||||
| /*! | /*! | ||||
| * Idle OSC. | * Idle OSC. | ||||
| @@ -1068,6 +1067,7 @@ public: | |||||
| * Get OSC UDP server path. | * Get OSC UDP server path. | ||||
| */ | */ | ||||
| const char* getOscServerPathUDP() const noexcept; | const char* getOscServerPathUDP() const noexcept; | ||||
| #endif | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Helper functions | // Helper functions | ||||
| @@ -1078,7 +1078,7 @@ public: | |||||
| */ | */ | ||||
| EngineEvent* getInternalEventBuffer(const bool isInput) const noexcept; | EngineEvent* getInternalEventBuffer(const bool isInput) const noexcept; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * Virtual functions for handling external graph ports. | * Virtual functions for handling external graph ports. | ||||
| */ | */ | ||||
| @@ -1142,7 +1142,7 @@ protected: | |||||
| */ | */ | ||||
| bool loadProjectInternal(water::XmlDocument& xmlDoc); | bool loadProjectInternal(water::XmlDocument& xmlDoc); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Patchbay stuff | // Patchbay stuff | ||||
| @@ -463,7 +463,7 @@ public: | |||||
| */ | */ | ||||
| void setActive(const bool active, const bool sendOsc, const bool sendCallback) noexcept; | void setActive(const bool active, const bool sendOsc, const bool sendCallback) noexcept; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * Set the plugin's dry/wet signal value to @a value. | * Set the plugin's dry/wet signal value to @a value. | ||||
| * @a value must be between 0.0 and 1.0. | * @a value must be between 0.0 and 1.0. | ||||
| @@ -749,7 +749,7 @@ public: | |||||
| */ | */ | ||||
| void sendMidiSingleNote(const uint8_t channel, const uint8_t note, const uint8_t velo, const bool sendGui, const bool sendOsc, const bool sendCallback); | void sendMidiSingleNote(const uint8_t channel, const uint8_t note, const uint8_t velo, const bool sendGui, const bool sendOsc, const bool sendCallback); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| /*! | /*! | ||||
| * Send all midi notes off to the host callback. | * Send all midi notes off to the host callback. | ||||
| * This doesn't send the actual MIDI All-Notes-Off event, but 128 note-offs instead (IFF ctrlChannel is valid). | * This doesn't send the actual MIDI All-Notes-Off event, but 128 note-offs instead (IFF ctrlChannel is valid). | ||||
| @@ -98,39 +98,73 @@ typedef void (*void_func)(void); | |||||
| class ThreadSafeFFTW | class ThreadSafeFFTW | ||||
| { | { | ||||
| public: | public: | ||||
| struct Deinitializer { | |||||
| Deinitializer(ThreadSafeFFTW& s) | |||||
| : tsfftw(s) {} | |||||
| ~Deinitializer() | |||||
| { | |||||
| tsfftw.deinit(); | |||||
| } | |||||
| ThreadSafeFFTW& tsfftw; | |||||
| }; | |||||
| ThreadSafeFFTW() | ThreadSafeFFTW() | ||||
| : libfftw3(lib_open("libfftw3_threads.so.3")), | |||||
| libfftw3f(lib_open("libfftw3f_threads.so.3")), | |||||
| libfftw3l(lib_open("libfftw3l_threads.so.3")), | |||||
| libfftw3q(lib_open("libfftw3q_threads.so.3")) | |||||
| : libfftw3(nullptr), | |||||
| libfftw3f(nullptr), | |||||
| libfftw3l(nullptr), | |||||
| libfftw3q(nullptr) {} | |||||
| ~ThreadSafeFFTW() | |||||
| { | { | ||||
| if (libfftw3 != nullptr) | |||||
| CARLA_SAFE_ASSERT(libfftw3 == nullptr); | |||||
| } | |||||
| void init() | |||||
| { | |||||
| if ((libfftw3 = lib_open("libfftw3_threads.so.3")) != nullptr) | |||||
| if (const void_func func = lib_symbol<void_func>(libfftw3, "fftw_make_planner_thread_safe")) | if (const void_func func = lib_symbol<void_func>(libfftw3, "fftw_make_planner_thread_safe")) | ||||
| func(); | func(); | ||||
| if (libfftw3f != nullptr) | |||||
| if ((libfftw3f = lib_open("libfftw3f_threads.so.3")) != nullptr) | |||||
| if (const void_func func = lib_symbol<void_func>(libfftw3f, "fftwf_make_planner_thread_safe")) | if (const void_func func = lib_symbol<void_func>(libfftw3f, "fftwf_make_planner_thread_safe")) | ||||
| func(); | func(); | ||||
| if (libfftw3l != nullptr) | |||||
| if ((libfftw3l = lib_open("libfftw3l_threads.so.3")) != nullptr) | |||||
| if (const void_func func = lib_symbol<void_func>(libfftw3l, "fftwl_make_planner_thread_safe")) | if (const void_func func = lib_symbol<void_func>(libfftw3l, "fftwl_make_planner_thread_safe")) | ||||
| func(); | func(); | ||||
| if (libfftw3q != nullptr) | |||||
| if ((libfftw3q = lib_open("libfftw3q_threads.so.3")) != nullptr) | |||||
| if (const void_func func = lib_symbol<void_func>(libfftw3q, "fftwq_make_planner_thread_safe")) | if (const void_func func = lib_symbol<void_func>(libfftw3q, "fftwq_make_planner_thread_safe")) | ||||
| func(); | func(); | ||||
| } | } | ||||
| ~ThreadSafeFFTW() | |||||
| void deinit() | |||||
| { | { | ||||
| if (libfftw3 != nullptr) | if (libfftw3 != nullptr) | ||||
| { | |||||
| lib_close(libfftw3); | lib_close(libfftw3); | ||||
| libfftw3 = nullptr; | |||||
| } | |||||
| if (libfftw3f != nullptr) | if (libfftw3f != nullptr) | ||||
| { | |||||
| lib_close(libfftw3f); | lib_close(libfftw3f); | ||||
| libfftw3f = nullptr; | |||||
| } | |||||
| if (libfftw3l != nullptr) | if (libfftw3l != nullptr) | ||||
| { | |||||
| lib_close(libfftw3l); | lib_close(libfftw3l); | ||||
| libfftw3l = nullptr; | |||||
| } | |||||
| if (libfftw3q != nullptr) | if (libfftw3q != nullptr) | ||||
| { | |||||
| lib_close(libfftw3q); | lib_close(libfftw3q); | ||||
| libfftw3q = nullptr; | |||||
| } | |||||
| } | } | ||||
| private: | private: | ||||
| @@ -139,6 +173,8 @@ private: | |||||
| lib_t libfftw3l; | lib_t libfftw3l; | ||||
| lib_t libfftw3q; | lib_t libfftw3q; | ||||
| }; | }; | ||||
| static ThreadSafeFFTW sThreadSafeFFTW; | |||||
| #endif | #endif | ||||
| // -------------------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -350,7 +386,7 @@ bool carla_engine_init(const char* driverName, const char* clientName) | |||||
| carla_setenv("WINEASIO_CLIENT_NAME", clientName); | carla_setenv("WINEASIO_CLIENT_NAME", clientName); | ||||
| #endif | #endif | ||||
| #ifdef CARLA_OS_UNIX | #ifdef CARLA_OS_UNIX | ||||
| static const ThreadSafeFFTW tsfftw; | |||||
| sThreadSafeFFTW.init(); | |||||
| #endif | #endif | ||||
| ScopedPointer<CarlaEngine> engine(CarlaEngine::newDriverByName(driverName)); | ScopedPointer<CarlaEngine> engine(CarlaEngine::newDriverByName(driverName)); | ||||
| @@ -432,6 +468,10 @@ bool carla_engine_close() | |||||
| CARLA_SAFE_ASSERT_WITH_LAST_ERROR_RETURN(gStandalone.engine != nullptr, "Engine is not initialized", false); | CARLA_SAFE_ASSERT_WITH_LAST_ERROR_RETURN(gStandalone.engine != nullptr, "Engine is not initialized", false); | ||||
| #ifdef CARLA_OS_UNIX | |||||
| const ThreadSafeFFTW::Deinitializer tsfftwde(sThreadSafeFFTW); | |||||
| #endif | |||||
| ScopedPointer<CarlaEngine> engine(gStandalone.engine); | ScopedPointer<CarlaEngine> engine(gStandalone.engine); | ||||
| gStandalone.engine = nullptr; | gStandalone.engine = nullptr; | ||||
| @@ -1856,7 +1896,7 @@ const char* carla_get_host_osc_url_tcp() | |||||
| { | { | ||||
| carla_debug("carla_get_host_osc_url_tcp()"); | carla_debug("carla_get_host_osc_url_tcp()"); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (gStandalone.engine == nullptr) | if (gStandalone.engine == nullptr) | ||||
| { | { | ||||
| carla_stderr2("carla_get_host_osc_url_tcp() failed, engine is not running"); | carla_stderr2("carla_get_host_osc_url_tcp() failed, engine is not running"); | ||||
| @@ -1874,7 +1914,7 @@ const char* carla_get_host_osc_url_udp() | |||||
| { | { | ||||
| carla_debug("carla_get_host_osc_url_udp()"); | carla_debug("carla_get_host_osc_url_udp()"); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (gStandalone.engine == nullptr) | if (gStandalone.engine == nullptr) | ||||
| { | { | ||||
| carla_stderr2("carla_get_host_osc_url_udp() failed, engine is not running"); | carla_stderr2("carla_get_host_osc_url_udp() failed, engine is not running"); | ||||
| @@ -285,7 +285,7 @@ void CarlaEngine::idle() noexcept | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| pData->osc.idle(); | pData->osc.idle(); | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -303,7 +303,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| const void* const extra, const uint options) | const void* const extra, const uint options) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextPluginId <= pData->maxPluginNumber, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextPluginId <= pData->maxPluginNumber, "Invalid engine internal data"); | ||||
| #endif | #endif | ||||
| @@ -315,7 +315,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| uint id; | uint id; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CarlaPlugin* oldPlugin = nullptr; | CarlaPlugin* oldPlugin = nullptr; | ||||
| if (pData->nextPluginId < pData->curPluginCount) | if (pData->nextPluginId < pData->curPluginCount) | ||||
| @@ -338,7 +338,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| return false; | return false; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins[id].plugin == nullptr, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins[id].plugin == nullptr, "Invalid engine internal data"); | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -486,7 +486,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| plugin->reload(); | plugin->reload(); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| bool canRun = true; | bool canRun = true; | ||||
| /**/ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | /**/ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | ||||
| @@ -517,7 +517,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| return false; | return false; | ||||
| } | } | ||||
| # ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| plugin->registerToOscClient(); | plugin->registerToOscClient(); | ||||
| # endif | # endif | ||||
| #endif | #endif | ||||
| @@ -529,7 +529,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| pluginData.outsPeak[0] = 0.0f; | pluginData.outsPeak[0] = 0.0f; | ||||
| pluginData.outsPeak[1] = 0.0f; | pluginData.outsPeak[1] = 0.0f; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (oldPlugin != nullptr) | if (oldPlugin != nullptr) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT(! pData->loadingProject); | CARLA_SAFE_ASSERT(! pData->loadingProject); | ||||
| @@ -565,7 +565,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||||
| ++pData->curPluginCount; | ++pData->curPluginCount; | ||||
| callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName()); | callback(ENGINE_CALLBACK_PLUGIN_ADDED, id, 0, 0, 0.0f, plugin->getName()); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| pData->graph.addPlugin(plugin); | pData->graph.addPlugin(plugin); | ||||
| #endif | #endif | ||||
| @@ -582,7 +582,7 @@ bool CarlaEngine::addPlugin(const PluginType ptype, const char* const filename, | |||||
| bool CarlaEngine::removePlugin(const uint id) | bool CarlaEngine::removePlugin(const uint id) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->curPluginCount != 0, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->curPluginCount != 0, "Invalid engine internal data"); | ||||
| #endif | #endif | ||||
| @@ -597,7 +597,7 @@ bool CarlaEngine::removePlugin(const uint id) | |||||
| const ScopedThreadStopper sts(this); | const ScopedThreadStopper sts(this); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| pData->graph.removePlugin(plugin); | pData->graph.removePlugin(plugin); | ||||
| @@ -612,7 +612,7 @@ bool CarlaEngine::removePlugin(const uint id) | |||||
| } | } | ||||
| */ | */ | ||||
| # ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (isOscControlRegistered()) | if (isOscControlRegistered()) | ||||
| oscSend_control_remove_plugin(id); | oscSend_control_remove_plugin(id); | ||||
| # endif | # endif | ||||
| @@ -630,7 +630,7 @@ bool CarlaEngine::removePlugin(const uint id) | |||||
| bool CarlaEngine::removeAllPlugins() | bool CarlaEngine::removeAllPlugins() | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins != nullptr, "Invalid engine internal data"); | ||||
| CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextPluginId == pData->maxPluginNumber, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERR(pData->nextPluginId == pData->maxPluginNumber, "Invalid engine internal data"); | ||||
| #endif | #endif | ||||
| @@ -644,11 +644,11 @@ bool CarlaEngine::removeAllPlugins() | |||||
| const uint curPluginCount(pData->curPluginCount); | const uint curPluginCount(pData->curPluginCount); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| pData->graph.removeAllPlugins(); | pData->graph.removeAllPlugins(); | ||||
| # ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (isOscControlRegistered()) | if (isOscControlRegistered()) | ||||
| { | { | ||||
| for (uint i=0; i < curPluginCount; ++i) | for (uint i=0; i < curPluginCount; ++i) | ||||
| @@ -682,7 +682,7 @@ bool CarlaEngine::removeAllPlugins() | |||||
| return true; | return true; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const char* CarlaEngine::renamePlugin(const uint id, const char* const newName) | const char* CarlaEngine::renamePlugin(const uint id, const char* const newName) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_ERRN(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | CARLA_SAFE_ASSERT_RETURN_ERRN(pData->isIdling == 0, "An operation is still being processed, please wait for it to finish"); | ||||
| @@ -810,7 +810,7 @@ bool CarlaEngine::switchPlugins(const uint idA, const uint idB) noexcept | |||||
| CarlaPlugin* CarlaEngine::getPlugin(const uint id) const noexcept | CarlaPlugin* CarlaEngine::getPlugin(const uint id) const noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_ERRN(pData->plugins != nullptr, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERRN(pData->plugins != nullptr, "Invalid engine internal data"); | ||||
| CARLA_SAFE_ASSERT_RETURN_ERRN(pData->curPluginCount != 0, "Invalid engine internal data"); | CARLA_SAFE_ASSERT_RETURN_ERRN(pData->curPluginCount != 0, "Invalid engine internal data"); | ||||
| #endif | #endif | ||||
| @@ -1171,11 +1171,11 @@ float CarlaEngine::getOutputPeak(const uint pluginId, const bool isLeft) const n | |||||
| void CarlaEngine::callback(const EngineCallbackOpcode action, const uint pluginId, const int value1, const int value2, const float value3, const char* const valueStr) noexcept | void CarlaEngine::callback(const EngineCallbackOpcode action, const uint pluginId, const int value1, const int value2, const float value3, const char* const valueStr) noexcept | ||||
| { | { | ||||
| #ifdef DEBUG | #ifdef DEBUG | ||||
| if (action != ENGINE_CALLBACK_IDLE) | |||||
| if (action != ENGINE_CALLBACK_IDLE && action != ENGINE_CALLBACK_NOTE_ON && action != ENGINE_CALLBACK_NOTE_OFF) | |||||
| carla_debug("CarlaEngine::callback(%i:%s, %i, %i, %i, %f, \"%s\")", action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr); | carla_debug("CarlaEngine::callback(%i:%s, %i, %i, %i, %f, \"%s\")", action, EngineCallbackOpcode2Str(action), pluginId, value1, value2, value3, valueStr); | ||||
| #endif | #endif | ||||
| #ifdef BUILD_BRIDGE | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->isIdling) | if (pData->isIdling) | ||||
| #else | #else | ||||
| if (pData->isIdling && action != ENGINE_CALLBACK_PATCHBAY_CLIENT_DATA_CHANGED) | if (pData->isIdling && action != ENGINE_CALLBACK_PATCHBAY_CLIENT_DATA_CHANGED) | ||||
| @@ -1363,7 +1363,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| break; | break; | ||||
| case ENGINE_OPTION_PREFER_PLUGIN_BRIDGES: | case ENGINE_OPTION_PREFER_PLUGIN_BRIDGES: | ||||
| #ifdef BUILD_BRIDGE | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(value == 0,); | CARLA_SAFE_ASSERT_RETURN(value == 0,); | ||||
| #else | #else | ||||
| CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | CARLA_SAFE_ASSERT_RETURN(value == 0 || value == 1,); | ||||
| @@ -1563,16 +1563,14 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // OSC Stuff | // OSC Stuff | ||||
| # ifndef BUILD_BRIDGE | |||||
| bool CarlaEngine::isOscControlRegistered() const noexcept | bool CarlaEngine::isOscControlRegistered() const noexcept | ||||
| { | { | ||||
| return pData->osc.isControlRegistered(); | return pData->osc.isControlRegistered(); | ||||
| } | } | ||||
| # endif | |||||
| void CarlaEngine::idleOsc() const noexcept | void CarlaEngine::idleOsc() const noexcept | ||||
| { | { | ||||
| @@ -1605,7 +1603,7 @@ void CarlaEngine::bufferSizeChanged(const uint32_t newBufferSize) | |||||
| { | { | ||||
| carla_debug("CarlaEngine::bufferSizeChanged(%i)", newBufferSize); | carla_debug("CarlaEngine::bufferSizeChanged(%i)", newBufferSize); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | ||||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| { | { | ||||
| @@ -1630,7 +1628,7 @@ void CarlaEngine::sampleRateChanged(const double newSampleRate) | |||||
| { | { | ||||
| carla_debug("CarlaEngine::sampleRateChanged(%g)", newSampleRate); | carla_debug("CarlaEngine::sampleRateChanged(%g)", newSampleRate); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | ||||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| { | { | ||||
| @@ -1655,7 +1653,7 @@ void CarlaEngine::offlineModeChanged(const bool isOfflineNow) | |||||
| { | { | ||||
| carla_debug("CarlaEngine::offlineModeChanged(%s)", bool2str(isOfflineNow)); | carla_debug("CarlaEngine::offlineModeChanged(%s)", bool2str(isOfflineNow)); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | ||||
| pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| { | { | ||||
| @@ -1691,7 +1689,7 @@ void CarlaEngine::saveProjectInternal(water::MemoryOutputStream& outStream) cons | |||||
| if (plugin != nullptr && plugin->isEnabled()) | if (plugin != nullptr && plugin->isEnabled()) | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // deactivate bridge client-side ping check, since some plugins block during save | // deactivate bridge client-side ping check, since some plugins block during save | ||||
| if (plugin->getHints() & PLUGIN_IS_BRIDGE) | if (plugin->getHints() & PLUGIN_IS_BRIDGE) | ||||
| plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "false", false); | plugin->setCustomData(CUSTOM_DATA_TYPE_STRING, "__CarlaPingOnOff__", "false", false); | ||||
| @@ -1771,7 +1769,7 @@ void CarlaEngine::saveProjectInternal(water::MemoryOutputStream& outStream) cons | |||||
| } | } | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // tell bridges we're done saving | // tell bridges we're done saving | ||||
| for (uint i=0; i < pData->curPluginCount; ++i) | for (uint i=0; i < pData->curPluginCount; ++i) | ||||
| { | { | ||||
| @@ -1935,7 +1933,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||||
| return false; | return false; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const ScopedValueSetter<bool> _svs(pData->loadingProject, true, false); | const ScopedValueSetter<bool> _svs(pData->loadingProject, true, false); | ||||
| #endif | #endif | ||||
| @@ -2206,7 +2204,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||||
| if (addPlugin(getBinaryTypeFromFile(stateSave.binary), ptype, stateSave.binary, | if (addPlugin(getBinaryTypeFromFile(stateSave.binary), ptype, stateSave.binary, | ||||
| stateSave.name, stateSave.label, stateSave.uniqueId, extraStuff, stateSave.options)) | stateSave.name, stateSave.label, stateSave.uniqueId, extraStuff, stateSave.options)) | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const uint pluginId = pData->curPluginCount; | const uint pluginId = pData->curPluginCount; | ||||
| #else | #else | ||||
| const uint pluginId = 0; | const uint pluginId = 0; | ||||
| @@ -2229,7 +2227,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||||
| * When project is loading we do not enable the plugin right away, | * When project is loading we do not enable the plugin right away, | ||||
| * as we want to load state first. | * as we want to load state first. | ||||
| */ | */ | ||||
| #ifdef BUILD_BRIDGE | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| plugin->setActive(true, true, false); | plugin->setActive(true, true, false); | ||||
| #else | #else | ||||
| ++pData->curPluginCount; | ++pData->curPluginCount; | ||||
| @@ -2238,7 +2236,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||||
| plugin->setEnabled(true); | plugin->setEnabled(true); | ||||
| callback(ENGINE_CALLBACK_PLUGIN_ADDED, pluginId, 0, 0, 0.0f, plugin->getName()); | callback(ENGINE_CALLBACK_PLUGIN_ADDED, pluginId, 0, 0, 0.0f, plugin->getName()); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | ||||
| pData->graph.addPlugin(plugin); | pData->graph.addPlugin(plugin); | ||||
| #endif | #endif | ||||
| @@ -2258,7 +2256,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||||
| return true; | return true; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // tell bridges we're done loading | // tell bridges we're done loading | ||||
| for (uint i=0; i < pData->curPluginCount; ++i) | for (uint i=0; i < pData->curPluginCount; ++i) | ||||
| { | { | ||||
| @@ -1409,14 +1409,6 @@ CARLA_BACKEND_END_NAMESPACE | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| #if defined(CARLA_OS_WIN) && ! defined(__WINE__) | |||||
| extern "C" __declspec (dllexport) | |||||
| #else | |||||
| extern "C" __attribute__ ((visibility("default"))) | |||||
| #endif | |||||
| void carla_register_native_plugin_carla(); | |||||
| void carla_register_native_plugin_carla(){} | |||||
| #include "CarlaBridgeUtils.cpp" | #include "CarlaBridgeUtils.cpp" | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -418,7 +418,7 @@ void EngineNextAction::clearAndReset() noexcept | |||||
| CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | ||||
| : thread(engine), | : thread(engine), | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| osc(engine), | osc(engine), | ||||
| oscData(nullptr), | oscData(nullptr), | ||||
| #endif | #endif | ||||
| @@ -426,7 +426,7 @@ CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | |||||
| callbackPtr(nullptr), | callbackPtr(nullptr), | ||||
| fileCallback(nullptr), | fileCallback(nullptr), | ||||
| fileCallbackPtr(nullptr), | fileCallbackPtr(nullptr), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| loadingProject(false), | loadingProject(false), | ||||
| #endif | #endif | ||||
| hints(0x0), | hints(0x0), | ||||
| @@ -442,17 +442,17 @@ CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | |||||
| name(), | name(), | ||||
| options(), | options(), | ||||
| timeInfo(), | timeInfo(), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| plugins(nullptr), | plugins(nullptr), | ||||
| #endif | #endif | ||||
| events(), | events(), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| graph(engine), | graph(engine), | ||||
| #endif | #endif | ||||
| time(timeInfo, options.transportMode), | time(timeInfo, options.transportMode), | ||||
| nextAction() | nextAction() | ||||
| { | { | ||||
| #ifdef BUILD_BRIDGE | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| carla_zeroStructs(plugins, 1); | carla_zeroStructs(plugins, 1); | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -463,7 +463,7 @@ CarlaEngine::ProtectedData::~ProtectedData() noexcept | |||||
| CARLA_SAFE_ASSERT(maxPluginNumber == 0); | CARLA_SAFE_ASSERT(maxPluginNumber == 0); | ||||
| CARLA_SAFE_ASSERT(nextPluginId == 0); | CARLA_SAFE_ASSERT(nextPluginId == 0); | ||||
| CARLA_SAFE_ASSERT(isIdling == 0); | CARLA_SAFE_ASSERT(isIdling == 0); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT(plugins == nullptr); | CARLA_SAFE_ASSERT(plugins == nullptr); | ||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -473,13 +473,13 @@ CarlaEngine::ProtectedData::~ProtectedData() noexcept | |||||
| bool CarlaEngine::ProtectedData::init(const char* const clientName) | bool CarlaEngine::ProtectedData::init(const char* const clientName) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(name.isEmpty(), "Invalid engine internal data (err #1)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(name.isEmpty(), "Invalid engine internal data (err #1)"); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(oscData == nullptr, "Invalid engine internal data (err #2)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(oscData == nullptr, "Invalid engine internal data (err #2)"); | ||||
| #endif | #endif | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.in == nullptr, "Invalid engine internal data (err #4)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.in == nullptr, "Invalid engine internal data (err #4)"); | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.out == nullptr, "Invalid engine internal data (err #5)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(events.out == nullptr, "Invalid engine internal data (err #5)"); | ||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(clientName != nullptr && clientName[0] != '\0', "Invalid client name"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(clientName != nullptr && clientName[0] != '\0', "Invalid client name"); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(plugins == nullptr, "Invalid engine internal data (err #3)"); | CARLA_SAFE_ASSERT_RETURN_INTERNAL_ERR(plugins == nullptr, "Invalid engine internal data (err #3)"); | ||||
| #endif | #endif | ||||
| @@ -525,14 +525,12 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||||
| timeInfo.clear(); | timeInfo.clear(); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| osc.init(clientName); | osc.init(clientName); | ||||
| # ifndef BUILD_BRIDGE | |||||
| oscData = osc.getControlData(); | oscData = osc.getControlData(); | ||||
| # endif | |||||
| #endif | #endif | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| plugins = new EnginePluginData[maxPluginNumber]; | plugins = new EnginePluginData[maxPluginNumber]; | ||||
| carla_zeroStructs(plugins, maxPluginNumber); | carla_zeroStructs(plugins, maxPluginNumber); | ||||
| #endif | #endif | ||||
| @@ -546,7 +544,7 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||||
| void CarlaEngine::ProtectedData::close() | void CarlaEngine::ProtectedData::close() | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT(name.isNotEmpty()); | CARLA_SAFE_ASSERT(name.isNotEmpty()); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT(plugins != nullptr); | CARLA_SAFE_ASSERT(plugins != nullptr); | ||||
| CARLA_SAFE_ASSERT(nextPluginId == maxPluginNumber); | CARLA_SAFE_ASSERT(nextPluginId == maxPluginNumber); | ||||
| #endif | #endif | ||||
| @@ -556,7 +554,7 @@ void CarlaEngine::ProtectedData::close() | |||||
| thread.stopThread(500); | thread.stopThread(500); | ||||
| nextAction.clearAndReset(); | nextAction.clearAndReset(); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| osc.close(); | osc.close(); | ||||
| oscData = nullptr; | oscData = nullptr; | ||||
| #endif | #endif | ||||
| @@ -566,7 +564,7 @@ void CarlaEngine::ProtectedData::close() | |||||
| maxPluginNumber = 0; | maxPluginNumber = 0; | ||||
| nextPluginId = 0; | nextPluginId = 0; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (plugins != nullptr) | if (plugins != nullptr) | ||||
| { | { | ||||
| delete[] plugins; | delete[] plugins; | ||||
| @@ -595,7 +593,7 @@ void CarlaEngine::ProtectedData::initTime(const char* const features) | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void CarlaEngine::ProtectedData::doPluginRemove(const uint pluginId) noexcept | void CarlaEngine::ProtectedData::doPluginRemove(const uint pluginId) noexcept | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(curPluginCount > 0,); | CARLA_SAFE_ASSERT_RETURN(curPluginCount > 0,); | ||||
| @@ -656,7 +654,7 @@ void CarlaEngine::ProtectedData::doNextPluginAction() noexcept | |||||
| const EnginePostAction opcode = nextAction.opcode; | const EnginePostAction opcode = nextAction.opcode; | ||||
| const bool needsPost = nextAction.needsPost; | const bool needsPost = nextAction.needsPost; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const uint pluginId = nextAction.pluginId; | const uint pluginId = nextAction.pluginId; | ||||
| const uint value = nextAction.value; | const uint value = nextAction.value; | ||||
| #endif | #endif | ||||
| @@ -675,7 +673,7 @@ void CarlaEngine::ProtectedData::doNextPluginAction() noexcept | |||||
| case kEnginePostActionZeroCount: | case kEnginePostActionZeroCount: | ||||
| curPluginCount = 0; | curPluginCount = 0; | ||||
| break; | break; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| case kEnginePostActionRemovePlugin: | case kEnginePostActionRemovePlugin: | ||||
| doPluginRemove(pluginId); | doPluginRemove(pluginId); | ||||
| break; | break; | ||||
| @@ -21,7 +21,7 @@ | |||||
| #include "CarlaEngineThread.hpp" | #include "CarlaEngineThread.hpp" | ||||
| #include "CarlaEngineUtils.hpp" | #include "CarlaEngineUtils.hpp" | ||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| #ifndef BUILD_BRIDGE | |||||
| # include "CarlaEngineOsc.hpp" | # include "CarlaEngineOsc.hpp" | ||||
| # include "hylia/hylia.h" | # include "hylia/hylia.h" | ||||
| #endif | #endif | ||||
| @@ -57,7 +57,7 @@ struct EngineInternalEvents { | |||||
| CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalEvents) | CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalEvents) | ||||
| }; | }; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // InternalGraph | // InternalGraph | ||||
| @@ -111,7 +111,7 @@ private: | |||||
| CARLA_PREVENT_HEAP_ALLOCATION | CARLA_PREVENT_HEAP_ALLOCATION | ||||
| CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph) | CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph) | ||||
| }; | }; | ||||
| #endif | |||||
| #endif // BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // InternalTime | // InternalTime | ||||
| @@ -170,7 +170,7 @@ private: | |||||
| enum EnginePostAction { | enum EnginePostAction { | ||||
| kEnginePostActionNull = 0, | kEnginePostActionNull = 0, | ||||
| kEnginePostActionZeroCount, // set curPluginCount to 0 | kEnginePostActionZeroCount, // set curPluginCount to 0 | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| kEnginePostActionRemovePlugin, // remove a plugin | kEnginePostActionRemovePlugin, // remove a plugin | ||||
| kEnginePostActionSwitchPlugins // switch between 2 plugins | kEnginePostActionSwitchPlugins // switch between 2 plugins | ||||
| #endif | #endif | ||||
| @@ -209,13 +209,9 @@ struct EnginePluginData { | |||||
| struct CarlaEngine::ProtectedData { | struct CarlaEngine::ProtectedData { | ||||
| CarlaEngineThread thread; | CarlaEngineThread thread; | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| CarlaEngineOsc osc; | CarlaEngineOsc osc; | ||||
| # ifdef BUILD_BRIDGE | |||||
| CarlaOscData* oscData; | |||||
| # else | |||||
| const CarlaOscData* oscData; | const CarlaOscData* oscData; | ||||
| # endif | |||||
| #endif | #endif | ||||
| EngineCallbackFunc callback; | EngineCallbackFunc callback; | ||||
| @@ -224,7 +220,7 @@ struct CarlaEngine::ProtectedData { | |||||
| FileCallbackFunc fileCallback; | FileCallbackFunc fileCallback; | ||||
| void* fileCallbackPtr; | void* fileCallbackPtr; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| bool loadingProject; | bool loadingProject; | ||||
| #endif | #endif | ||||
| @@ -244,14 +240,14 @@ struct CarlaEngine::ProtectedData { | |||||
| EngineOptions options; | EngineOptions options; | ||||
| EngineTimeInfo timeInfo; | EngineTimeInfo timeInfo; | ||||
| #ifdef BUILD_BRIDGE | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| EnginePluginData plugins[1]; | EnginePluginData plugins[1]; | ||||
| #else | #else | ||||
| EnginePluginData* plugins; | EnginePluginData* plugins; | ||||
| #endif | #endif | ||||
| EngineInternalEvents events; | EngineInternalEvents events; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| EngineInternalGraph graph; | EngineInternalGraph graph; | ||||
| #endif | #endif | ||||
| EngineInternalTime time; | EngineInternalTime time; | ||||
| @@ -17,8 +17,8 @@ | |||||
| #include "CarlaDefines.h" | #include "CarlaDefines.h" | ||||
| #ifdef BUILD_BRIDGE | |||||
| # error This file should not be compiled if building bridge | |||||
| #ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| # error This file should not be compiled if building alternative-arch bridges | |||||
| #endif | #endif | ||||
| #include "CarlaEngineInternal.hpp" | #include "CarlaEngineInternal.hpp" | ||||
| @@ -1165,7 +1165,7 @@ protected: | |||||
| const CarlaMutexLocker cml(fUiServer.getPipeLock()); | const CarlaMutexLocker cml(fUiServer.getPipeLock()); | ||||
| #ifdef HAVE_LIBLO | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (! fUiServer.writeAndFixMessage("osc-urls")) | if (! fUiServer.writeAndFixMessage("osc-urls")) | ||||
| return; | return; | ||||
| if (! fUiServer.writeAndFixMessage(pData->osc.getServerPathTCP())) | if (! fUiServer.writeAndFixMessage(pData->osc.getServerPathTCP())) | ||||
| @@ -46,7 +46,7 @@ void CarlaEngineThread::run() noexcept | |||||
| #endif | #endif | ||||
| carla_debug("CarlaEngineThread::run()"); | carla_debug("CarlaEngineThread::run()"); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| const bool isPlugin(kEngine->getType() == kEngineTypePlugin); | const bool isPlugin(kEngine->getType() == kEngineTypePlugin); | ||||
| #endif | #endif | ||||
| float value; | float value; | ||||
| @@ -63,7 +63,7 @@ void CarlaEngineThread::run() noexcept | |||||
| const bool oscRegisted = false; | const bool oscRegisted = false; | ||||
| #endif | #endif | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (isPlugin) | if (isPlugin) | ||||
| kEngine->idleOsc(); | kEngine->idleOsc(); | ||||
| #endif | #endif | ||||
| @@ -356,7 +356,7 @@ void CarlaPlugin::getParameterScalePointLabel(const uint32_t parameterId, const | |||||
| float CarlaPlugin::getInternalParameterValue(const int32_t parameterId) const noexcept | float CarlaPlugin::getInternalParameterValue(const int32_t parameterId) const noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(parameterId != PARAMETER_NULL && parameterId > PARAMETER_MAX, 0.0f); | CARLA_SAFE_ASSERT_RETURN(parameterId != PARAMETER_NULL && parameterId > PARAMETER_MAX, 0.0f); | ||||
| switch (parameterId) | switch (parameterId) | ||||
| @@ -498,14 +498,14 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||||
| pData->stateSave.name = carla_strdup(pData->name); | pData->stateSave.name = carla_strdup(pData->name); | ||||
| pData->stateSave.label = carla_strdup(strBuf); | pData->stateSave.label = carla_strdup(strBuf); | ||||
| pData->stateSave.uniqueId = getUniqueId(); | pData->stateSave.uniqueId = getUniqueId(); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| pData->stateSave.options = pData->options; | pData->stateSave.options = pData->options; | ||||
| #endif | #endif | ||||
| if (pData->filename != nullptr) | if (pData->filename != nullptr) | ||||
| pData->stateSave.binary = carla_strdup(pData->filename); | pData->stateSave.binary = carla_strdup(pData->filename); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Internals | // Internals | ||||
| @@ -578,7 +578,7 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||||
| stateParameter->dummy = dummy; | stateParameter->dummy = dummy; | ||||
| stateParameter->index = paramData.index; | stateParameter->index = paramData.index; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| stateParameter->midiCC = paramData.midiCC; | stateParameter->midiCC = paramData.midiCC; | ||||
| stateParameter->midiChannel = paramData.midiChannel; | stateParameter->midiChannel = paramData.midiChannel; | ||||
| #endif | #endif | ||||
| @@ -794,7 +794,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| setParameterValue(static_cast<uint32_t>(index), stateParameter->value, true, true, true); | setParameterValue(static_cast<uint32_t>(index), stateParameter->value, true, true, true); | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| setParameterMidiCC(static_cast<uint32_t>(index), stateParameter->midiCC, true, true); | setParameterMidiCC(static_cast<uint32_t>(index), stateParameter->midiCC, true, true); | ||||
| setParameterMidiChannel(static_cast<uint32_t>(index), stateParameter->midiChannel, true, true); | setParameterMidiChannel(static_cast<uint32_t>(index), stateParameter->midiChannel, true, true); | ||||
| #endif | #endif | ||||
| @@ -867,7 +867,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||||
| #endif | #endif | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // Part 6 - set internal stuff | // Part 6 - set internal stuff | ||||
| @@ -1270,7 +1270,7 @@ void CarlaPlugin::setOption(const uint option, const bool yesNo, const bool send | |||||
| else | else | ||||
| pData->options &= ~option; | pData->options &= ~option; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_OPTION_CHANGED, pData->id, static_cast<int>(option), yesNo ? 1 : 0, 0.0f, nullptr); | pData->engine->callback(ENGINE_CALLBACK_OPTION_CHANGED, pData->id, static_cast<int>(option), yesNo ? 1 : 0, 0.0f, nullptr); | ||||
| #else | #else | ||||
| @@ -1295,7 +1295,7 @@ void CarlaPlugin::setEnabled(const bool yesNo) noexcept | |||||
| void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | ||||
| #endif | #endif | ||||
| @@ -1313,10 +1313,10 @@ void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool se | |||||
| pData->active = active; | pData->active = active; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const float value(active ? 1.0f : 0.0f); | const float value(active ? 1.0f : 0.0f); | ||||
| # ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_ACTIVE, value); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_ACTIVE, value); | ||||
| # endif | # endif | ||||
| @@ -1329,7 +1329,7 @@ void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool se | |||||
| return; (void)sendOsc; (void)sendCallback; | return; (void)sendOsc; (void)sendCallback; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void CarlaPlugin::setDryWet(const float value, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setDryWet(const float value, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT(value >= 0.0f && value <= 1.0f); | CARLA_SAFE_ASSERT(value >= 0.0f && value <= 1.0f); | ||||
| @@ -1341,10 +1341,10 @@ void CarlaPlugin::setDryWet(const float value, const bool sendOsc, const bool se | |||||
| pData->postProc.dryWet = fixedValue; | pData->postProc.dryWet = fixedValue; | ||||
| #ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_DRYWET, fixedValue); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_DRYWET, fixedValue); | ||||
| #endif | |||||
| # endif | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_DRYWET, 0, fixedValue, nullptr); | pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_DRYWET, 0, fixedValue, nullptr); | ||||
| @@ -1364,10 +1364,10 @@ void CarlaPlugin::setVolume(const float value, const bool sendOsc, const bool se | |||||
| pData->postProc.volume = fixedValue; | pData->postProc.volume = fixedValue; | ||||
| #ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_VOLUME, fixedValue); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_VOLUME, fixedValue); | ||||
| #endif | |||||
| # endif | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_VOLUME, 0, fixedValue, nullptr); | pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_VOLUME, 0, fixedValue, nullptr); | ||||
| @@ -1387,10 +1387,10 @@ void CarlaPlugin::setBalanceLeft(const float value, const bool sendOsc, const bo | |||||
| pData->postProc.balanceLeft = fixedValue; | pData->postProc.balanceLeft = fixedValue; | ||||
| #ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_LEFT, fixedValue); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_LEFT, fixedValue); | ||||
| #endif | |||||
| # endif | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_BALANCE_LEFT, 0, fixedValue, nullptr); | pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_BALANCE_LEFT, 0, fixedValue, nullptr); | ||||
| @@ -1410,10 +1410,10 @@ void CarlaPlugin::setBalanceRight(const float value, const bool sendOsc, const b | |||||
| pData->postProc.balanceRight = fixedValue; | pData->postProc.balanceRight = fixedValue; | ||||
| #ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_RIGHT, fixedValue); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_RIGHT, fixedValue); | ||||
| #endif | |||||
| # endif | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_BALANCE_RIGHT, 0, fixedValue, nullptr); | pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_BALANCE_RIGHT, 0, fixedValue, nullptr); | ||||
| @@ -1433,10 +1433,10 @@ void CarlaPlugin::setPanning(const float value, const bool sendOsc, const bool s | |||||
| pData->postProc.panning = fixedValue; | pData->postProc.panning = fixedValue; | ||||
| #ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_PANNING, fixedValue); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_PANNING, fixedValue); | ||||
| #endif | |||||
| # endif | |||||
| if (sendCallback) | if (sendCallback) | ||||
| pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_PANNING, 0, fixedValue, nullptr); | pData->engine->callback(ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED, pData->id, PARAMETER_PANNING, 0, fixedValue, nullptr); | ||||
| @@ -1508,11 +1508,11 @@ void CarlaPlugin::setPanningRT(const float value) noexcept | |||||
| pData->postProc.panning = fixedValue; | pData->postProc.panning = fixedValue; | ||||
| } | } | ||||
| #endif // ! BUILD_BRIDGE | |||||
| #endif // ! BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void CarlaPlugin::setCtrlChannel(const int8_t channel, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setCtrlChannel(const int8_t channel, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | ||||
| #endif | #endif | ||||
| CARLA_SAFE_ASSERT_RETURN(channel >= -1 && channel < MAX_MIDI_CHANNELS,); | CARLA_SAFE_ASSERT_RETURN(channel >= -1 && channel < MAX_MIDI_CHANNELS,); | ||||
| @@ -1522,10 +1522,10 @@ void CarlaPlugin::setCtrlChannel(const int8_t channel, const bool sendOsc, const | |||||
| pData->ctrlChannel = channel; | pData->ctrlChannel = channel; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| const float channelf(channel); | const float channelf(channel); | ||||
| # ifdef HAVE_LIBLO | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_CTRL_CHANNEL, channelf); | pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_CTRL_CHANNEL, channelf); | ||||
| # endif | # endif | ||||
| @@ -1567,7 +1567,7 @@ void CarlaPlugin::setParameterValueRT(const uint32_t parameterId, const float va | |||||
| void CarlaPlugin::setParameterValueByRealIndex(const int32_t rindex, const float value, const bool sendGui, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setParameterValueByRealIndex(const int32_t rindex, const float value, const bool sendGui, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(rindex > PARAMETER_MAX && rindex != PARAMETER_NULL,); | CARLA_SAFE_ASSERT_RETURN(rindex > PARAMETER_MAX && rindex != PARAMETER_NULL,); | ||||
| switch (rindex) | switch (rindex) | ||||
| @@ -1603,7 +1603,7 @@ void CarlaPlugin::setParameterValueByRealIndex(const int32_t rindex, const float | |||||
| void CarlaPlugin::setParameterMidiChannel(const uint32_t parameterId, const uint8_t channel, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setParameterMidiChannel(const uint32_t parameterId, const uint8_t channel, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | ||||
| #endif | #endif | ||||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | ||||
| @@ -1611,8 +1611,8 @@ void CarlaPlugin::setParameterMidiChannel(const uint32_t parameterId, const uint | |||||
| pData->param.data[parameterId].midiChannel = channel; | pData->param.data[parameterId].midiChannel = channel; | ||||
| #ifndef BUILD_BRIDGE | |||||
| # ifdef HAVE_LIBLO | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_midi_channel(pData->id, parameterId, channel); | pData->engine->oscSend_control_set_parameter_midi_channel(pData->id, parameterId, channel); | ||||
| # endif | # endif | ||||
| @@ -1627,7 +1627,7 @@ void CarlaPlugin::setParameterMidiChannel(const uint32_t parameterId, const uint | |||||
| void CarlaPlugin::setParameterMidiCC(const uint32_t parameterId, const int16_t cc, const bool sendOsc, const bool sendCallback) noexcept | void CarlaPlugin::setParameterMidiCC(const uint32_t parameterId, const int16_t cc, const bool sendOsc, const bool sendCallback) noexcept | ||||
| { | { | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | ||||
| #endif | #endif | ||||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count,); | ||||
| @@ -1635,8 +1635,8 @@ void CarlaPlugin::setParameterMidiCC(const uint32_t parameterId, const int16_t c | |||||
| pData->param.data[parameterId].midiCC = cc; | pData->param.data[parameterId].midiCC = cc; | ||||
| #ifndef BUILD_BRIDGE | |||||
| # ifdef HAVE_LIBLO | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| # if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||||
| if (sendOsc && pData->engine->isOscControlRegistered()) | if (sendOsc && pData->engine->isOscControlRegistered()) | ||||
| pData->engine->oscSend_control_set_parameter_midi_cc(pData->id, parameterId, cc); | pData->engine->oscSend_control_set_parameter_midi_cc(pData->id, parameterId, cc); | ||||
| # endif | # endif | ||||
| @@ -2278,7 +2278,7 @@ void CarlaPlugin::sendMidiSingleNote(const uint8_t channel, const uint8_t note, | |||||
| return; (void)sendOsc; | return; (void)sendOsc; | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void CarlaPlugin::sendMidiAllNotesOffToCallback() | void CarlaPlugin::sendMidiAllNotesOffToCallback() | ||||
| { | { | ||||
| if (pData->ctrlChannel < 0 || pData->ctrlChannel >= MAX_MIDI_CHANNELS) | if (pData->ctrlChannel < 0 || pData->ctrlChannel >= MAX_MIDI_CHANNELS) | ||||
| @@ -2357,7 +2357,7 @@ void CarlaPlugin::uiIdle() | |||||
| pData->postUiEvents.data.clear(); | pData->postUiEvents.data.clear(); | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (pData->transientTryCounter == 0) | if (pData->transientTryCounter == 0) | ||||
| return; | return; | ||||
| if (++pData->transientTryCounter % 10 != 0) | if (++pData->transientTryCounter % 10 != 0) | ||||
| @@ -2555,7 +2555,7 @@ CarlaPlugin::ScopedSingleProcessLocker::~ScopedSingleProcessLocker() noexcept | |||||
| if (! fBlock) | if (! fBlock) | ||||
| return; | return; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (fPlugin->pData->singleMutex.wasTryLockCalled()) | if (fPlugin->pData->singleMutex.wasTryLockCalled()) | ||||
| fPlugin->pData->needsReset = true; | fPlugin->pData->needsReset = true; | ||||
| #endif | #endif | ||||
| @@ -1761,7 +1761,7 @@ public: | |||||
| { | { | ||||
| const PluginBridgeNonRtServerOpcode opcode(fShmNonRtServerControl.readOpcode()); | const PluginBridgeNonRtServerOpcode opcode(fShmNonRtServerControl.readOpcode()); | ||||
| #ifdef DEBUG | #ifdef DEBUG | ||||
| if (opcode != kPluginBridgeNonRtServerPong) { | |||||
| if (opcode != kPluginBridgeNonRtServerPong && opcode != kPluginBridgeNonRtServerParameterValue2) { | |||||
| carla_debug("CarlaPluginBridge::handleNonRtData() - got opcode: %s", PluginBridgeNonRtServerOpcode2str(opcode)); | carla_debug("CarlaPluginBridge::handleNonRtData() - got opcode: %s", PluginBridgeNonRtServerOpcode2str(opcode)); | ||||
| } | } | ||||
| #endif | #endif | ||||
| @@ -21,7 +21,7 @@ | |||||
| #include "CarlaDssiUtils.hpp" | #include "CarlaDssiUtils.hpp" | ||||
| #include "CarlaMathUtils.hpp" | #include "CarlaMathUtils.hpp" | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| # include "CarlaOscUtils.hpp" | # include "CarlaOscUtils.hpp" | ||||
| # include "CarlaPipeUtils.hpp" | # include "CarlaPipeUtils.hpp" | ||||
| # include "CarlaThread.hpp" | # include "CarlaThread.hpp" | ||||
| @@ -63,7 +63,7 @@ CARLA_BACKEND_START_NAMESPACE | |||||
| static const CustomData kCustomDataFallback = { nullptr, nullptr, nullptr }; | static const CustomData kCustomDataFallback = { nullptr, nullptr, nullptr }; | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| class CarlaThreadDSSIUI : public CarlaThread | class CarlaThreadDSSIUI : public CarlaThread | ||||
| @@ -283,7 +283,7 @@ public: | |||||
| fForcedStereoOut(false), | fForcedStereoOut(false), | ||||
| fNeedsFixedBuffers(false), | fNeedsFixedBuffers(false), | ||||
| fUsesCustomData(false) | fUsesCustomData(false) | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| , fOscData(), | , fOscData(), | ||||
| fThreadUI(engine, this, fOscData), | fThreadUI(engine, this, fOscData), | ||||
| fUiFilename(nullptr) | fUiFilename(nullptr) | ||||
| @@ -298,7 +298,7 @@ public: | |||||
| { | { | ||||
| carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); | carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // close UI | // close UI | ||||
| if (fUiFilename != nullptr) | if (fUiFilename != nullptr) | ||||
| { | { | ||||
| @@ -594,7 +594,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (sendGui && fOscData.target != nullptr) | if (sendGui && fOscData.target != nullptr) | ||||
| osc_send_configure(fOscData, key, value); | osc_send_configure(fOscData, key, value); | ||||
| #endif | #endif | ||||
| @@ -684,7 +684,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set ui stuff | // Set ui stuff | ||||
| @@ -1083,7 +1083,7 @@ public: | |||||
| if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties)) | if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties)) | ||||
| pData->hints |= PLUGIN_IS_RTSAFE; | pData->hints |= PLUGIN_IS_RTSAFE; | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| if (fUiFilename != nullptr) | if (fUiFilename != nullptr) | ||||
| pData->hints |= PLUGIN_HAS_CUSTOM_UI; | pData->hints |= PLUGIN_HAS_CUSTOM_UI; | ||||
| #endif | #endif | ||||
| @@ -2184,7 +2184,7 @@ public: | |||||
| carla_debug("CarlaPluginDSSI::clearBuffers() - end"); | carla_debug("CarlaPluginDSSI::clearBuffers() - end"); | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // OSC stuff | // OSC stuff | ||||
| @@ -2443,7 +2443,7 @@ public: | |||||
| osc_send_midi(fOscData, midiData); | osc_send_midi(fOscData, midiData); | ||||
| #endif | #endif | ||||
| } | } | ||||
| #endif // HAVE_LIBLO && !BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| #endif // HAVE_LIBLO && !BUILD_BRIDGE | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -2452,7 +2452,7 @@ public: | |||||
| return fDssiDescriptor; | return fDssiDescriptor; | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| uintptr_t getUiBridgeProcessId() const noexcept override | uintptr_t getUiBridgeProcessId() const noexcept override | ||||
| { | { | ||||
| return fThreadUI.getProcessId(); | return fThreadUI.getProcessId(); | ||||
| @@ -2652,7 +2652,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| // --------------------------------------------------------------- | // --------------------------------------------------------------- | ||||
| // check for gui | // check for gui | ||||
| @@ -2718,7 +2718,7 @@ private: | |||||
| bool fNeedsFixedBuffers; | bool fNeedsFixedBuffers; | ||||
| bool fUsesCustomData; | bool fUsesCustomData; | ||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| #if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||||
| CarlaOscData fOscData; | CarlaOscData fOscData; | ||||
| CarlaThreadDSSIUI fThreadUI; | CarlaThreadDSSIUI fThreadUI; | ||||
| const char* fUiFilename; | const char* fUiFilename; | ||||
| @@ -572,7 +572,7 @@ void CarlaPlugin::ProtectedData::PostUiEvents::clear() noexcept | |||||
| mutex.unlock(); | mutex.unlock(); | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| // ProtectedData::PostProc | // ProtectedData::PostProc | ||||
| @@ -600,7 +600,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||||
| uiLib(nullptr), | uiLib(nullptr), | ||||
| ctrlChannel(0), | ctrlChannel(0), | ||||
| extraHints(0x0), | extraHints(0x0), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| transientTryCounter(0), | transientTryCounter(0), | ||||
| transientFirstTry(true), | transientFirstTry(true), | ||||
| #endif | #endif | ||||
| @@ -623,7 +623,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||||
| latency(), | latency(), | ||||
| postRtEvents(), | postRtEvents(), | ||||
| postUiEvents() | postUiEvents() | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| , postProc() | , postProc() | ||||
| #endif | #endif | ||||
| {} | {} | ||||
| @@ -631,7 +631,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||||
| CarlaPlugin::ProtectedData::~ProtectedData() noexcept | CarlaPlugin::ProtectedData::~ProtectedData() noexcept | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT(! (active && needsReset)); | CARLA_SAFE_ASSERT(! (active && needsReset)); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| CARLA_SAFE_ASSERT(transientTryCounter == 0); | CARLA_SAFE_ASSERT(transientTryCounter == 0); | ||||
| #endif | #endif | ||||
| @@ -793,7 +793,7 @@ bool CarlaPlugin::ProtectedData::uiLibClose() noexcept | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void CarlaPlugin::ProtectedData::tryTransient() noexcept | void CarlaPlugin::ProtectedData::tryTransient() noexcept | ||||
| { | { | ||||
| if (engine->getOptions().frontendWinId != 0) | if (engine->getOptions().frontendWinId != 0) | ||||
| @@ -226,7 +226,7 @@ struct CarlaPlugin::ProtectedData { | |||||
| // misc | // misc | ||||
| int8_t ctrlChannel; | int8_t ctrlChannel; | ||||
| uint extraHints; | uint extraHints; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| uint transientTryCounter; | uint transientTryCounter; | ||||
| bool transientFirstTry; | bool transientFirstTry; | ||||
| #endif | #endif | ||||
| @@ -328,7 +328,7 @@ struct CarlaPlugin::ProtectedData { | |||||
| } postUiEvents; | } postUiEvents; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| struct PostProc { | struct PostProc { | ||||
| float dryWet; | float dryWet; | ||||
| float volume; | float volume; | ||||
| @@ -383,7 +383,7 @@ struct CarlaPlugin::ProtectedData { | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Misc | // Misc | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| void tryTransient() noexcept; | void tryTransient() noexcept; | ||||
| #endif | #endif | ||||
| void updateParameterValues(CarlaPlugin* const plugin, const bool sendOsc, const bool sendCallback, const bool useDefault) noexcept; | void updateParameterValues(CarlaPlugin* const plugin, const bool sendOsc, const bool sendCallback, const bool useDefault) noexcept; | ||||
| @@ -362,6 +362,7 @@ int main(int argc, char* argv[]) | |||||
| nonRtClientBaseName[0] = '\0'; | nonRtClientBaseName[0] = '\0'; | ||||
| nonRtServerBaseName[0] = '\0'; | nonRtServerBaseName[0] = '\0'; | ||||
| jackbridge_init(); | jackbridge_init(); | ||||
| carla_setenv("CARLA_PLUGIN_DIRECT", "1"); | |||||
| } | } | ||||
| // --------------------------------------------------------------------- | // --------------------------------------------------------------------- | ||||
| @@ -68,7 +68,7 @@ LINK_FLAGS += $(X11_LIBS) | |||||
| # ---------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------- | ||||
| NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS) $(LIBLO_FLAGS) | NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS) $(LIBLO_FLAGS) | ||||
| NATIVE_LINK_FLAGS = $(LIBLO_LIBS) | |||||
| # NATIVE_LINK_FLAGS = $(LIBLO_LIBS) | |||||
| NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | ||||
| NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS) | NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS) | ||||
| @@ -95,8 +95,9 @@ OBJS_native = \ | |||||
| $(OBJDIR)/CarlaEngine.cpp.o \ | $(OBJDIR)/CarlaEngine.cpp.o \ | ||||
| $(OBJDIR)/CarlaEngineClient.cpp.o \ | $(OBJDIR)/CarlaEngineClient.cpp.o \ | ||||
| $(OBJDIR)/CarlaEngineData.cpp.o \ | $(OBJDIR)/CarlaEngineData.cpp.o \ | ||||
| $(OBJDIR)/CarlaEngineGraph.cpp.o \ | |||||
| $(OBJDIR)/CarlaEngineInternal.cpp.o \ | $(OBJDIR)/CarlaEngineInternal.cpp.o \ | ||||
| $(OBJDIR)/CarlaEngineOsc.cpp.o \ | |||||
| $(OBJDIR)/CarlaEngineNative.cpp.o \ | |||||
| $(OBJDIR)/CarlaEngineOscSend.cpp.o \ | $(OBJDIR)/CarlaEngineOscSend.cpp.o \ | ||||
| $(OBJDIR)/CarlaEnginePorts.cpp.o \ | $(OBJDIR)/CarlaEnginePorts.cpp.o \ | ||||
| $(OBJDIR)/CarlaEngineThread.cpp.o \ | $(OBJDIR)/CarlaEngineThread.cpp.o \ | ||||
| @@ -548,8 +548,8 @@ class HostWindow(QMainWindow): | |||||
| self.ui.cb_transport_link.setVisible(False) | self.ui.cb_transport_link.setVisible(False) | ||||
| # Plugin needs to have timers always running so it receives messages | # Plugin needs to have timers always running so it receives messages | ||||
| if self.host.isPlugin: | |||||
| self.startTimers() | |||||
| #if self.host.isPlugin: | |||||
| self.startTimers() | |||||
| # Qt needs this so it properly creates & resizes the canvas | # Qt needs this so it properly creates & resizes the canvas | ||||
| self.ui.tabWidget.blockSignals(True) | self.ui.tabWidget.blockSignals(True) | ||||
| @@ -54,6 +54,7 @@ extern void carla_register_native_plugin_notes(void); | |||||
| void carla_register_all_native_plugins(void) | void carla_register_all_native_plugins(void) | ||||
| { | { | ||||
| puts("carla register all plugins\n"); | |||||
| // Simple plugins | // Simple plugins | ||||
| carla_register_native_plugin_bypass(); | carla_register_native_plugin_bypass(); | ||||
| carla_register_native_plugin_lfo(); | carla_register_native_plugin_lfo(); | ||||
| @@ -68,20 +69,18 @@ void carla_register_all_native_plugins(void) | |||||
| // Audio file | // Audio file | ||||
| carla_register_native_plugin_audiofile(); | carla_register_native_plugin_audiofile(); | ||||
| // MIDI file and sequencer | |||||
| // MIDI file | |||||
| carla_register_native_plugin_midifile(); | carla_register_native_plugin_midifile(); | ||||
| #ifdef HAVE_PYQT | |||||
| carla_register_native_plugin_midipattern(); | |||||
| #endif | |||||
| // Carla | |||||
| #ifdef HAVE_PYQT | #ifdef HAVE_PYQT | ||||
| // Carla | |||||
| carla_register_native_plugin_carla(); | carla_register_native_plugin_carla(); | ||||
| #endif | |||||
| // External-UI plugins | // External-UI plugins | ||||
| carla_register_native_plugin_bigmeter(); | carla_register_native_plugin_bigmeter(); | ||||
| carla_register_native_plugin_midipattern(); | |||||
| carla_register_native_plugin_notes(); | carla_register_native_plugin_notes(); | ||||
| #endif // HAVE_PYQT | |||||
| #ifdef HAVE_EXTERNAL_PLUGINS | #ifdef HAVE_EXTERNAL_PLUGINS | ||||
| // Experimental plugins | // Experimental plugins | ||||
| @@ -57,16 +57,14 @@ void carla_register_all_native_plugins(void) | |||||
| carla_register_native_plugin_miditranspose(); | carla_register_native_plugin_miditranspose(); | ||||
| #ifdef HAVE_PYQT | #ifdef HAVE_PYQT | ||||
| // MIDI sequencer | |||||
| carla_register_native_plugin_midipattern(); | |||||
| // Carla | // Carla | ||||
| carla_register_native_plugin_carla(); | carla_register_native_plugin_carla(); | ||||
| #endif | |||||
| // External-UI plugins | // External-UI plugins | ||||
| carla_register_native_plugin_bigmeter(); | carla_register_native_plugin_bigmeter(); | ||||
| carla_register_native_plugin_midipattern(); | |||||
| carla_register_native_plugin_notes(); | carla_register_native_plugin_notes(); | ||||
| #endif | |||||
| } | } | ||||
| // -------------------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -338,7 +338,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||||
| /* copyright */ "GNU GPL v2+", | /* copyright */ "GNU GPL v2+", | ||||
| DESCFUNCS | DESCFUNCS | ||||
| }, | }, | ||||
| #endif | |||||
| #endif // HAVE_PYQT | |||||
| // -------------------------------------------------------------------------------------------------------------------- | // -------------------------------------------------------------------------------------------------------------------- | ||||
| // External-UI plugins | // External-UI plugins | ||||
| @@ -379,7 +379,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||||
| /* copyright */ "GNU GPL v2+", | /* copyright */ "GNU GPL v2+", | ||||
| DESCFUNCS | DESCFUNCS | ||||
| }, | }, | ||||
| #endif | |||||
| #endif // HAVE_PYQT | |||||
| }; | }; | ||||
| @@ -74,6 +74,9 @@ class PluginHost(CarlaHostQtPlugin): | |||||
| self.fExternalUI.idleExternalUI() | self.fExternalUI.idleExternalUI() | ||||
| def is_engine_running(self): | def is_engine_running(self): | ||||
| if self.fExternalUI is None: | |||||
| return False | |||||
| return self.fExternalUI.isRunning() | return self.fExternalUI.isRunning() | ||||
| def set_engine_about_to_close(self): | def set_engine_about_to_close(self): | ||||
| @@ -618,6 +621,9 @@ if __name__ == '__main__': | |||||
| host.nextProcessMode = host.processMode | host.nextProcessMode = host.processMode | ||||
| loadHostSettings(host) | loadHostSettings(host) | ||||
| if os.getenv("CARLA_PLUGIN_DIRECT") == "1": | |||||
| host.isPlugin = False | |||||
| # ------------------------------------------------------------- | # ------------------------------------------------------------- | ||||
| # Create GUI | # Create GUI | ||||
| @@ -163,7 +163,7 @@ const char* InternalParameterIndex2Str(const InternalParameterIndex index) noexc | |||||
| { | { | ||||
| case PARAMETER_NULL: | case PARAMETER_NULL: | ||||
| return "PARAMETER_NULL"; | return "PARAMETER_NULL"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| case PARAMETER_ACTIVE: | case PARAMETER_ACTIVE: | ||||
| return "PARAMETER_ACTIVE"; | return "PARAMETER_ACTIVE"; | ||||
| case PARAMETER_DRYWET: | case PARAMETER_DRYWET: | ||||
| @@ -206,7 +206,7 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) noexcept | |||||
| return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED"; | return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED"; | ||||
| case ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED: | case ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED: | ||||
| return "ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED"; | return "ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| case ENGINE_CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED: | case ENGINE_CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED: | ||||
| return "ENGINE_CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED"; | return "ENGINE_CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED"; | ||||
| case ENGINE_CALLBACK_PARAMETER_MIDI_CC_CHANGED: | case ENGINE_CALLBACK_PARAMETER_MIDI_CC_CHANGED: | ||||
| @@ -234,7 +234,7 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) noexcept | |||||
| return "ENGINE_CALLBACK_RELOAD_PROGRAMS"; | return "ENGINE_CALLBACK_RELOAD_PROGRAMS"; | ||||
| case ENGINE_CALLBACK_RELOAD_ALL: | case ENGINE_CALLBACK_RELOAD_ALL: | ||||
| return "ENGINE_CALLBACK_RELOAD_ALL"; | return "ENGINE_CALLBACK_RELOAD_ALL"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED: | case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED"; | return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED: | case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED: | ||||
| @@ -325,7 +325,7 @@ const char* EngineOption2Str(const EngineOption option) noexcept | |||||
| return "ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR"; | return "ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR"; | ||||
| case ENGINE_OPTION_FRONTEND_WIN_ID: | case ENGINE_OPTION_FRONTEND_WIN_ID: | ||||
| return "ENGINE_OPTION_FRONTEND_WIN_ID"; | return "ENGINE_OPTION_FRONTEND_WIN_ID"; | ||||
| #ifndef CARLA_OS_WIN | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| case ENGINE_OPTION_WINE_EXECUTABLE: | case ENGINE_OPTION_WINE_EXECUTABLE: | ||||
| return "ENGINE_OPTION_WINE_EXECUTABLE"; | return "ENGINE_OPTION_WINE_EXECUTABLE"; | ||||
| case ENGINE_OPTION_WINE_AUTO_PREFIX: | case ENGINE_OPTION_WINE_AUTO_PREFIX: | ||||
| @@ -363,7 +363,9 @@ private: | |||||
| #ifdef CARLA_OS_MAC | #ifdef CARLA_OS_MAC | ||||
| #ifdef BUILD_BRIDGE | |||||
| #if defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||||
| # define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindowBridgedArch, CARLA_PLUGIN_UI_CLASS_PREFIX) | |||||
| #elif defined(BUILD_BRIDGE) | |||||
| # define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindowBridged, CARLA_PLUGIN_UI_CLASS_PREFIX) | # define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindowBridged, CARLA_PLUGIN_UI_CLASS_PREFIX) | ||||
| #else | #else | ||||
| # define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindow, CARLA_PLUGIN_UI_CLASS_PREFIX) | # define CarlaPluginWindow CARLA_JOIN_MACRO(CarlaPluginWindow, CARLA_PLUGIN_UI_CLASS_PREFIX) | ||||
| @@ -853,7 +855,7 @@ LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) | |||||
| // ----------------------------------------------------- | // ----------------------------------------------------- | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) | bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); | CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); | ||||
| @@ -1141,7 +1143,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons | |||||
| return true; | return true; | ||||
| (void)pid; (void)centerUI; | (void)pid; (void)centerUI; | ||||
| } | } | ||||
| #endif // BUILD_BRIDGE | |||||
| #endif // BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ----------------------------------------------------- | // ----------------------------------------------------- | ||||
| @@ -46,7 +46,7 @@ public: | |||||
| virtual void* getDisplay() const noexcept = 0; | virtual void* getDisplay() const noexcept = 0; | ||||
| #endif | #endif | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); | static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); | ||||
| #endif | #endif | ||||
| @@ -122,7 +122,7 @@ CarlaStateSave::Parameter::Parameter() noexcept | |||||
| index(-1), | index(-1), | ||||
| name(nullptr), | name(nullptr), | ||||
| symbol(nullptr), | symbol(nullptr), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| value(0.0f), | value(0.0f), | ||||
| midiChannel(0), | midiChannel(0), | ||||
| midiCC(-1) {} | midiCC(-1) {} | ||||
| @@ -189,7 +189,7 @@ CarlaStateSave::CarlaStateSave() noexcept | |||||
| binary(nullptr), | binary(nullptr), | ||||
| uniqueId(0), | uniqueId(0), | ||||
| options(0x0), | options(0x0), | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| active(false), | active(false), | ||||
| dryWet(1.0f), | dryWet(1.0f), | ||||
| volume(1.0f), | volume(1.0f), | ||||
| @@ -247,7 +247,7 @@ void CarlaStateSave::clear() noexcept | |||||
| uniqueId = 0; | uniqueId = 0; | ||||
| options = 0x0; | options = 0x0; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| active = false; | active = false; | ||||
| dryWet = 1.0f; | dryWet = 1.0f; | ||||
| volume = 1.0f; | volume = 1.0f; | ||||
| @@ -323,7 +323,7 @@ bool CarlaStateSave::fillFromXmlElement(const XmlElement* const xmlElement) | |||||
| const String& tag(xmlData->getTagName()); | const String& tag(xmlData->getTagName()); | ||||
| const String text(xmlData->getAllSubText().trim()); | const String text(xmlData->getAllSubText().trim()); | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| // ------------------------------------------------------- | // ------------------------------------------------------- | ||||
| // Internal Data | // Internal Data | ||||
| @@ -431,7 +431,7 @@ bool CarlaStateSave::fillFromXmlElement(const XmlElement* const xmlElement) | |||||
| stateParameter->dummy = false; | stateParameter->dummy = false; | ||||
| stateParameter->value = pText.getFloatValue(); | stateParameter->value = pText.getFloatValue(); | ||||
| } | } | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| else if (pTag == "MidiChannel") | else if (pTag == "MidiChannel") | ||||
| { | { | ||||
| const int channel(pText.getIntValue()); | const int channel(pText.getIntValue()); | ||||
| @@ -545,7 +545,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||||
| content << " <Data>\n"; | content << " <Data>\n"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| { | { | ||||
| MemoryOutputStream dataXml; | MemoryOutputStream dataXml; | ||||
| @@ -588,7 +588,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||||
| if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | ||||
| parameterXml << " <Symbol>" << xmlSafeString(stateParameter->symbol, true) << "</Symbol>\n"; | parameterXml << " <Symbol>" << xmlSafeString(stateParameter->symbol, true) << "</Symbol>\n"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| if (stateParameter->midiCC > 0) | if (stateParameter->midiCC > 0) | ||||
| { | { | ||||
| parameterXml << " <MidiCC>" << stateParameter->midiCC << "</MidiCC>\n"; | parameterXml << " <MidiCC>" << stateParameter->midiCC << "</MidiCC>\n"; | ||||
| @@ -34,7 +34,7 @@ struct CarlaStateSave { | |||||
| const char* name; | const char* name; | ||||
| const char* symbol; | const char* symbol; | ||||
| float value; | float value; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| uint8_t midiChannel; | uint8_t midiChannel; | ||||
| int16_t midiCC; | int16_t midiCC; | ||||
| #endif | #endif | ||||
| @@ -70,7 +70,7 @@ struct CarlaStateSave { | |||||
| int64_t uniqueId; | int64_t uniqueId; | ||||
| uint options; | uint options; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||||
| bool active; | bool active; | ||||
| float dryWet; | float dryWet; | ||||
| float volume; | float volume; | ||||