@@ -60,10 +60,10 @@ CarlaBridgeClient::~CarlaBridgeClient() | |||
#endif | |||
} | |||
#ifdef BUILD_BRIDGE_UI | |||
// --------------------------------------------------------------------- | |||
// ui initialization | |||
#ifdef BUILD_BRIDGE_UI | |||
bool CarlaBridgeClient::init(const char* const, const char* const) | |||
{ | |||
qDebug("CarlaBridgeClient::init()"); | |||
@@ -131,7 +131,7 @@ void CarlaBridgeClient::sendOscUpdate() | |||
qDebug("CarlaBridgeClient::sendOscUpdate()"); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_update(m_oscData, m_osc.getServerPath()); | |||
} | |||
@@ -142,7 +142,7 @@ void CarlaBridgeClient::sendOscBridgeError(const char* const error) | |||
CARLA_ASSERT(m_oscData); | |||
CARLA_ASSERT(error); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_bridge_error(m_oscData, error); | |||
} | |||
@@ -201,7 +201,7 @@ void CarlaBridgeClient::sendOscConfigure(const char* const key, const char* cons | |||
qDebug("CarlaBridgeClient::sendOscConfigure(\"%s\", \"%s\")", key, value); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_configure(m_oscData, key, value); | |||
} | |||
@@ -210,7 +210,7 @@ void CarlaBridgeClient::sendOscControl(const int32_t index, const float value) | |||
qDebug("CarlaBridgeClient::sendOscControl(%i, %f)", index, value); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_control(m_oscData, index, value); | |||
} | |||
@@ -219,7 +219,7 @@ void CarlaBridgeClient::sendOscProgram(const int32_t index) | |||
qDebug("CarlaBridgeClient::sendOscProgram(%i)", index); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_program(m_oscData, index); | |||
} | |||
@@ -228,7 +228,7 @@ void CarlaBridgeClient::sendOscMidiProgram(const int32_t index) | |||
qDebug("CarlaBridgeClient::sendOscMidiProgram(%i)", index); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_midi_program(m_oscData, index); | |||
} | |||
@@ -237,7 +237,7 @@ void CarlaBridgeClient::sendOscMidi(const uint8_t midiBuf[4]) | |||
qDebug("CarlaBridgeClient::sendOscMidi(%p)", midiBuf); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_midi(m_oscData, midiBuf); | |||
} | |||
@@ -246,7 +246,7 @@ void CarlaBridgeClient::sendOscExiting() | |||
qDebug("CarlaBridgeClient::sendOscExiting()"); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_exiting(m_oscData); | |||
} | |||
@@ -257,7 +257,7 @@ void CarlaBridgeClient::sendOscBridgeUpdate() | |||
CARLA_ASSERT(m_oscData); | |||
CARLA_ASSERT(m_oscData->target && m_osc.m_serverPath); | |||
if (m_oscData->target && m_osc.m_serverPath) | |||
if (m_oscData && m_oscData->target && m_osc.m_serverPath) | |||
osc_send_bridge_update(m_oscData, m_osc.m_serverPath); | |||
} | |||
#endif | |||
@@ -268,7 +268,7 @@ void CarlaBridgeClient::sendOscLv2TransferAtom(const int32_t portIndex, const ch | |||
qDebug("CarlaBridgeClient::sendOscLv2TransferAtom(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_lv2_transfer_atom(m_oscData, portIndex, typeStr, atomBuf); | |||
} | |||
@@ -277,7 +277,7 @@ void CarlaBridgeClient::sendOscLv2TransferEvent(const int32_t portIndex, const c | |||
qDebug("CarlaBridgeClient::sendOscLv2TransferEvent(%i, \"%s\", \"%s\")", portIndex, typeStr, atomBuf); | |||
CARLA_ASSERT(m_oscData); | |||
if (m_oscData->target) | |||
if (m_oscData && m_oscData->target) | |||
osc_send_lv2_transfer_event(m_oscData, portIndex, typeStr, atomBuf); | |||
} | |||
#endif | |||
@@ -559,7 +559,7 @@ public: | |||
CARLA_ASSERT(portIndex >= 0); | |||
CARLA_ASSERT(atom); | |||
if (handle && descriptor && descriptor->port_event) | |||
if (atom && handle && descriptor && descriptor->port_event) | |||
descriptor->port_event(handle, portIndex, atom->size, CARLA_URI_MAP_ID_ATOM_TRANSFER_ATOM, atom); | |||
} | |||
@@ -569,7 +569,7 @@ public: | |||
CARLA_ASSERT(portIndex >= 0); | |||
CARLA_ASSERT(atom); | |||
if (handle && descriptor && descriptor->port_event) | |||
if (atom && handle && descriptor && descriptor->port_event) | |||
descriptor->port_event(handle, portIndex, atom->size, CARLA_URI_MAP_ID_ATOM_TRANSFER_EVENT, atom); | |||
#if 0 | |||
if (handle && descriptor && descriptor->port_event) | |||
@@ -654,6 +654,9 @@ public: | |||
void handleUiWrite(uint32_t portIndex, uint32_t bufferSize, uint32_t format, const void* buffer) | |||
{ | |||
if (! buffer) | |||
return; | |||
if (format == 0) | |||
{ | |||
CARLA_ASSERT(buffer); | |||
@@ -10,9 +10,11 @@ TEMPLATE = app | |||
VERSION = 0.5.0 | |||
SOURCES = \ | |||
../carla_bridge_client.cpp \ | |||
../carla_bridge_osc.cpp \ | |||
../carla_bridge_ui-lv2.cpp \ | |||
../carla_bridge_toolkit-gtk.cpp | |||
../carla_bridge_toolkit.cpp \ | |||
../carla_bridge_toolkit-gtk.cpp \ | |||
../carla_bridge_ui-lv2.cpp | |||
HEADERS = \ | |||
../carla_bridge.hpp \ | |||
@@ -36,6 +38,6 @@ LIBS = \ | |||
DEFINES = QTCREATOR_TEST | |||
DEFINES += DEBUG | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_LV2_GTK2 | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_GTK2 BRIDGE_LV2_GTK2 | |||
QMAKE_CXXFLAGS *= -std=c++0x |
@@ -10,9 +10,11 @@ TEMPLATE = app | |||
VERSION = 0.5.0 | |||
SOURCES = \ | |||
../carla_bridge_client.cpp \ | |||
../carla_bridge_osc.cpp \ | |||
../carla_bridge_ui-lv2.cpp \ | |||
../carla_bridge_toolkit-gtk.cpp | |||
../carla_bridge_toolkit.cpp \ | |||
../carla_bridge_toolkit-gtk.cpp \ | |||
../carla_bridge_ui-lv2.cpp | |||
HEADERS = \ | |||
../carla_bridge.hpp \ | |||
@@ -27,7 +29,8 @@ HEADERS = \ | |||
../../carla-utils/carla_lv2_utils.hpp | |||
INCLUDEPATH = .. \ | |||
../../carla-includes | |||
../../carla-includes \ | |||
../../carla-utils | |||
LIBS = \ | |||
../../carla-lilv/carla_lilv.a \ | |||
@@ -35,6 +38,6 @@ LIBS = \ | |||
DEFINES = QTCREATOR_TEST | |||
DEFINES += DEBUG | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_LV2_GTK3 | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_GTK3 BRIDGE_LV2_GTK3 | |||
QMAKE_CXXFLAGS *= -std=c++0x |
@@ -10,9 +10,11 @@ TEMPLATE = app | |||
VERSION = 0.5.0 | |||
SOURCES = \ | |||
../carla_bridge_client.cpp \ | |||
../carla_bridge_osc.cpp \ | |||
../carla_bridge_ui-lv2.cpp \ | |||
../carla_bridge_toolkit-qt.cpp | |||
../carla_bridge_toolkit.cpp \ | |||
../carla_bridge_toolkit-qt.cpp \ | |||
../carla_bridge_ui-lv2.cpp | |||
HEADERS = \ | |||
../carla_bridge.hpp \ | |||
@@ -27,7 +29,8 @@ HEADERS = \ | |||
../../carla-utils/carla_lv2_utils.hpp | |||
INCLUDEPATH = .. \ | |||
../../carla-includes | |||
../../carla-includes \ | |||
../../carla-utils | |||
LIBS = \ | |||
../../carla-lilv/carla_lilv.a \ | |||
@@ -35,6 +38,6 @@ LIBS = \ | |||
DEFINES = QTCREATOR_TEST | |||
DEFINES += DEBUG | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_LV2_QT4 | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_QT4 BRIDGE_LV2_QT4 | |||
QMAKE_CXXFLAGS *= -std=c++0x |
@@ -10,9 +10,11 @@ TEMPLATE = app | |||
VERSION = 0.5.0 | |||
SOURCES = \ | |||
../carla_bridge_client.cpp \ | |||
../carla_bridge_osc.cpp \ | |||
../carla_bridge_ui-lv2.cpp \ | |||
../carla_bridge_toolkit-qt.cpp | |||
../carla_bridge_toolkit.cpp \ | |||
../carla_bridge_toolkit-qt.cpp \ | |||
../carla_bridge_ui-lv2.cpp | |||
HEADERS = \ | |||
../carla_bridge.hpp \ | |||
@@ -36,6 +38,6 @@ LIBS = \ | |||
DEFINES = QTCREATOR_TEST | |||
DEFINES += DEBUG | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_LV2_QT5 | |||
DEFINES += BUILD_BRIDGE BUILD_BRIDGE_UI BRIDGE_LV2 BRIDGE_QT5 BRIDGE_LV2_QT5 | |||
QMAKE_CXXFLAGS *= -std=c++0x |
@@ -1,6 +1,10 @@ | |||
# QtCreator project file | |||
contains(QT_VERSION, ^5.*) { | |||
QT = core widgets | |||
} else { | |||
QT = core gui | |||
} | |||
CONFIG = debug link_pkgconfig qt warn_on | |||
PKGCONFIG = liblo | |||
@@ -10,9 +14,11 @@ TEMPLATE = app | |||
VERSION = 0.5.0 | |||
SOURCES = \ | |||
../carla_bridge_client.cpp \ | |||
../carla_bridge_osc.cpp \ | |||
../carla_bridge_ui-lv2.cpp \ | |||
../carla_bridge_toolkit-qt.cpp | |||
../carla_bridge_toolkit.cpp \ | |||
../carla_bridge_toolkit-qt.cpp \ | |||
../carla_bridge_ui-lv2.cpp | |||
HEADERS = \ | |||
../carla_bridge.hpp \ | |||
@@ -27,9 +33,10 @@ HEADERS = \ | |||
../../carla-utils/carla_lv2_utils.hpp | |||
INCLUDEPATH = .. \ | |||
../../carla-includes | |||
../../carla-includes \ | |||
../../carla-utils | |||
LIBS = \ | |||
LIBS = \ | |||
../../carla-lilv/carla_lilv.a \ | |||
../../carla-rtmempool/carla_rtmempool.a | |||