| @@ -18,7 +18,7 @@ | |||||
| #ifndef __CARLA_BRIDGE_HPP__ | #ifndef __CARLA_BRIDGE_HPP__ | ||||
| #define __CARLA_BRIDGE_HPP__ | #define __CARLA_BRIDGE_HPP__ | ||||
| #include "carla_defines.hpp" | |||||
| #include "CarlaDefines.hpp" | |||||
| #define CARLA_BRIDGE_START_NAMESPACE namespace CarlaBridge { | #define CARLA_BRIDGE_START_NAMESPACE namespace CarlaBridge { | ||||
| #define CARLA_BRIDGE_END_NAMESPACE } | #define CARLA_BRIDGE_END_NAMESPACE } | ||||
| @@ -19,7 +19,7 @@ | |||||
| #include "carla_bridge_toolkit.hpp" | #include "carla_bridge_toolkit.hpp" | ||||
| #ifdef BUILD_BRIDGE_UI | #ifdef BUILD_BRIDGE_UI | ||||
| # include "carla_lib_utils.hpp" | |||||
| # include "CarlaLibUtils.hpp" | |||||
| #endif | #endif | ||||
| #include <cstdlib> | #include <cstdlib> | ||||
| @@ -33,7 +33,7 @@ CarlaBridgeClient::CarlaBridgeClient(const char* const uiTitle) | |||||
| : m_osc(this), | : m_osc(this), | ||||
| m_toolkit(CarlaBridgeToolkit::createNew(this, uiTitle)) | m_toolkit(CarlaBridgeToolkit::createNew(this, uiTitle)) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::CarlaBridgeClient(\"%s\")", uiTitle); | |||||
| carla_debug("CarlaBridgeClient::CarlaBridgeClient(\"%s\")", uiTitle); | |||||
| m_oscData = nullptr; | m_oscData = nullptr; | ||||
| @@ -46,7 +46,7 @@ CarlaBridgeClient::CarlaBridgeClient(const char* const uiTitle) | |||||
| CarlaBridgeClient::~CarlaBridgeClient() | CarlaBridgeClient::~CarlaBridgeClient() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::~CarlaBridgeClient()"); | |||||
| carla_debug("CarlaBridgeClient::~CarlaBridgeClient()"); | |||||
| #ifdef BUILD_BRIDGE_UI | #ifdef BUILD_BRIDGE_UI | ||||
| if (m_uiFilename) | if (m_uiFilename) | ||||
| @@ -62,7 +62,7 @@ CarlaBridgeClient::~CarlaBridgeClient() | |||||
| bool CarlaBridgeClient::init(const char* const, const char* const) | bool CarlaBridgeClient::init(const char* const, const char* const) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::init()"); | |||||
| carla_debug("CarlaBridgeClient::init()"); | |||||
| // Test for single init | // Test for single init | ||||
| { | { | ||||
| @@ -80,7 +80,7 @@ bool CarlaBridgeClient::init(const char* const, const char* const) | |||||
| void CarlaBridgeClient::close() | void CarlaBridgeClient::close() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::close()"); | |||||
| carla_debug("CarlaBridgeClient::close()"); | |||||
| if (! m_uiQuit) | if (! m_uiQuit) | ||||
| { | { | ||||
| @@ -99,7 +99,7 @@ void CarlaBridgeClient::close() | |||||
| bool CarlaBridgeClient::oscInit(const char* const url) | bool CarlaBridgeClient::oscInit(const char* const url) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::oscInit(\"%s\")", url); | |||||
| carla_debug("CarlaBridgeClient::oscInit(\"%s\")", url); | |||||
| const bool ret = m_osc.init(url); | const bool ret = m_osc.init(url); | ||||
| m_oscData = m_osc.getControlData(); | m_oscData = m_osc.getControlData(); | ||||
| @@ -120,7 +120,7 @@ bool CarlaBridgeClient::oscIdle() | |||||
| void CarlaBridgeClient::oscClose() | void CarlaBridgeClient::oscClose() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::oscClose()"); | |||||
| carla_debug("CarlaBridgeClient::oscClose()"); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| m_osc.close(); | m_osc.close(); | ||||
| @@ -134,7 +134,7 @@ bool CarlaBridgeClient::isOscControlRegistered() const | |||||
| void CarlaBridgeClient::sendOscUpdate() | void CarlaBridgeClient::sendOscUpdate() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscUpdate()"); | |||||
| carla_debug("CarlaBridgeClient::sendOscUpdate()"); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -144,7 +144,7 @@ void CarlaBridgeClient::sendOscUpdate() | |||||
| #ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
| void CarlaBridgeClient::sendOscBridgeUpdate() | void CarlaBridgeClient::sendOscBridgeUpdate() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscBridgeUpdate()"); | |||||
| carla_debug("CarlaBridgeClient::sendOscBridgeUpdate()"); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| CARLA_ASSERT(m_oscData->target && m_oscData->path); | CARLA_ASSERT(m_oscData->target && m_oscData->path); | ||||
| @@ -154,7 +154,7 @@ void CarlaBridgeClient::sendOscBridgeUpdate() | |||||
| void CarlaBridgeClient::sendOscBridgeError(const char* const error) | void CarlaBridgeClient::sendOscBridgeError(const char* const error) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscBridgeError(\"%s\")", error); | |||||
| carla_debug("CarlaBridgeClient::sendOscBridgeError(\"%s\")", error); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| CARLA_ASSERT(error); | CARLA_ASSERT(error); | ||||
| @@ -168,35 +168,35 @@ void CarlaBridgeClient::sendOscBridgeError(const char* const error) | |||||
| void CarlaBridgeClient::toolkitShow() | void CarlaBridgeClient::toolkitShow() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::toolkitShow()"); | |||||
| carla_debug("CarlaBridgeClient::toolkitShow()"); | |||||
| m_toolkit->show(); | m_toolkit->show(); | ||||
| } | } | ||||
| void CarlaBridgeClient::toolkitHide() | void CarlaBridgeClient::toolkitHide() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::toolkitHide()"); | |||||
| carla_debug("CarlaBridgeClient::toolkitHide()"); | |||||
| m_toolkit->hide(); | m_toolkit->hide(); | ||||
| } | } | ||||
| void CarlaBridgeClient::toolkitResize(const int width, const int height) | void CarlaBridgeClient::toolkitResize(const int width, const int height) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::toolkitResize(%i, %i)", width, height); | |||||
| carla_debug("CarlaBridgeClient::toolkitResize(%i, %i)", width, height); | |||||
| m_toolkit->resize(width, height); | m_toolkit->resize(width, height); | ||||
| } | } | ||||
| void CarlaBridgeClient::toolkitExec(const bool showGui) | void CarlaBridgeClient::toolkitExec(const bool showGui) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::toolkitExec(%s)", bool2str(showGui)); | |||||
| carla_debug("CarlaBridgeClient::toolkitExec(%s)", bool2str(showGui)); | |||||
| m_toolkit->exec(showGui); | m_toolkit->exec(showGui); | ||||
| } | } | ||||
| void CarlaBridgeClient::toolkitQuit() | void CarlaBridgeClient::toolkitQuit() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::toolkitQuit()"); | |||||
| carla_debug("CarlaBridgeClient::toolkitQuit()"); | |||||
| #ifdef BUILD_BRIDGE_UI | #ifdef BUILD_BRIDGE_UI | ||||
| m_uiQuit = true; | m_uiQuit = true; | ||||
| @@ -208,7 +208,7 @@ void CarlaBridgeClient::toolkitQuit() | |||||
| void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* const value) | void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* const value) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscConfigure(\"%s\", \"%s\")", key, value); | |||||
| carla_debug("CarlaBridgeClient::sendOscConfigure(\"%s\", \"%s\")", key, value); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -217,7 +217,7 @@ void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* cons | |||||
| void CarlaBridgeClient::sendOscControl(const int32_t index, const float value) | void CarlaBridgeClient::sendOscControl(const int32_t index, const float value) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscControl(%i, %f)", index, value); | |||||
| carla_debug("CarlaBridgeClient::sendOscControl(%i, %f)", index, value); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -226,7 +226,7 @@ void CarlaBridgeClient::sendOscControl(const int32_t index, const float value) | |||||
| void CarlaBridgeClient::sendOscProgram(const int32_t index) | void CarlaBridgeClient::sendOscProgram(const int32_t index) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscProgram(%i)", index); | |||||
| carla_debug("CarlaBridgeClient::sendOscProgram(%i)", index); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -235,7 +235,7 @@ void CarlaBridgeClient::sendOscProgram(const int32_t index) | |||||
| void CarlaBridgeClient::sendOscMidiProgram(const int32_t index) | void CarlaBridgeClient::sendOscMidiProgram(const int32_t index) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscMidiProgram(%i)", index); | |||||
| carla_debug("CarlaBridgeClient::sendOscMidiProgram(%i)", index); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -244,7 +244,7 @@ void CarlaBridgeClient::sendOscMidiProgram(const int32_t index) | |||||
| void CarlaBridgeClient::sendOscMidi(const uint8_t midiBuf[4]) | void CarlaBridgeClient::sendOscMidi(const uint8_t midiBuf[4]) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscMidi(%p)", midiBuf); | |||||
| carla_debug("CarlaBridgeClient::sendOscMidi(%p)", midiBuf); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -253,7 +253,7 @@ void CarlaBridgeClient::sendOscMidi(const uint8_t midiBuf[4]) | |||||
| void CarlaBridgeClient::sendOscExiting() | void CarlaBridgeClient::sendOscExiting() | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscExiting()"); | |||||
| carla_debug("CarlaBridgeClient::sendOscExiting()"); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -263,7 +263,7 @@ void CarlaBridgeClient::sendOscExiting() | |||||
| #ifdef BRIDGE_LV2 | #ifdef BRIDGE_LV2 | ||||
| void CarlaBridgeClient::sendOscLv2TransferAtom(const int32_t portIndex, const char* const typeStr, const char* const atomBuf) | void CarlaBridgeClient::sendOscLv2TransferAtom(const int32_t portIndex, const char* const typeStr, const char* const atomBuf) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscLv2TransferAtom(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||||
| carla_debug("CarlaBridgeClient::sendOscLv2TransferAtom(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -272,7 +272,7 @@ void CarlaBridgeClient::sendOscLv2TransferAtom(const int32_t portIndex, const ch | |||||
| void CarlaBridgeClient::sendOscLv2TransferEvent(const int32_t portIndex, const char* const typeStr, const char* const atomBuf) | void CarlaBridgeClient::sendOscLv2TransferEvent(const int32_t portIndex, const char* const typeStr, const char* const atomBuf) | ||||
| { | { | ||||
| qDebug("CarlaBridgeClient::sendOscLv2TransferEvent(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||||
| carla_debug("CarlaBridgeClient::sendOscLv2TransferEvent(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||||
| CARLA_ASSERT(m_oscData); | CARLA_ASSERT(m_oscData); | ||||
| if (m_oscData && m_oscData->target) | if (m_oscData && m_oscData->target) | ||||
| @@ -17,8 +17,8 @@ | |||||
| #include "carla_bridge_osc.hpp" | #include "carla_bridge_osc.hpp" | ||||
| #include "carla_bridge_client.hpp" | #include "carla_bridge_client.hpp" | ||||
| #include "carla_midi.h" | |||||
| #include "carla_utils.hpp" | |||||
| #include "CarlaMIDI.h" | |||||
| #include "CarlaUtils.hpp" | |||||
| #include <QtCore/QString> | #include <QtCore/QString> | ||||
| #include <QtCore/QStringList> | #include <QtCore/QStringList> | ||||
| @@ -30,7 +30,7 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
| CarlaBridgeOsc::CarlaBridgeOsc(CarlaBridgeClient* const client_) | CarlaBridgeOsc::CarlaBridgeOsc(CarlaBridgeClient* const client_) | ||||
| : client(client_) | : client(client_) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::CarlaBridgeOsc(%p)", client); | |||||
| carla_debug("CarlaBridgeOsc::CarlaBridgeOsc(%p)", client); | |||||
| CARLA_ASSERT(client); | CARLA_ASSERT(client); | ||||
| m_name = nullptr; | m_name = nullptr; | ||||
| @@ -42,7 +42,7 @@ CarlaBridgeOsc::CarlaBridgeOsc(CarlaBridgeClient* const client_) | |||||
| CarlaBridgeOsc::~CarlaBridgeOsc() | CarlaBridgeOsc::~CarlaBridgeOsc() | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::~CarlaBridgeOsc()"); | |||||
| carla_debug("CarlaBridgeOsc::~CarlaBridgeOsc()"); | |||||
| CARLA_ASSERT(! m_name); | CARLA_ASSERT(! m_name); | ||||
| CARLA_ASSERT(! m_server); | CARLA_ASSERT(! m_server); | ||||
| CARLA_ASSERT(! m_serverPath); | CARLA_ASSERT(! m_serverPath); | ||||
| @@ -50,7 +50,7 @@ CarlaBridgeOsc::~CarlaBridgeOsc() | |||||
| bool CarlaBridgeOsc::init(const char* const url) | bool CarlaBridgeOsc::init(const char* const url) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::init(\"%s\")", url); | |||||
| carla_debug("CarlaBridgeOsc::init(\"%s\")", url); | |||||
| CARLA_ASSERT(! m_name); | CARLA_ASSERT(! m_name); | ||||
| CARLA_ASSERT(! m_server); | CARLA_ASSERT(! m_server); | ||||
| CARLA_ASSERT(! m_serverPath); | CARLA_ASSERT(! m_serverPath); | ||||
| @@ -59,7 +59,7 @@ bool CarlaBridgeOsc::init(const char* const url) | |||||
| if (! url) | if (! url) | ||||
| { | { | ||||
| qWarning("CarlaBridgeOsc::init(\"%s\") - invalid url", url); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - invalid url", url); | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -76,14 +76,14 @@ bool CarlaBridgeOsc::init(const char* const url) | |||||
| if (! host) | if (! host) | ||||
| { | { | ||||
| qCritical("CarlaBridgeOsc::init(\"%s\") - failed to get url hostname", url); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - failed to get url hostname", url); | |||||
| return false; | return false; | ||||
| } | } | ||||
| if (! path) | if (! path) | ||||
| { | { | ||||
| std::free(host); | std::free(host); | ||||
| qCritical("CarlaBridgeOsc::init(\"%s\") - failed to get url path", url); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - failed to get url path", url); | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -91,7 +91,7 @@ bool CarlaBridgeOsc::init(const char* const url) | |||||
| { | { | ||||
| std::free(host); | std::free(host); | ||||
| std::free(path); | std::free(path); | ||||
| qCritical("CarlaBridgeOsc::init(\"%s\") - failed to get url port", url); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - failed to get url port", url); | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -104,7 +104,7 @@ bool CarlaBridgeOsc::init(const char* const url) | |||||
| if (! m_controlData.target) | if (! m_controlData.target) | ||||
| { | { | ||||
| qCritical("CarlaBridgeOsc::init(\"%s\") - failed to get new url address for host '%s' and port '%s'", url, host, port); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - failed to get new url address for host '%s' and port '%s'", url, host, port); | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -112,7 +112,7 @@ bool CarlaBridgeOsc::init(const char* const url) | |||||
| if (! m_server) | if (! m_server) | ||||
| { | { | ||||
| qCritical("CarlaBridgeOsc::init(\"%s\") - failed to create new OSC server", url); | |||||
| carla_stderr("CarlaBridgeOsc::init(\"%s\") - failed to create new OSC server", url); | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -141,7 +141,7 @@ void CarlaBridgeOsc::idle() | |||||
| void CarlaBridgeOsc::close() | void CarlaBridgeOsc::close() | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::close()"); | |||||
| carla_debug("CarlaBridgeOsc::close()"); | |||||
| CARLA_ASSERT(m_name); | CARLA_ASSERT(m_name); | ||||
| CARLA_ASSERT(m_server); | CARLA_ASSERT(m_server); | ||||
| CARLA_ASSERT(m_serverPath); | CARLA_ASSERT(m_serverPath); | ||||
| @@ -174,7 +174,7 @@ void CarlaBridgeOsc::close() | |||||
| int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMessage(\"%s\", %i, %p, \"%s\", %p)", path, argc, argv, types, msg); | |||||
| carla_debug("CarlaBridgeOsc::handleMessage(\"%s\", %i, %p, \"%s\", %p)", path, argc, argv, types, msg); | |||||
| CARLA_ASSERT(m_name); | CARLA_ASSERT(m_name); | ||||
| CARLA_ASSERT(m_server); | CARLA_ASSERT(m_server); | ||||
| CARLA_ASSERT(m_serverPath); | CARLA_ASSERT(m_serverPath); | ||||
| @@ -182,19 +182,19 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (! path) | if (! path) | ||||
| { | { | ||||
| qCritical("CarlaBridgeOsc::handleMessage() - got invalid path"); | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage() - got invalid path"); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| if (! (m_name && m_server && m_serverPath)) | if (! (m_name && m_server && m_serverPath)) | ||||
| { | { | ||||
| qCritical("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received message but client is offline", path); | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received message but client is offline", path); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| if (strlen(path) <= m_nameSize || strncmp(path+1, m_name, m_nameSize) != 0) | if (strlen(path) <= m_nameSize || strncmp(path+1, m_name, m_nameSize) != 0) | ||||
| { | { | ||||
| qWarning("CarlaBridgeOsc::handleMessage() - message not for this client: '%s' != '/%s/'", path, m_name); | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage() - message not for this client: '%s' != '/%s/'", path, m_name); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -203,7 +203,7 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (method[0] == '\0') | if (method[0] == '\0') | ||||
| { | { | ||||
| qWarning("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received message without method", path); | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received message without method", path); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -253,13 +253,13 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const | |||||
| return osc_set_parameter_midi_channel_handler(argv); | return osc_set_parameter_midi_channel_handler(argv); | ||||
| #endif | #endif | ||||
| qWarning("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received unsupported OSC method '%s'", path, method); | |||||
| carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received unsupported OSC method '%s'", path, method); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgConfigure()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgConfigure()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ss"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ss"); | ||||
| if (! client) | if (! client) | ||||
| @@ -274,7 +274,7 @@ int CarlaBridgeOsc::handleMsgConfigure(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgControl()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgControl()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "if"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "if"); | ||||
| if (! client) | if (! client) | ||||
| @@ -290,7 +290,7 @@ int CarlaBridgeOsc::handleMsgControl(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgProgram()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgProgram()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| if (! client) | if (! client) | ||||
| @@ -306,7 +306,7 @@ int CarlaBridgeOsc::handleMsgProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| #ifdef BUILD_BRIDGE_PLUGIN | #ifdef BUILD_BRIDGE_PLUGIN | ||||
| int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgMidiProgram()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgMidiProgram()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| if (! client) | if (! client) | ||||
| @@ -321,7 +321,7 @@ int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| #else | #else | ||||
| int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgMidiProgram()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgMidiProgram()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ii"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(2, "ii"); | ||||
| if (! client) | if (! client) | ||||
| @@ -338,7 +338,7 @@ int CarlaBridgeOsc::handleMsgMidiProgram(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgMidi()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgMidi()"); | |||||
| CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "m"); | CARLA_BRIDGE_OSC_CHECK_OSC_TYPES(1, "m"); | ||||
| if (! client) | if (! client) | ||||
| @@ -373,7 +373,7 @@ int CarlaBridgeOsc::handleMsgMidi(CARLA_BRIDGE_OSC_HANDLE_ARGS) | |||||
| int CarlaBridgeOsc::handleMsgShow() | int CarlaBridgeOsc::handleMsgShow() | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgShow()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgShow()"); | |||||
| if (! client) | if (! client) | ||||
| return 1; | return 1; | ||||
| @@ -385,7 +385,7 @@ int CarlaBridgeOsc::handleMsgShow() | |||||
| int CarlaBridgeOsc::handleMsgHide() | int CarlaBridgeOsc::handleMsgHide() | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgHide()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgHide()"); | |||||
| if (! client) | if (! client) | ||||
| return 1; | return 1; | ||||
| @@ -397,7 +397,7 @@ int CarlaBridgeOsc::handleMsgHide() | |||||
| int CarlaBridgeOsc::handleMsgQuit() | int CarlaBridgeOsc::handleMsgQuit() | ||||
| { | { | ||||
| qDebug("CarlaBridgeOsc::handleMsgQuit()"); | |||||
| carla_debug("CarlaBridgeOsc::handleMsgQuit()"); | |||||
| if (! client) | if (! client) | ||||
| return 1; | return 1; | ||||
| @@ -19,7 +19,7 @@ | |||||
| #define __CARLA_BRIDGE_OSC_HPP__ | #define __CARLA_BRIDGE_OSC_HPP__ | ||||
| #include "carla_bridge.hpp" | #include "carla_bridge.hpp" | ||||
| #include "carla_osc_utils.hpp" | |||||
| #include "CarlaOscUtils.hpp" | |||||
| #define CARLA_BRIDGE_OSC_HANDLE_ARGS const int argc, const lo_arg* const* const argv, const char* const types | #define CARLA_BRIDGE_OSC_HANDLE_ARGS const int argc, const lo_arg* const* const argv, const char* const types | ||||
| @@ -27,7 +27,7 @@ | |||||
| /* check argument count */ \ | /* check argument count */ \ | ||||
| if (argc != argcToCompare) \ | if (argc != argcToCompare) \ | ||||
| { \ | { \ | ||||
| qCritical("CarlaBridgeOsc::%s() - argument count mismatch: %i != %i", __FUNCTION__, argc, argcToCompare); \ | |||||
| carla_stderr("CarlaBridgeOsc::%s() - argument count mismatch: %i != %i", __FUNCTION__, argc, argcToCompare); \ | |||||
| return 1; \ | return 1; \ | ||||
| } \ | } \ | ||||
| if (argc > 0) \ | if (argc > 0) \ | ||||
| @@ -35,13 +35,13 @@ | |||||
| /* check for nullness */ \ | /* check for nullness */ \ | ||||
| if (! (types && typesToCompare)) \ | if (! (types && typesToCompare)) \ | ||||
| { \ | { \ | ||||
| qCritical("CarlaBridgeOsc::%s() - argument types are null", __FUNCTION__); \ | |||||
| carla_stderr("CarlaBridgeOsc::%s() - argument types are null", __FUNCTION__); \ | |||||
| return 1; \ | return 1; \ | ||||
| } \ | } \ | ||||
| /* check argument types */ \ | /* check argument types */ \ | ||||
| if (strcmp(types, typesToCompare) != 0) \ | if (strcmp(types, typesToCompare) != 0) \ | ||||
| { \ | { \ | ||||
| qCritical("CarlaBridgeOsc::%s() - argument types mismatch: '%s' != '%s'", __FUNCTION__, types, typesToCompare); \ | |||||
| carla_stderr("CarlaBridgeOsc::%s() - argument types mismatch: '%s' != '%s'", __FUNCTION__, types, typesToCompare); \ | |||||
| return 1; \ | return 1; \ | ||||
| } \ | } \ | ||||
| } | } | ||||
| @@ -120,15 +120,12 @@ private: | |||||
| static void osc_error_handler(const int num, const char* const msg, const char* const path) | static void osc_error_handler(const int num, const char* const msg, const char* const path) | ||||
| { | { | ||||
| qWarning("CarlaBridgeOsc::osc_error_handler(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| carla_stderr("CarlaBridgeOsc::osc_error_handler(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| } | } | ||||
| static int osc_message_handler(const char* const path, const char* const types, lo_arg** const argv, const int argc, const lo_message msg, void* const user_data) | static int osc_message_handler(const char* const path, const char* const types, lo_arg** const argv, const int argc, const lo_message msg, void* const user_data) | ||||
| { | { | ||||
| CARLA_ASSERT(user_data); | |||||
| if (CarlaBridgeOsc* const _this_ = (CarlaBridgeOsc*)user_data) | |||||
| return _this_->handleMessage(path, argc, argv, types, msg); | |||||
| return 1; | |||||
| return ((CarlaBridgeOsc*)user_data)->handleMessage(path, argc, argv, types, msg); | |||||
| } | } | ||||
| }; | }; | ||||
| @@ -16,7 +16,7 @@ | |||||
| */ | */ | ||||
| #include "carla_bridge_toolkit.hpp" | #include "carla_bridge_toolkit.hpp" | ||||
| #include "carla_utils.hpp" | |||||
| #include "CarlaUtils.hpp" | |||||
| #include <cstdlib> | #include <cstdlib> | ||||
| #include <cstring> | #include <cstring> | ||||
| @@ -26,7 +26,7 @@ CARLA_BRIDGE_START_NAMESPACE | |||||
| CarlaBridgeToolkit::CarlaBridgeToolkit(CarlaBridgeClient* const client_, const char* const newTitle) | CarlaBridgeToolkit::CarlaBridgeToolkit(CarlaBridgeClient* const client_, const char* const newTitle) | ||||
| : client(client_) | : client(client_) | ||||
| { | { | ||||
| qDebug("CarlaBridgeToolkit::CarlaBridgeToolkit(%p, \"%s\")", client, newTitle); | |||||
| carla_debug("CarlaBridgeToolkit::CarlaBridgeToolkit(%p, \"%s\")", client, newTitle); | |||||
| CARLA_ASSERT(client); | CARLA_ASSERT(client); | ||||
| CARLA_ASSERT(newTitle); | CARLA_ASSERT(newTitle); | ||||
| @@ -35,14 +35,14 @@ CarlaBridgeToolkit::CarlaBridgeToolkit(CarlaBridgeClient* const client_, const c | |||||
| CarlaBridgeToolkit::~CarlaBridgeToolkit() | CarlaBridgeToolkit::~CarlaBridgeToolkit() | ||||
| { | { | ||||
| qDebug("CarlaBridgeToolkit::~CarlaBridgeToolkit()"); | |||||
| carla_debug("CarlaBridgeToolkit::~CarlaBridgeToolkit()"); | |||||
| free(uiTitle); | free(uiTitle); | ||||
| } | } | ||||
| void* CarlaBridgeToolkit::getContainerId() | void* CarlaBridgeToolkit::getContainerId() | ||||
| { | { | ||||
| qDebug("CarlaBridgeToolkit::getContainerId()"); | |||||
| carla_debug("CarlaBridgeToolkit::getContainerId()"); | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| @@ -18,8 +18,8 @@ | |||||
| #ifdef BRIDGE_LV2 | #ifdef BRIDGE_LV2 | ||||
| #include "carla_bridge_client.hpp" | #include "carla_bridge_client.hpp" | ||||
| #include "carla_lv2_utils.hpp" | |||||
| #include "carla_midi.h" | |||||
| #include "CarlaLv2Utils.hpp" | |||||
| #include "CarlaMIDI.h" | |||||
| extern "C" { | extern "C" { | ||||
| #include "rtmempool/rtmempool-lv2.h" | #include "rtmempool/rtmempool-lv2.h" | ||||
| @@ -19,8 +19,8 @@ | |||||
| #include "carla_bridge_client.hpp" | #include "carla_bridge_client.hpp" | ||||
| #include "carla_bridge_toolkit.hpp" | #include "carla_bridge_toolkit.hpp" | ||||
| #include "carla_vst_utils.hpp" | |||||
| #include "carla_midi.h" | |||||
| #include "CarlaVstUtils.hpp" | |||||
| #include "CarlaMIDI.h" | |||||
| #include <QtCore/QObject> | #include <QtCore/QObject> | ||||
| #include <QtCore/QTimerEvent> | #include <QtCore/QTimerEvent> | ||||
| @@ -18,6 +18,7 @@ | |||||
| #include "CarlaBackend.hpp" | #include "CarlaBackend.hpp" | ||||
| #include "CarlaJuceUtils.hpp" | #include "CarlaJuceUtils.hpp" | ||||
| #include "CarlaLibUtils.hpp" | #include "CarlaLibUtils.hpp" | ||||
| #include "CarlaString.hpp" | |||||
| #include "CarlaMIDI.h" | #include "CarlaMIDI.h" | ||||
| #ifdef WANT_LADSPA | #ifdef WANT_LADSPA | ||||
| @@ -311,14 +312,14 @@ public: | |||||
| ~LinuxSamplerScopedEngine() | ~LinuxSamplerScopedEngine() | ||||
| { | { | ||||
| if (engine != nullptr) | if (engine != nullptr) | ||||
| EngineFactory::Destroy(engine); | |||||
| LinuxSampler::EngineFactory::Destroy(engine); | |||||
| } | } | ||||
| static void outputInfo(InstrumentManager::instrument_info_t* const info, const int programs, const char* const basename = nullptr) | |||||
| static void outputInfo(LinuxSampler::InstrumentManager::instrument_info_t* const info, const int programs, const char* const basename = nullptr) | |||||
| { | { | ||||
| DISCOVERY_OUT("init", "-----------"); | DISCOVERY_OUT("init", "-----------"); | ||||
| if (info) | |||||
| if (info != nullptr) | |||||
| { | { | ||||
| DISCOVERY_OUT("name", info->InstrumentName); | DISCOVERY_OUT("name", info->InstrumentName); | ||||
| DISCOVERY_OUT("label", info->Product); | DISCOVERY_OUT("label", info->Product); | ||||
| @@ -345,8 +346,8 @@ public: | |||||
| } | } | ||||
| private: | private: | ||||
| Engine* engine; | |||||
| InstrumentManager* ins; | |||||
| LinuxSampler::Engine* engine; | |||||
| LinuxSampler::InstrumentManager* ins; | |||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LinuxSamplerScopedEngine) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(LinuxSamplerScopedEngine) | ||||
| }; | }; | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef __CARLA_LV2_UTILS_HPP__ | #ifndef __CARLA_LV2_UTILS_HPP__ | ||||
| #define __CARLA_LV2_UTILS_HPP__ | #define __CARLA_LV2_UTILS_HPP__ | ||||
| #include "CarlaUtils.hpp" | |||||
| #include "CarlaJuceUtils.hpp" | |||||
| #include "lv2/lv2.h" | #include "lv2/lv2.h" | ||||
| #include "lv2/atom.h" | #include "lv2/atom.h" | ||||