@@ -607,7 +607,7 @@ typedef enum { | |||
*/ | |||
PARAMETER_NULL = -1, | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* Active parameter, boolean type. | |||
* Default is 'false'. | |||
@@ -716,7 +716,7 @@ typedef enum { | |||
*/ | |||
ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED = 6, | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* A parameter's MIDI CC has changed. | |||
* @a pluginId Plugin Id | |||
@@ -814,7 +814,7 @@ typedef enum { | |||
*/ | |||
ENGINE_CALLBACK_RELOAD_ALL = 19, | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* A patchbay client has been added. | |||
* @a pluginId Client Id | |||
@@ -821,7 +821,7 @@ public: | |||
*/ | |||
bool removeAllPlugins(); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* Rename plugin with id @a id to @a newName. | |||
* Returns the new name, or null if the operation failed. | |||
@@ -965,7 +965,7 @@ public: | |||
*/ | |||
void setFileCallback(const FileCallbackFunc func, void* const ptr) noexcept; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ------------------------------------------------------------------- | |||
// Patchbay | |||
@@ -1052,7 +1052,6 @@ public: | |||
* Check if OSC controller is registered. | |||
*/ | |||
bool isOscControlRegistered() const noexcept; | |||
#endif | |||
/*! | |||
* Idle OSC. | |||
@@ -1068,6 +1067,7 @@ public: | |||
* Get OSC UDP server path. | |||
*/ | |||
const char* getOscServerPathUDP() const noexcept; | |||
#endif | |||
// ------------------------------------------------------------------- | |||
// Helper functions | |||
@@ -1078,7 +1078,7 @@ public: | |||
*/ | |||
EngineEvent* getInternalEventBuffer(const bool isInput) const noexcept; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* Virtual functions for handling external graph ports. | |||
*/ | |||
@@ -1142,7 +1142,7 @@ protected: | |||
*/ | |||
bool loadProjectInternal(water::XmlDocument& xmlDoc); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ------------------------------------------------------------------- | |||
// Patchbay stuff | |||
@@ -463,7 +463,7 @@ public: | |||
*/ | |||
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. | |||
* @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); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
/*! | |||
* 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). | |||
@@ -98,39 +98,73 @@ typedef void (*void_func)(void); | |||
class ThreadSafeFFTW | |||
{ | |||
public: | |||
struct Deinitializer { | |||
Deinitializer(ThreadSafeFFTW& s) | |||
: tsfftw(s) {} | |||
~Deinitializer() | |||
{ | |||
tsfftw.deinit(); | |||
} | |||
ThreadSafeFFTW& tsfftw; | |||
}; | |||
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")) | |||
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")) | |||
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")) | |||
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")) | |||
func(); | |||
} | |||
~ThreadSafeFFTW() | |||
void deinit() | |||
{ | |||
if (libfftw3 != nullptr) | |||
{ | |||
lib_close(libfftw3); | |||
libfftw3 = nullptr; | |||
} | |||
if (libfftw3f != nullptr) | |||
{ | |||
lib_close(libfftw3f); | |||
libfftw3f = nullptr; | |||
} | |||
if (libfftw3l != nullptr) | |||
{ | |||
lib_close(libfftw3l); | |||
libfftw3l = nullptr; | |||
} | |||
if (libfftw3q != nullptr) | |||
{ | |||
lib_close(libfftw3q); | |||
libfftw3q = nullptr; | |||
} | |||
} | |||
private: | |||
@@ -139,6 +173,8 @@ private: | |||
lib_t libfftw3l; | |||
lib_t libfftw3q; | |||
}; | |||
static ThreadSafeFFTW sThreadSafeFFTW; | |||
#endif | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
@@ -350,7 +386,7 @@ bool carla_engine_init(const char* driverName, const char* clientName) | |||
carla_setenv("WINEASIO_CLIENT_NAME", clientName); | |||
#endif | |||
#ifdef CARLA_OS_UNIX | |||
static const ThreadSafeFFTW tsfftw; | |||
sThreadSafeFFTW.init(); | |||
#endif | |||
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); | |||
#ifdef CARLA_OS_UNIX | |||
const ThreadSafeFFTW::Deinitializer tsfftwde(sThreadSafeFFTW); | |||
#endif | |||
ScopedPointer<CarlaEngine> engine(gStandalone.engine); | |||
gStandalone.engine = nullptr; | |||
@@ -1856,7 +1896,7 @@ const char* 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) | |||
{ | |||
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()"); | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
if (gStandalone.engine == nullptr) | |||
{ | |||
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(); | |||
#endif | |||
} | |||
@@ -303,7 +303,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
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"); | |||
#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->nextPluginId <= pData->maxPluginNumber, "Invalid engine internal data"); | |||
#endif | |||
@@ -315,7 +315,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
uint id; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CarlaPlugin* oldPlugin = nullptr; | |||
if (pData->nextPluginId < pData->curPluginCount) | |||
@@ -338,7 +338,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
return false; | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN_ERR(pData->plugins[id].plugin == nullptr, "Invalid engine internal data"); | |||
#endif | |||
} | |||
@@ -486,7 +486,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
plugin->reload(); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
bool canRun = true; | |||
/**/ if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK) | |||
@@ -517,7 +517,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
return false; | |||
} | |||
# ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
plugin->registerToOscClient(); | |||
# endif | |||
#endif | |||
@@ -529,7 +529,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
pluginData.outsPeak[0] = 0.0f; | |||
pluginData.outsPeak[1] = 0.0f; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (oldPlugin != nullptr) | |||
{ | |||
CARLA_SAFE_ASSERT(! pData->loadingProject); | |||
@@ -565,7 +565,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, | |||
++pData->curPluginCount; | |||
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) | |||
pData->graph.addPlugin(plugin); | |||
#endif | |||
@@ -582,7 +582,7 @@ bool CarlaEngine::addPlugin(const PluginType ptype, const char* const filename, | |||
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"); | |||
#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->curPluginCount != 0, "Invalid engine internal data"); | |||
#endif | |||
@@ -597,7 +597,7 @@ bool CarlaEngine::removePlugin(const uint id) | |||
const ScopedThreadStopper sts(this); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
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()) | |||
oscSend_control_remove_plugin(id); | |||
# endif | |||
@@ -630,7 +630,7 @@ bool CarlaEngine::removePlugin(const uint id) | |||
bool CarlaEngine::removeAllPlugins() | |||
{ | |||
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->nextPluginId == pData->maxPluginNumber, "Invalid engine internal data"); | |||
#endif | |||
@@ -644,11 +644,11 @@ bool CarlaEngine::removeAllPlugins() | |||
const uint curPluginCount(pData->curPluginCount); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
pData->graph.removeAllPlugins(); | |||
# ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
if (isOscControlRegistered()) | |||
{ | |||
for (uint i=0; i < curPluginCount; ++i) | |||
@@ -682,7 +682,7 @@ bool CarlaEngine::removeAllPlugins() | |||
return true; | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
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"); | |||
@@ -810,7 +810,7 @@ bool CarlaEngine::switchPlugins(const uint idA, const uint idB) 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->curPluginCount != 0, "Invalid engine internal data"); | |||
#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 | |||
{ | |||
#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); | |||
#endif | |||
#ifdef BUILD_BRIDGE | |||
#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->isIdling) | |||
#else | |||
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; | |||
case ENGINE_OPTION_PREFER_PLUGIN_BRIDGES: | |||
#ifdef BUILD_BRIDGE | |||
#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN(value == 0,); | |||
#else | |||
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 | |||
# ifndef BUILD_BRIDGE | |||
bool CarlaEngine::isOscControlRegistered() const noexcept | |||
{ | |||
return pData->osc.isControlRegistered(); | |||
} | |||
# endif | |||
void CarlaEngine::idleOsc() const noexcept | |||
{ | |||
@@ -1605,7 +1603,7 @@ void CarlaEngine::bufferSizeChanged(const uint32_t newBufferSize) | |||
{ | |||
carla_debug("CarlaEngine::bufferSizeChanged(%i)", newBufferSize); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
{ | |||
@@ -1630,7 +1628,7 @@ void CarlaEngine::sampleRateChanged(const double newSampleRate) | |||
{ | |||
carla_debug("CarlaEngine::sampleRateChanged(%g)", newSampleRate); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->options.processMode == ENGINE_PROCESS_MODE_CONTINUOUS_RACK || | |||
pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
{ | |||
@@ -1655,7 +1653,7 @@ void CarlaEngine::offlineModeChanged(const bool 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 || | |||
pData->options.processMode == ENGINE_PROCESS_MODE_PATCHBAY) | |||
{ | |||
@@ -1691,7 +1689,7 @@ void CarlaEngine::saveProjectInternal(water::MemoryOutputStream& outStream) cons | |||
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 | |||
if (plugin->getHints() & PLUGIN_IS_BRIDGE) | |||
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 | |||
for (uint i=0; i < pData->curPluginCount; ++i) | |||
{ | |||
@@ -1935,7 +1933,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||
return false; | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
const ScopedValueSetter<bool> _svs(pData->loadingProject, true, false); | |||
#endif | |||
@@ -2206,7 +2204,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||
if (addPlugin(getBinaryTypeFromFile(stateSave.binary), ptype, stateSave.binary, | |||
stateSave.name, stateSave.label, stateSave.uniqueId, extraStuff, stateSave.options)) | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
const uint pluginId = pData->curPluginCount; | |||
#else | |||
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, | |||
* as we want to load state first. | |||
*/ | |||
#ifdef BUILD_BRIDGE | |||
#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
plugin->setActive(true, true, false); | |||
#else | |||
++pData->curPluginCount; | |||
@@ -2238,7 +2236,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||
plugin->setEnabled(true); | |||
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) | |||
pData->graph.addPlugin(plugin); | |||
#endif | |||
@@ -2258,7 +2256,7 @@ bool CarlaEngine::loadProjectInternal(water::XmlDocument& xmlDoc) | |||
return true; | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// tell bridges we're done loading | |||
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" | |||
// ----------------------------------------------------------------------- |
@@ -418,7 +418,7 @@ void EngineNextAction::clearAndReset() noexcept | |||
CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | |||
: thread(engine), | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
osc(engine), | |||
oscData(nullptr), | |||
#endif | |||
@@ -426,7 +426,7 @@ CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | |||
callbackPtr(nullptr), | |||
fileCallback(nullptr), | |||
fileCallbackPtr(nullptr), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
loadingProject(false), | |||
#endif | |||
hints(0x0), | |||
@@ -442,17 +442,17 @@ CarlaEngine::ProtectedData::ProtectedData(CarlaEngine* const engine) noexcept | |||
name(), | |||
options(), | |||
timeInfo(), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
plugins(nullptr), | |||
#endif | |||
events(), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
graph(engine), | |||
#endif | |||
time(timeInfo, options.transportMode), | |||
nextAction() | |||
{ | |||
#ifdef BUILD_BRIDGE | |||
#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
carla_zeroStructs(plugins, 1); | |||
#endif | |||
} | |||
@@ -463,7 +463,7 @@ CarlaEngine::ProtectedData::~ProtectedData() noexcept | |||
CARLA_SAFE_ASSERT(maxPluginNumber == 0); | |||
CARLA_SAFE_ASSERT(nextPluginId == 0); | |||
CARLA_SAFE_ASSERT(isIdling == 0); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT(plugins == nullptr); | |||
#endif | |||
} | |||
@@ -473,13 +473,13 @@ CarlaEngine::ProtectedData::~ProtectedData() noexcept | |||
bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||
{ | |||
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)"); | |||
#endif | |||
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(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)"); | |||
#endif | |||
@@ -525,14 +525,12 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||
timeInfo.clear(); | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
osc.init(clientName); | |||
# ifndef BUILD_BRIDGE | |||
oscData = osc.getControlData(); | |||
# endif | |||
#endif | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
plugins = new EnginePluginData[maxPluginNumber]; | |||
carla_zeroStructs(plugins, maxPluginNumber); | |||
#endif | |||
@@ -546,7 +544,7 @@ bool CarlaEngine::ProtectedData::init(const char* const clientName) | |||
void CarlaEngine::ProtectedData::close() | |||
{ | |||
CARLA_SAFE_ASSERT(name.isNotEmpty()); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT(plugins != nullptr); | |||
CARLA_SAFE_ASSERT(nextPluginId == maxPluginNumber); | |||
#endif | |||
@@ -556,7 +554,7 @@ void CarlaEngine::ProtectedData::close() | |||
thread.stopThread(500); | |||
nextAction.clearAndReset(); | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
osc.close(); | |||
oscData = nullptr; | |||
#endif | |||
@@ -566,7 +564,7 @@ void CarlaEngine::ProtectedData::close() | |||
maxPluginNumber = 0; | |||
nextPluginId = 0; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (plugins != nullptr) | |||
{ | |||
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 | |||
{ | |||
CARLA_SAFE_ASSERT_RETURN(curPluginCount > 0,); | |||
@@ -656,7 +654,7 @@ void CarlaEngine::ProtectedData::doNextPluginAction() noexcept | |||
const EnginePostAction opcode = nextAction.opcode; | |||
const bool needsPost = nextAction.needsPost; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
const uint pluginId = nextAction.pluginId; | |||
const uint value = nextAction.value; | |||
#endif | |||
@@ -675,7 +673,7 @@ void CarlaEngine::ProtectedData::doNextPluginAction() noexcept | |||
case kEnginePostActionZeroCount: | |||
curPluginCount = 0; | |||
break; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
case kEnginePostActionRemovePlugin: | |||
doPluginRemove(pluginId); | |||
break; | |||
@@ -21,7 +21,7 @@ | |||
#include "CarlaEngineThread.hpp" | |||
#include "CarlaEngineUtils.hpp" | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
#ifndef BUILD_BRIDGE | |||
# include "CarlaEngineOsc.hpp" | |||
# include "hylia/hylia.h" | |||
#endif | |||
@@ -57,7 +57,7 @@ struct EngineInternalEvents { | |||
CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalEvents) | |||
}; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ----------------------------------------------------------------------- | |||
// InternalGraph | |||
@@ -111,7 +111,7 @@ private: | |||
CARLA_PREVENT_HEAP_ALLOCATION | |||
CARLA_DECLARE_NON_COPY_STRUCT(EngineInternalGraph) | |||
}; | |||
#endif | |||
#endif // BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ----------------------------------------------------------------------- | |||
// InternalTime | |||
@@ -170,7 +170,7 @@ private: | |||
enum EnginePostAction { | |||
kEnginePostActionNull = 0, | |||
kEnginePostActionZeroCount, // set curPluginCount to 0 | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
kEnginePostActionRemovePlugin, // remove a plugin | |||
kEnginePostActionSwitchPlugins // switch between 2 plugins | |||
#endif | |||
@@ -209,13 +209,9 @@ struct EnginePluginData { | |||
struct CarlaEngine::ProtectedData { | |||
CarlaEngineThread thread; | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
CarlaEngineOsc osc; | |||
# ifdef BUILD_BRIDGE | |||
CarlaOscData* oscData; | |||
# else | |||
const CarlaOscData* oscData; | |||
# endif | |||
#endif | |||
EngineCallbackFunc callback; | |||
@@ -224,7 +220,7 @@ struct CarlaEngine::ProtectedData { | |||
FileCallbackFunc fileCallback; | |||
void* fileCallbackPtr; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
bool loadingProject; | |||
#endif | |||
@@ -244,14 +240,14 @@ struct CarlaEngine::ProtectedData { | |||
EngineOptions options; | |||
EngineTimeInfo timeInfo; | |||
#ifdef BUILD_BRIDGE | |||
#ifdef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
EnginePluginData plugins[1]; | |||
#else | |||
EnginePluginData* plugins; | |||
#endif | |||
EngineInternalEvents events; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
EngineInternalGraph graph; | |||
#endif | |||
EngineInternalTime time; | |||
@@ -17,8 +17,8 @@ | |||
#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 | |||
#include "CarlaEngineInternal.hpp" | |||
@@ -1165,7 +1165,7 @@ protected: | |||
const CarlaMutexLocker cml(fUiServer.getPipeLock()); | |||
#ifdef HAVE_LIBLO | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
if (! fUiServer.writeAndFixMessage("osc-urls")) | |||
return; | |||
if (! fUiServer.writeAndFixMessage(pData->osc.getServerPathTCP())) | |||
@@ -46,7 +46,7 @@ void CarlaEngineThread::run() noexcept | |||
#endif | |||
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); | |||
#endif | |||
float value; | |||
@@ -63,7 +63,7 @@ void CarlaEngineThread::run() noexcept | |||
const bool oscRegisted = false; | |||
#endif | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
if (isPlugin) | |||
kEngine->idleOsc(); | |||
#endif | |||
@@ -356,7 +356,7 @@ void CarlaPlugin::getParameterScalePointLabel(const uint32_t parameterId, const | |||
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); | |||
switch (parameterId) | |||
@@ -498,14 +498,14 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||
pData->stateSave.name = carla_strdup(pData->name); | |||
pData->stateSave.label = carla_strdup(strBuf); | |||
pData->stateSave.uniqueId = getUniqueId(); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
pData->stateSave.options = pData->options; | |||
#endif | |||
if (pData->filename != nullptr) | |||
pData->stateSave.binary = carla_strdup(pData->filename); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// --------------------------------------------------------------- | |||
// Internals | |||
@@ -578,7 +578,7 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave) | |||
stateParameter->dummy = dummy; | |||
stateParameter->index = paramData.index; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
stateParameter->midiCC = paramData.midiCC; | |||
stateParameter->midiChannel = paramData.midiChannel; | |||
#endif | |||
@@ -794,7 +794,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||
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); | |||
setParameterMidiChannel(static_cast<uint32_t>(index), stateParameter->midiChannel, true, true); | |||
#endif | |||
@@ -867,7 +867,7 @@ void CarlaPlugin::loadStateSave(const CarlaStateSave& stateSave) | |||
#endif | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// --------------------------------------------------------------- | |||
// Part 6 - set internal stuff | |||
@@ -1270,7 +1270,7 @@ void CarlaPlugin::setOption(const uint option, const bool yesNo, const bool send | |||
else | |||
pData->options &= ~option; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (sendCallback) | |||
pData->engine->callback(ENGINE_CALLBACK_OPTION_CHANGED, pData->id, static_cast<int>(option), yesNo ? 1 : 0, 0.0f, nullptr); | |||
#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 | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | |||
#endif | |||
@@ -1313,10 +1313,10 @@ void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool se | |||
pData->active = active; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
const float value(active ? 1.0f : 0.0f); | |||
# ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_ACTIVE, value); | |||
# endif | |||
@@ -1329,7 +1329,7 @@ void CarlaPlugin::setActive(const bool active, const bool sendOsc, const bool se | |||
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 | |||
{ | |||
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; | |||
#ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_DRYWET, fixedValue); | |||
#endif | |||
# endif | |||
if (sendCallback) | |||
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; | |||
#ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_VOLUME, fixedValue); | |||
#endif | |||
# endif | |||
if (sendCallback) | |||
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; | |||
#ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_LEFT, fixedValue); | |||
#endif | |||
# endif | |||
if (sendCallback) | |||
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; | |||
#ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_BALANCE_RIGHT, fixedValue); | |||
#endif | |||
# endif | |||
if (sendCallback) | |||
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; | |||
#ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_PANNING, fixedValue); | |||
#endif | |||
# endif | |||
if (sendCallback) | |||
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; | |||
} | |||
#endif // ! BUILD_BRIDGE | |||
#endif // ! BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
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 | |||
#endif | |||
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; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
const float channelf(channel); | |||
# ifdef HAVE_LIBLO | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_value(pData->id, PARAMETER_CTRL_CHANNEL, channelf); | |||
# 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 | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN(rindex > PARAMETER_MAX && rindex != PARAMETER_NULL,); | |||
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 | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | |||
#endif | |||
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; | |||
#ifndef BUILD_BRIDGE | |||
# ifdef HAVE_LIBLO | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_midi_channel(pData->id, parameterId, channel); | |||
# 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 | |||
{ | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT_RETURN(sendOsc || sendCallback,); // never call this from RT | |||
#endif | |||
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; | |||
#ifndef BUILD_BRIDGE | |||
# ifdef HAVE_LIBLO | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
# if defined(HAVE_LIBLO) && ! defined(BUILD_BRIDGE) | |||
if (sendOsc && pData->engine->isOscControlRegistered()) | |||
pData->engine->oscSend_control_set_parameter_midi_cc(pData->id, parameterId, cc); | |||
# endif | |||
@@ -2278,7 +2278,7 @@ void CarlaPlugin::sendMidiSingleNote(const uint8_t channel, const uint8_t note, | |||
return; (void)sendOsc; | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
void CarlaPlugin::sendMidiAllNotesOffToCallback() | |||
{ | |||
if (pData->ctrlChannel < 0 || pData->ctrlChannel >= MAX_MIDI_CHANNELS) | |||
@@ -2357,7 +2357,7 @@ void CarlaPlugin::uiIdle() | |||
pData->postUiEvents.data.clear(); | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (pData->transientTryCounter == 0) | |||
return; | |||
if (++pData->transientTryCounter % 10 != 0) | |||
@@ -2555,7 +2555,7 @@ CarlaPlugin::ScopedSingleProcessLocker::~ScopedSingleProcessLocker() noexcept | |||
if (! fBlock) | |||
return; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (fPlugin->pData->singleMutex.wasTryLockCalled()) | |||
fPlugin->pData->needsReset = true; | |||
#endif | |||
@@ -1761,7 +1761,7 @@ public: | |||
{ | |||
const PluginBridgeNonRtServerOpcode opcode(fShmNonRtServerControl.readOpcode()); | |||
#ifdef DEBUG | |||
if (opcode != kPluginBridgeNonRtServerPong) { | |||
if (opcode != kPluginBridgeNonRtServerPong && opcode != kPluginBridgeNonRtServerParameterValue2) { | |||
carla_debug("CarlaPluginBridge::handleNonRtData() - got opcode: %s", PluginBridgeNonRtServerOpcode2str(opcode)); | |||
} | |||
#endif | |||
@@ -21,7 +21,7 @@ | |||
#include "CarlaDssiUtils.hpp" | |||
#include "CarlaMathUtils.hpp" | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
# include "CarlaOscUtils.hpp" | |||
# include "CarlaPipeUtils.hpp" | |||
# include "CarlaThread.hpp" | |||
@@ -63,7 +63,7 @@ CARLA_BACKEND_START_NAMESPACE | |||
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 | |||
@@ -283,7 +283,7 @@ public: | |||
fForcedStereoOut(false), | |||
fNeedsFixedBuffers(false), | |||
fUsesCustomData(false) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
, fOscData(), | |||
fThreadUI(engine, this, fOscData), | |||
fUiFilename(nullptr) | |||
@@ -298,7 +298,7 @@ public: | |||
{ | |||
carla_debug("CarlaPluginDSSI::~CarlaPluginDSSI()"); | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
// close UI | |||
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) | |||
osc_send_configure(fOscData, key, value); | |||
#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 | |||
@@ -1083,7 +1083,7 @@ public: | |||
if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties)) | |||
pData->hints |= PLUGIN_IS_RTSAFE; | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
if (fUiFilename != nullptr) | |||
pData->hints |= PLUGIN_HAS_CUSTOM_UI; | |||
#endif | |||
@@ -2184,7 +2184,7 @@ public: | |||
carla_debug("CarlaPluginDSSI::clearBuffers() - end"); | |||
} | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
// ------------------------------------------------------------------- | |||
// OSC stuff | |||
@@ -2443,7 +2443,7 @@ public: | |||
osc_send_midi(fOscData, midiData); | |||
#endif | |||
} | |||
#endif // HAVE_LIBLO && !BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
#endif // HAVE_LIBLO && !BUILD_BRIDGE | |||
// ------------------------------------------------------------------- | |||
@@ -2452,7 +2452,7 @@ public: | |||
return fDssiDescriptor; | |||
} | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
uintptr_t getUiBridgeProcessId() const noexcept override | |||
{ | |||
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 | |||
@@ -2718,7 +2718,7 @@ private: | |||
bool fNeedsFixedBuffers; | |||
bool fUsesCustomData; | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE_ALTERNATIVE_ARCH) | |||
#if defined(HAVE_LIBLO) && !defined(BUILD_BRIDGE) | |||
CarlaOscData fOscData; | |||
CarlaThreadDSSIUI fThreadUI; | |||
const char* fUiFilename; | |||
@@ -572,7 +572,7 @@ void CarlaPlugin::ProtectedData::PostUiEvents::clear() noexcept | |||
mutex.unlock(); | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ----------------------------------------------------------------------- | |||
// ProtectedData::PostProc | |||
@@ -600,7 +600,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||
uiLib(nullptr), | |||
ctrlChannel(0), | |||
extraHints(0x0), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
transientTryCounter(0), | |||
transientFirstTry(true), | |||
#endif | |||
@@ -623,7 +623,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||
latency(), | |||
postRtEvents(), | |||
postUiEvents() | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
, postProc() | |||
#endif | |||
{} | |||
@@ -631,7 +631,7 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx | |||
CarlaPlugin::ProtectedData::~ProtectedData() noexcept | |||
{ | |||
CARLA_SAFE_ASSERT(! (active && needsReset)); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
CARLA_SAFE_ASSERT(transientTryCounter == 0); | |||
#endif | |||
@@ -793,7 +793,7 @@ bool CarlaPlugin::ProtectedData::uiLibClose() noexcept | |||
// ----------------------------------------------------------------------- | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
void CarlaPlugin::ProtectedData::tryTransient() noexcept | |||
{ | |||
if (engine->getOptions().frontendWinId != 0) | |||
@@ -226,7 +226,7 @@ struct CarlaPlugin::ProtectedData { | |||
// misc | |||
int8_t ctrlChannel; | |||
uint extraHints; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
uint transientTryCounter; | |||
bool transientFirstTry; | |||
#endif | |||
@@ -328,7 +328,7 @@ struct CarlaPlugin::ProtectedData { | |||
} postUiEvents; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
struct PostProc { | |||
float dryWet; | |||
float volume; | |||
@@ -383,7 +383,7 @@ struct CarlaPlugin::ProtectedData { | |||
// ------------------------------------------------------------------- | |||
// Misc | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
void tryTransient() noexcept; | |||
#endif | |||
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'; | |||
nonRtServerBaseName[0] = '\0'; | |||
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_LINK_FLAGS = $(LIBLO_LIBS) | |||
# NATIVE_LINK_FLAGS = $(LIBLO_LIBS) | |||
NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS) | |||
NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS) | |||
@@ -95,8 +95,9 @@ OBJS_native = \ | |||
$(OBJDIR)/CarlaEngine.cpp.o \ | |||
$(OBJDIR)/CarlaEngineClient.cpp.o \ | |||
$(OBJDIR)/CarlaEngineData.cpp.o \ | |||
$(OBJDIR)/CarlaEngineGraph.cpp.o \ | |||
$(OBJDIR)/CarlaEngineInternal.cpp.o \ | |||
$(OBJDIR)/CarlaEngineOsc.cpp.o \ | |||
$(OBJDIR)/CarlaEngineNative.cpp.o \ | |||
$(OBJDIR)/CarlaEngineOscSend.cpp.o \ | |||
$(OBJDIR)/CarlaEnginePorts.cpp.o \ | |||
$(OBJDIR)/CarlaEngineThread.cpp.o \ | |||
@@ -548,8 +548,8 @@ class HostWindow(QMainWindow): | |||
self.ui.cb_transport_link.setVisible(False) | |||
# 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 | |||
self.ui.tabWidget.blockSignals(True) | |||
@@ -54,6 +54,7 @@ extern void carla_register_native_plugin_notes(void); | |||
void carla_register_all_native_plugins(void) | |||
{ | |||
puts("carla register all plugins\n"); | |||
// Simple plugins | |||
carla_register_native_plugin_bypass(); | |||
carla_register_native_plugin_lfo(); | |||
@@ -68,20 +69,18 @@ void carla_register_all_native_plugins(void) | |||
// Audio file | |||
carla_register_native_plugin_audiofile(); | |||
// MIDI file and sequencer | |||
// MIDI file | |||
carla_register_native_plugin_midifile(); | |||
#ifdef HAVE_PYQT | |||
carla_register_native_plugin_midipattern(); | |||
#endif | |||
// Carla | |||
#ifdef HAVE_PYQT | |||
// Carla | |||
carla_register_native_plugin_carla(); | |||
#endif | |||
// External-UI plugins | |||
carla_register_native_plugin_bigmeter(); | |||
carla_register_native_plugin_midipattern(); | |||
carla_register_native_plugin_notes(); | |||
#endif // HAVE_PYQT | |||
#ifdef HAVE_EXTERNAL_PLUGINS | |||
// Experimental plugins | |||
@@ -57,16 +57,14 @@ void carla_register_all_native_plugins(void) | |||
carla_register_native_plugin_miditranspose(); | |||
#ifdef HAVE_PYQT | |||
// MIDI sequencer | |||
carla_register_native_plugin_midipattern(); | |||
// Carla | |||
carla_register_native_plugin_carla(); | |||
#endif | |||
// External-UI plugins | |||
carla_register_native_plugin_bigmeter(); | |||
carla_register_native_plugin_midipattern(); | |||
carla_register_native_plugin_notes(); | |||
#endif | |||
} | |||
// -------------------------------------------------------------------------------------------------------------------- |
@@ -338,7 +338,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
/* copyright */ "GNU GPL v2+", | |||
DESCFUNCS | |||
}, | |||
#endif | |||
#endif // HAVE_PYQT | |||
// -------------------------------------------------------------------------------------------------------------------- | |||
// External-UI plugins | |||
@@ -379,7 +379,7 @@ static const NativePluginDescriptor sNativePluginDescriptors[] = { | |||
/* copyright */ "GNU GPL v2+", | |||
DESCFUNCS | |||
}, | |||
#endif | |||
#endif // HAVE_PYQT | |||
}; | |||
@@ -74,6 +74,9 @@ class PluginHost(CarlaHostQtPlugin): | |||
self.fExternalUI.idleExternalUI() | |||
def is_engine_running(self): | |||
if self.fExternalUI is None: | |||
return False | |||
return self.fExternalUI.isRunning() | |||
def set_engine_about_to_close(self): | |||
@@ -618,6 +621,9 @@ if __name__ == '__main__': | |||
host.nextProcessMode = host.processMode | |||
loadHostSettings(host) | |||
if os.getenv("CARLA_PLUGIN_DIRECT") == "1": | |||
host.isPlugin = False | |||
# ------------------------------------------------------------- | |||
# Create GUI | |||
@@ -163,7 +163,7 @@ const char* InternalParameterIndex2Str(const InternalParameterIndex index) noexc | |||
{ | |||
case PARAMETER_NULL: | |||
return "PARAMETER_NULL"; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
case PARAMETER_ACTIVE: | |||
return "PARAMETER_ACTIVE"; | |||
case PARAMETER_DRYWET: | |||
@@ -206,7 +206,7 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) noexcept | |||
return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED"; | |||
case 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: | |||
return "ENGINE_CALLBACK_PARAMETER_MIDI_CHANNEL_CHANGED"; | |||
case ENGINE_CALLBACK_PARAMETER_MIDI_CC_CHANGED: | |||
@@ -234,7 +234,7 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) noexcept | |||
return "ENGINE_CALLBACK_RELOAD_PROGRAMS"; | |||
case ENGINE_CALLBACK_RELOAD_ALL: | |||
return "ENGINE_CALLBACK_RELOAD_ALL"; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED: | |||
return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED"; | |||
case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED: | |||
@@ -325,7 +325,7 @@ const char* EngineOption2Str(const EngineOption option) noexcept | |||
return "ENGINE_OPTION_PREVENT_BAD_BEHAVIOUR"; | |||
case 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: | |||
return "ENGINE_OPTION_WINE_EXECUTABLE"; | |||
case ENGINE_OPTION_WINE_AUTO_PREFIX: | |||
@@ -363,7 +363,9 @@ private: | |||
#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) | |||
#else | |||
# 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) | |||
{ | |||
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; | |||
(void)pid; (void)centerUI; | |||
} | |||
#endif // BUILD_BRIDGE | |||
#endif // BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ----------------------------------------------------- | |||
@@ -46,7 +46,7 @@ public: | |||
virtual void* getDisplay() const noexcept = 0; | |||
#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); | |||
#endif | |||
@@ -122,7 +122,7 @@ CarlaStateSave::Parameter::Parameter() noexcept | |||
index(-1), | |||
name(nullptr), | |||
symbol(nullptr), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
value(0.0f), | |||
midiChannel(0), | |||
midiCC(-1) {} | |||
@@ -189,7 +189,7 @@ CarlaStateSave::CarlaStateSave() noexcept | |||
binary(nullptr), | |||
uniqueId(0), | |||
options(0x0), | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
active(false), | |||
dryWet(1.0f), | |||
volume(1.0f), | |||
@@ -247,7 +247,7 @@ void CarlaStateSave::clear() noexcept | |||
uniqueId = 0; | |||
options = 0x0; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
active = false; | |||
dryWet = 1.0f; | |||
volume = 1.0f; | |||
@@ -323,7 +323,7 @@ bool CarlaStateSave::fillFromXmlElement(const XmlElement* const xmlElement) | |||
const String& tag(xmlData->getTagName()); | |||
const String text(xmlData->getAllSubText().trim()); | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
// ------------------------------------------------------- | |||
// Internal Data | |||
@@ -431,7 +431,7 @@ bool CarlaStateSave::fillFromXmlElement(const XmlElement* const xmlElement) | |||
stateParameter->dummy = false; | |||
stateParameter->value = pText.getFloatValue(); | |||
} | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
else if (pTag == "MidiChannel") | |||
{ | |||
const int channel(pText.getIntValue()); | |||
@@ -545,7 +545,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||
content << " <Data>\n"; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
{ | |||
MemoryOutputStream dataXml; | |||
@@ -588,7 +588,7 @@ void CarlaStateSave::dumpToMemoryStream(MemoryOutputStream& content) const | |||
if (stateParameter->symbol != nullptr && stateParameter->symbol[0] != '\0') | |||
parameterXml << " <Symbol>" << xmlSafeString(stateParameter->symbol, true) << "</Symbol>\n"; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
if (stateParameter->midiCC > 0) | |||
{ | |||
parameterXml << " <MidiCC>" << stateParameter->midiCC << "</MidiCC>\n"; | |||
@@ -34,7 +34,7 @@ struct CarlaStateSave { | |||
const char* name; | |||
const char* symbol; | |||
float value; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
uint8_t midiChannel; | |||
int16_t midiCC; | |||
#endif | |||
@@ -70,7 +70,7 @@ struct CarlaStateSave { | |||
int64_t uniqueId; | |||
uint options; | |||
#ifndef BUILD_BRIDGE | |||
#ifndef BUILD_BRIDGE_ALTERNATIVE_ARCH | |||
bool active; | |||
float dryWet; | |||
float volume; | |||