| @@ -1011,12 +1011,12 @@ public: | |||||
| void osc_send_bridge_plugin_info(const int32_t category, const int32_t hints, const char* const name, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId); | void osc_send_bridge_plugin_info(const int32_t category, const int32_t hints, const char* const name, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId); | ||||
| void osc_send_bridge_parameter_info(const int32_t index, const char* const name, const char* const unit); | void osc_send_bridge_parameter_info(const int32_t index, const char* const name, const char* const unit); | ||||
| void osc_send_bridge_parameter_data(const int32_t index, const int32_t type, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC); | void osc_send_bridge_parameter_data(const int32_t index, const int32_t type, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC); | ||||
| void osc_send_bridge_parameter_ranges(const int32_t index, const double def, const double min, const double max, const double step, const double stepSmall, const double stepLarge); | |||||
| void osc_send_bridge_parameter_ranges(const int32_t index, const float def, const float min, const float max, const float step, const float stepSmall, const float stepLarge); | |||||
| void osc_send_bridge_program_info(const int32_t index, const char* const name); | void osc_send_bridge_program_info(const int32_t index, const char* const name); | ||||
| void osc_send_bridge_midi_program_info(const int32_t index, const int32_t bank, const int32_t program, const char* const label); | void osc_send_bridge_midi_program_info(const int32_t index, const int32_t bank, const int32_t program, const char* const label); | ||||
| void osc_send_bridge_configure(const char* const key, const char* const value); | void osc_send_bridge_configure(const char* const key, const char* const value); | ||||
| void osc_send_bridge_set_parameter_value(const int32_t index, const double value); | |||||
| void osc_send_bridge_set_default_value(const int32_t index, const double value); | |||||
| void osc_send_bridge_set_parameter_value(const int32_t index, const float value); | |||||
| void osc_send_bridge_set_default_value(const int32_t index, const float value); | |||||
| void osc_send_bridge_set_program(const int32_t index); | void osc_send_bridge_set_program(const int32_t index); | ||||
| void osc_send_bridge_set_midi_program(const int32_t index); | void osc_send_bridge_set_midi_program(const int32_t index); | ||||
| void osc_send_bridge_set_custom_data(const char* const type, const char* const key, const char* const value); | void osc_send_bridge_set_custom_data(const char* const type, const char* const key, const char* const value); | ||||
| @@ -1024,18 +1024,18 @@ public: | |||||
| void osc_send_bridge_set_inpeak(const int32_t portId); | void osc_send_bridge_set_inpeak(const int32_t portId); | ||||
| void osc_send_bridge_set_outpeak(const int32_t portId); | void osc_send_bridge_set_outpeak(const int32_t portId); | ||||
| #else | #else | ||||
| void osc_send_peaks(CarlaPlugin* const plugin, const unsigned short id); | |||||
| void osc_send_peaks(CarlaPlugin* const plugin, const unsigned int id); | |||||
| void osc_send_control_add_plugin_start(const int32_t pluginId, const char* const pluginName); | void osc_send_control_add_plugin_start(const int32_t pluginId, const char* const pluginName); | ||||
| void osc_send_control_add_plugin_end(const int32_t pluginId); | void osc_send_control_add_plugin_end(const int32_t pluginId); | ||||
| void osc_send_control_remove_plugin(const int32_t pluginId); | void osc_send_control_remove_plugin(const int32_t pluginId); | ||||
| void osc_send_control_set_plugin_data(const int32_t pluginId, const int32_t type, const int32_t category, const int32_t hints, const char* const realName, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId); | void osc_send_control_set_plugin_data(const int32_t pluginId, const int32_t type, const int32_t category, const int32_t hints, const char* const realName, const char* const label, const char* const maker, const char* const copyright, const int64_t uniqueId); | ||||
| void osc_send_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts, const int32_t cTotals); | void osc_send_control_set_plugin_ports(const int32_t pluginId, const int32_t audioIns, const int32_t audioOuts, const int32_t midiIns, const int32_t midiOuts, const int32_t cIns, const int32_t cOuts, const int32_t cTotals); | ||||
| void osc_send_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t type, const int32_t hints, const char* const name, const char* const label, const double current); | |||||
| void osc_send_control_set_parameter_ranges(const int32_t pluginId, const int32_t index, const double min, const double max, const double def, const double step, const double stepSmall, const double stepLarge); | |||||
| void osc_send_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t type, const int32_t hints, const char* const name, const char* const label, const float current); | |||||
| void osc_send_control_set_parameter_ranges(const int32_t pluginId, const int32_t index, const float min, const float max, const float def, const float step, const float stepSmall, const float stepLarge); | |||||
| void osc_send_control_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc); | void osc_send_control_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc); | ||||
| void osc_send_control_set_parameter_midi_channel(const int32_t pluginId, const int32_t index, const int32_t channel); | void osc_send_control_set_parameter_midi_channel(const int32_t pluginId, const int32_t index, const int32_t channel); | ||||
| void osc_send_control_set_parameter_value(const int32_t pluginId, const int32_t index, const double value); | |||||
| void osc_send_control_set_default_value(const int32_t pluginId, const int32_t index, const double value); | |||||
| void osc_send_control_set_parameter_value(const int32_t pluginId, const int32_t index, const float value); | |||||
| void osc_send_control_set_default_value(const int32_t pluginId, const int32_t index, const float value); | |||||
| void osc_send_control_set_program(const int32_t pluginId, const int32_t index); | void osc_send_control_set_program(const int32_t pluginId, const int32_t index); | ||||
| void osc_send_control_set_program_count(const int32_t pluginId, const int32_t count); | void osc_send_control_set_program_count(const int32_t pluginId, const int32_t count); | ||||
| void osc_send_control_set_program_name(const int32_t pluginId, const int32_t index, const char* const name); | void osc_send_control_set_program_name(const int32_t pluginId, const int32_t index, const char* const name); | ||||
| @@ -18,11 +18,11 @@ | |||||
| #ifndef __CARLA_ENGINE_INTERNAL_HPP__ | #ifndef __CARLA_ENGINE_INTERNAL_HPP__ | ||||
| #define __CARLA_ENGINE_INTERNAL_HPP__ | #define __CARLA_ENGINE_INTERNAL_HPP__ | ||||
| #include "carla_engine.hpp" | |||||
| #include "carla_engine_osc.hpp" | |||||
| #include "carla_engine_thread.hpp" | |||||
| #include "CarlaEngine.hpp" | |||||
| #include "CarlaEngineOsc.hpp" | |||||
| #include "CarlaEngineThread.hpp" | |||||
| #include "carla_plugin.hpp" | |||||
| #include "CarlaPlugin.hpp" | |||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| # include <QtCore/QProcessEnvironment> | # include <QtCore/QProcessEnvironment> | ||||
| @@ -47,7 +47,7 @@ const char* EngineType2Str(const EngineType type) | |||||
| return "kEngineTypePlugin"; | return "kEngineTypePlugin"; | ||||
| } | } | ||||
| qWarning("CarlaBackend::EngineType2Str(%i) - invalid type", type); | |||||
| carla_stderr("CarlaBackend::EngineType2Str(%i) - invalid type", type); | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| @@ -64,7 +64,7 @@ const char* EnginePortType2Str(const EnginePortType type) | |||||
| return "kEnginePortTypeEvent"; | return "kEnginePortTypeEvent"; | ||||
| } | } | ||||
| qWarning("CarlaBackend::EnginePortType2Str(%i) - invalid type", type); | |||||
| carla_stderr("CarlaBackend::EnginePortType2Str(%i) - invalid type", type); | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| @@ -87,7 +87,7 @@ const char* EngineControlEventType2Str(const EngineControlEventType type) | |||||
| return "kEngineControlEventTypeAllNotesOff"; | return "kEngineControlEventTypeAllNotesOff"; | ||||
| } | } | ||||
| qWarning("CarlaBackend::EngineControlEventType2Str(%i) - invalid type", type); | |||||
| carla_stderr("CarlaBackend::EngineControlEventType2Str(%i) - invalid type", type); | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| @@ -15,10 +15,11 @@ | |||||
| * For a full copy of the GNU General Public License see the GPL.txt file | * For a full copy of the GNU General Public License see the GPL.txt file | ||||
| */ | */ | ||||
| #include "carla_engine.hpp" | |||||
| #include "carla_engine_osc.hpp" | |||||
| #include "carla_plugin.hpp" | |||||
| #include "carla_midi.h" | |||||
| #include "CarlaEngineOsc.hpp" | |||||
| #include "CarlaEngine.hpp" | |||||
| #include "CarlaPlugin.hpp" | |||||
| #include "CarlaMIDI.h" | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -29,13 +30,13 @@ CarlaEngineOsc::CarlaEngineOsc(CarlaEngine* const engine) | |||||
| fServerTCP(nullptr), | fServerTCP(nullptr), | ||||
| fServerUDP(nullptr) | fServerUDP(nullptr) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::CarlaEngineOsc(%p)", engine); | |||||
| carla_debug("CarlaEngineOsc::CarlaEngineOsc(%p)", engine); | |||||
| CARLA_ASSERT(engine != nullptr); | CARLA_ASSERT(engine != nullptr); | ||||
| } | } | ||||
| CarlaEngineOsc::~CarlaEngineOsc() | CarlaEngineOsc::~CarlaEngineOsc() | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::~CarlaEngineOsc()"); | |||||
| carla_debug("CarlaEngineOsc::~CarlaEngineOsc()"); | |||||
| //CARLA_ASSERT(fName.isEmpty()); // FIXME | //CARLA_ASSERT(fName.isEmpty()); // FIXME | ||||
| //CARLA_ASSERT(fServerPathTCP.isEmpty()); // FIXME | //CARLA_ASSERT(fServerPathTCP.isEmpty()); // FIXME | ||||
| //CARLA_ASSERT(fServerPathUDP.isEmpty()); // FIXME | //CARLA_ASSERT(fServerPathUDP.isEmpty()); // FIXME | ||||
| @@ -47,7 +48,7 @@ CarlaEngineOsc::~CarlaEngineOsc() | |||||
| void CarlaEngineOsc::init(const char* const name) | void CarlaEngineOsc::init(const char* const name) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::init(\"%s\")", name); | |||||
| carla_debug("CarlaEngineOsc::init(\"%s\")", name); | |||||
| CARLA_ASSERT(fName.isEmpty()); | CARLA_ASSERT(fName.isEmpty()); | ||||
| CARLA_ASSERT(fServerPathTCP.isEmpty()); | CARLA_ASSERT(fServerPathTCP.isEmpty()); | ||||
| CARLA_ASSERT(fServerPathUDP.isEmpty()); | CARLA_ASSERT(fServerPathUDP.isEmpty()); | ||||
| @@ -102,7 +103,7 @@ void CarlaEngineOsc::idle() | |||||
| void CarlaEngineOsc::close() | void CarlaEngineOsc::close() | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::close()"); | |||||
| carla_debug("CarlaEngineOsc::close()"); | |||||
| CARLA_ASSERT(fName.isNotEmpty()); | CARLA_ASSERT(fName.isNotEmpty()); | ||||
| CARLA_ASSERT(fServerPathTCP.isNotEmpty()); | CARLA_ASSERT(fServerPathTCP.isNotEmpty()); | ||||
| CARLA_ASSERT(fServerPathUDP.isNotEmpty()); | CARLA_ASSERT(fServerPathUDP.isNotEmpty()); | ||||
| @@ -143,7 +144,7 @@ bool isDigit(const char c) | |||||
| int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const lo_arg* const* const argv, const char* const types, const lo_message msg) | ||||
| { | { | ||||
| #if DEBUG | #if DEBUG | ||||
| qDebug("CarlaEngineOsc::handleMessage(%s, %i, %p, %s, %p)", path, argc, argv, types, msg); | |||||
| carla_debug("CarlaEngineOsc::handleMessage(%s, %i, %p, %s, %p)", path, argc, argv, types, msg); | |||||
| #endif | #endif | ||||
| CARLA_ASSERT(fName.isNotEmpty()); | CARLA_ASSERT(fName.isNotEmpty()); | ||||
| CARLA_ASSERT(fServerPathTCP.isNotEmpty() || fServerPathUDP.isNotEmpty()); | CARLA_ASSERT(fServerPathTCP.isNotEmpty() || fServerPathUDP.isNotEmpty()); | ||||
| @@ -152,13 +153,13 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (path == nullptr) | if (path == nullptr) | ||||
| { | { | ||||
| qCritical("CarlaEngineOsc::handleMessage() - got invalid path"); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage() - got invalid path"); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| if (fName.isEmpty()) | if (fName.isEmpty()) | ||||
| { | { | ||||
| qCritical("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message but client is offline", path); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message but client is offline", path); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -180,7 +181,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| // Check if message is for this client | // Check if message is for this client | ||||
| if (std::strlen(path) <= nameSize || std::strncmp(path+1, (const char*)fName, nameSize) != 0) | if (std::strlen(path) <= nameSize || std::strncmp(path+1, (const char*)fName, nameSize) != 0) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::handleMessage() - message not for this client -> '%s' != '/%s/'", path, (const char*)fName); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage() - message not for this client -> '%s' != '/%s/'", path, (const char*)fName); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -195,7 +196,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| { | { | ||||
| if (isDigit(path[nameSize+5])) | if (isDigit(path[nameSize+5])) | ||||
| { | { | ||||
| qCritical("CarlaEngineOsc::handleMessage() - invalid plugin id, over 999? (value: \"%s\")", path+nameSize); | |||||
| carla_stderr2("CarlaEngineOsc::handleMessage() - invalid plugin id, over 999? (value: \"%s\")", path+nameSize); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| else if (isDigit(path[nameSize+4])) | else if (isDigit(path[nameSize+4])) | ||||
| @@ -221,7 +222,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (pluginId > kEngine->currentPluginCount()) | if (pluginId > kEngine->currentPluginCount()) | ||||
| { | { | ||||
| qCritical("CarlaEngineOsc::handleMessage() - failed to get plugin, wrong id '%i'", pluginId); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage() - failed to get plugin, wrong id '%i'", pluginId); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -230,7 +231,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (plugin == nullptr || plugin->id() != pluginId) | if (plugin == nullptr || plugin->id() != pluginId) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::handleMessage() - invalid plugin id '%i', probably has been removed", pluginId); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage() - invalid plugin id '%i', probably has been removed", pluginId); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -241,7 +242,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| if (method[0] == '\0') | if (method[0] == '\0') | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message without method", path); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage(\"%s\", ...) - received message without method", path); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -349,7 +350,7 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| return handleMsgLv2EventTransfer(plugin, argc, argv, types); | return handleMsgLv2EventTransfer(plugin, argc, argv, types); | ||||
| #endif | #endif | ||||
| qWarning("CarlaEngineOsc::handleMessage() - unsupported OSC method '%s'", method); | |||||
| carla_stderr("CarlaEngineOsc::handleMessage() - unsupported OSC method '%s'", method); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -358,18 +359,18 @@ int CarlaEngineOsc::handleMessage(const char* const path, const int argc, const | |||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| int CarlaEngineOsc::handleMsgRegister(const int argc, const lo_arg* const* const argv, const char* const types, const lo_address source) | int CarlaEngineOsc::handleMsgRegister(const int argc, const lo_arg* const* const argv, const char* const types, const lo_address source) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgRegister()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgRegister()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s"); | ||||
| if (fControlData.path != nullptr) | if (fControlData.path != nullptr) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::handleMsgRegister() - OSC backend already registered to %s", fControlData.path); | |||||
| carla_stderr("CarlaEngineOsc::handleMsgRegister() - OSC backend already registered to %s", fControlData.path); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| const char* const url = &argv[0]->s; | const char* const url = &argv[0]->s; | ||||
| qDebug("CarlaEngineOsc::handleMsgRegister() - OSC backend registered to %s", url); | |||||
| carla_debug("CarlaEngineOsc::handleMsgRegister() - OSC backend registered to %s", url); | |||||
| { | { | ||||
| const char* host = lo_address_get_hostname(source); | const char* host = lo_address_get_hostname(source); | ||||
| @@ -400,11 +401,11 @@ int CarlaEngineOsc::handleMsgRegister(const int argc, const lo_arg* const* const | |||||
| int CarlaEngineOsc::handleMsgUnregister() | int CarlaEngineOsc::handleMsgUnregister() | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgUnregister()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgUnregister()"); | |||||
| if (fControlData.path == nullptr) | if (fControlData.path == nullptr) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::handleMsgUnregister() - OSC backend is not registered yet"); | |||||
| carla_stderr("CarlaEngineOsc::handleMsgUnregister() - OSC backend is not registered yet"); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| @@ -417,7 +418,7 @@ int CarlaEngineOsc::handleMsgUnregister() | |||||
| int CarlaEngineOsc::handleMsgUpdate(CARLA_ENGINE_OSC_HANDLE_ARGS2, const lo_address source) | int CarlaEngineOsc::handleMsgUpdate(CARLA_ENGINE_OSC_HANDLE_ARGS2, const lo_address source) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgUpdate()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgUpdate()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "s"); | ||||
| const char* const url = (const char*)&argv[0]->s; | const char* const url = (const char*)&argv[0]->s; | ||||
| @@ -429,7 +430,7 @@ int CarlaEngineOsc::handleMsgUpdate(CARLA_ENGINE_OSC_HANDLE_ARGS2, const lo_addr | |||||
| int CarlaEngineOsc::handleMsgConfigure(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgConfigure(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgConfigure()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgConfigure()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ss"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ss"); | ||||
| const char* const key = (const char*)&argv[0]->s; | const char* const key = (const char*)&argv[0]->s; | ||||
| @@ -443,7 +444,7 @@ int CarlaEngineOsc::handleMsgConfigure(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgControl(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgControl(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgControl()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgControl()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if"); | ||||
| const int32_t rindex = argv[0]->i; | const int32_t rindex = argv[0]->i; | ||||
| @@ -456,7 +457,7 @@ int CarlaEngineOsc::handleMsgControl(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgProgram()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgProgram()"); | |||||
| if (argc == 2) | if (argc == 2) | ||||
| { | { | ||||
| @@ -481,7 +482,7 @@ int CarlaEngineOsc::handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| qCritical("CarlaEngineOsc::handleMsgProgram() - program_id '%i' out of bounds", program); | |||||
| carla_stderr("CarlaEngineOsc::handleMsgProgram() - programId '%i' out of bounds", program); | |||||
| } | } | ||||
| return 1; | return 1; | ||||
| @@ -489,7 +490,7 @@ int CarlaEngineOsc::handleMsgProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgMidi(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgMidi(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgMidi()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgMidi()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "m"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "m"); | ||||
| if (plugin->midiInCount() > 0) | if (plugin->midiInCount() > 0) | ||||
| @@ -517,13 +518,13 @@ int CarlaEngineOsc::handleMsgMidi(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| return 0; | return 0; | ||||
| } | } | ||||
| qWarning("CarlaEngineOsc::handleMsgMidi() - recived midi when plugin has no midi inputs"); | |||||
| carla_stderr("CarlaEngineOsc::handleMsgMidi() - recived midi when plugin has no midi inputs"); | |||||
| return 1; | return 1; | ||||
| } | } | ||||
| int CarlaEngineOsc::handleMsgExiting(CARLA_ENGINE_OSC_HANDLE_ARGS1) | int CarlaEngineOsc::handleMsgExiting(CARLA_ENGINE_OSC_HANDLE_ARGS1) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgExiting()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgExiting()"); | |||||
| // TODO - check for non-UIs (dssi-vst) and set to -1 instead | // TODO - check for non-UIs (dssi-vst) and set to -1 instead | ||||
| kEngine->callback(CALLBACK_SHOW_GUI, plugin->id(), 0, 0, 0.0f, nullptr); | kEngine->callback(CALLBACK_SHOW_GUI, plugin->id(), 0, 0, 0.0f, nullptr); | ||||
| @@ -538,7 +539,7 @@ int CarlaEngineOsc::handleMsgExiting(CARLA_ENGINE_OSC_HANDLE_ARGS1) | |||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| int CarlaEngineOsc::handleMsgSetActive(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetActive(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetActive()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetActive()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| const bool active = (bool)argv[0]->i; | const bool active = (bool)argv[0]->i; | ||||
| @@ -549,7 +550,7 @@ int CarlaEngineOsc::handleMsgSetActive(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetDryWet(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetDryWet(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetDryWet()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetDryWet()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | ||||
| const float value = argv[0]->f; | const float value = argv[0]->f; | ||||
| @@ -560,7 +561,7 @@ int CarlaEngineOsc::handleMsgSetDryWet(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetVolume(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetVolume(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetVolume()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetVolume()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | ||||
| const float value = argv[0]->f; | const float value = argv[0]->f; | ||||
| @@ -571,7 +572,7 @@ int CarlaEngineOsc::handleMsgSetVolume(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetBalanceLeft(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetBalanceLeft(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetBalanceLeft()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetBalanceLeft()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | ||||
| const float value = argv[0]->f; | const float value = argv[0]->f; | ||||
| @@ -582,7 +583,7 @@ int CarlaEngineOsc::handleMsgSetBalanceLeft(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetBalanceRight(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetBalanceRight(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetBalanceRight()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetBalanceRight()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "f"); | ||||
| const float value = argv[0]->f; | const float value = argv[0]->f; | ||||
| @@ -593,7 +594,7 @@ int CarlaEngineOsc::handleMsgSetBalanceRight(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetParameterValue(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetParameterValue(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetParameterValue()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetParameterValue()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "if"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -605,7 +606,7 @@ int CarlaEngineOsc::handleMsgSetParameterValue(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetParameterMidiCC(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetParameterMidiCC(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetParameterMidiCC()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetParameterMidiCC()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -617,7 +618,7 @@ int CarlaEngineOsc::handleMsgSetParameterMidiCC(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetParameterMidiChannel(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetParameterMidiChannel(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetParameterMidiChannel()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetParameterMidiChannel()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -629,7 +630,7 @@ int CarlaEngineOsc::handleMsgSetParameterMidiChannel(CARLA_ENGINE_OSC_HANDLE_ARG | |||||
| int CarlaEngineOsc::handleMsgSetProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetProgram()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetProgram()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -640,7 +641,7 @@ int CarlaEngineOsc::handleMsgSetProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgSetMidiProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgSetMidiProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgSetMidiProgram()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgSetMidiProgram()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(1, "i"); | ||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| @@ -651,7 +652,7 @@ int CarlaEngineOsc::handleMsgSetMidiProgram(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgNoteOn(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgNoteOn(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgNoteOn()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgNoteOn()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(3, "iii"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(3, "iii"); | ||||
| const int32_t channel = argv[0]->i; | const int32_t channel = argv[0]->i; | ||||
| @@ -664,7 +665,7 @@ int CarlaEngineOsc::handleMsgNoteOn(CARLA_ENGINE_OSC_HANDLE_ARGS2) | |||||
| int CarlaEngineOsc::handleMsgNoteOff(CARLA_ENGINE_OSC_HANDLE_ARGS2) | int CarlaEngineOsc::handleMsgNoteOff(CARLA_ENGINE_OSC_HANDLE_ARGS2) | ||||
| { | { | ||||
| qDebug("CarlaEngineOsc::handleMsgNoteOff()"); | |||||
| carla_debug("CarlaEngineOsc::handleMsgNoteOff()"); | |||||
| CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | CARLA_ENGINE_OSC_CHECK_OSC_TYPES(2, "ii"); | ||||
| const int32_t channel = argv[0]->i; | const int32_t channel = argv[0]->i; | ||||
| @@ -18,9 +18,9 @@ | |||||
| #ifndef __CARLA_ENGINE_OSC_HPP__ | #ifndef __CARLA_ENGINE_OSC_HPP__ | ||||
| #define __CARLA_ENGINE_OSC_HPP__ | #define __CARLA_ENGINE_OSC_HPP__ | ||||
| #include "carla_backend.hpp" | |||||
| #include "carla_juce_utils.hpp" | |||||
| #include "carla_osc_utils.hpp" | |||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaString.hpp" | |||||
| #include "CarlaOscUtils.hpp" | |||||
| #define CARLA_ENGINE_OSC_HANDLE_ARGS1 CarlaPlugin* const plugin | #define CARLA_ENGINE_OSC_HANDLE_ARGS1 CarlaPlugin* const plugin | ||||
| #define CARLA_ENGINE_OSC_HANDLE_ARGS2 CarlaPlugin* const plugin, const int argc, const lo_arg* const* const argv, const char* const types | #define CARLA_ENGINE_OSC_HANDLE_ARGS2 CarlaPlugin* const plugin, const int argc, const lo_arg* const* const argv, const char* const types | ||||
| @@ -29,7 +29,7 @@ | |||||
| /* check argument count */ \ | /* check argument count */ \ | ||||
| if (argc != argcToCompare) \ | if (argc != argcToCompare) \ | ||||
| { \ | { \ | ||||
| qCritical("CarlaEngineOsc::%s() - argument count mismatch: %i != %i", __FUNCTION__, argc, argcToCompare); \ | |||||
| carla_stderr("CarlaEngineOsc::%s() - argument count mismatch: %i != %i", __FUNCTION__, argc, argcToCompare); \ | |||||
| return 1; \ | return 1; \ | ||||
| } \ | } \ | ||||
| if (argc > 0) \ | if (argc > 0) \ | ||||
| @@ -37,13 +37,13 @@ | |||||
| /* check for nullness */ \ | /* check for nullness */ \ | ||||
| if (! (types && typesToCompare)) \ | if (! (types && typesToCompare)) \ | ||||
| { \ | { \ | ||||
| qCritical("CarlaEngineOsc::%s() - argument types are null", __FUNCTION__); \ | |||||
| carla_stderr("CarlaEngineOsc::%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("CarlaEngineOsc::%s() - argument types mismatch: '%s' != '%s'", __FUNCTION__, types, typesToCompare); \ | |||||
| carla_stderr("CarlaEngineOsc::%s() - argument types mismatch: '%s' != '%s'", __FUNCTION__, types, typesToCompare); \ | |||||
| return 1; \ | return 1; \ | ||||
| } \ | } \ | ||||
| } | } | ||||
| @@ -149,20 +149,17 @@ private: | |||||
| static void osc_error_handler_TCP(int num, const char* msg, const char* path) | static void osc_error_handler_TCP(int num, const char* msg, const char* path) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::osc_error_handler_TCP(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| carla_stderr2("CarlaEngineOsc::osc_error_handler_TCP(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| } | } | ||||
| static void osc_error_handler_UDP(int num, const char* msg, const char* path) | static void osc_error_handler_UDP(int num, const char* msg, const char* path) | ||||
| { | { | ||||
| qWarning("CarlaEngineOsc::osc_error_handler_UDP(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| carla_stderr2("CarlaEngineOsc::osc_error_handler_UDP(%i, \"%s\", \"%s\")", num, msg, path); | |||||
| } | } | ||||
| static int osc_message_handler(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg, void* userData) | static int osc_message_handler(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg, void* userData) | ||||
| { | { | ||||
| CARLA_ASSERT(userData); | |||||
| if (CarlaEngineOsc* const _this_ = (CarlaEngineOsc*)userData) | |||||
| return _this_->handleMessage(path, argc, argv, types, msg); | |||||
| return 1; | |||||
| return ((CarlaEngineOsc*)userData)->handleMessage(path, argc, argv, types, msg); | |||||
| } | } | ||||
| CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineOsc) | CARLA_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(CarlaEngineOsc) | ||||
| @@ -15,19 +15,19 @@ | |||||
| * For a full copy of the GNU General Public License see the GPL.txt file | * For a full copy of the GNU General Public License see the GPL.txt file | ||||
| */ | */ | ||||
| #include "carla_engine.hpp" | |||||
| #include "carla_engine_thread.hpp" | |||||
| #include "carla_plugin.hpp" | |||||
| #include "CarlaEngineThread.hpp" | |||||
| #include "CarlaEngine.hpp" | |||||
| #include "CarlaPlugin.hpp" | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine, QObject* const parent) | |||||
| : QThread(parent), | |||||
| kEngine(engine) | |||||
| CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine) | |||||
| : kEngine(engine) | |||||
| { | { | ||||
| qDebug("CarlaEngineThread::CarlaEngineThread(%p, %p)", engine, parent); | |||||
| carla_debug("CarlaEngineThread::CarlaEngineThread(%p)", engine); | |||||
| CARLA_ASSERT(engine); | CARLA_ASSERT(engine); | ||||
| fStopNow = true; | fStopNow = true; | ||||
| @@ -35,7 +35,7 @@ CarlaEngineThread::CarlaEngineThread(CarlaEngine* const engine, QObject* const p | |||||
| CarlaEngineThread::~CarlaEngineThread() | CarlaEngineThread::~CarlaEngineThread() | ||||
| { | { | ||||
| qDebug("CarlaEngineThread::~CarlaEngineThread()"); | |||||
| carla_debug("CarlaEngineThread::~CarlaEngineThread()"); | |||||
| CARLA_ASSERT(fStopNow); | CARLA_ASSERT(fStopNow); | ||||
| } | } | ||||
| @@ -43,17 +43,17 @@ CarlaEngineThread::~CarlaEngineThread() | |||||
| void CarlaEngineThread::startNow() | void CarlaEngineThread::startNow() | ||||
| { | { | ||||
| qDebug("CarlaEngineThread::startNow()"); | |||||
| carla_debug("CarlaEngineThread::startNow()"); | |||||
| CARLA_ASSERT(fStopNow); | CARLA_ASSERT(fStopNow); | ||||
| fStopNow = false; | fStopNow = false; | ||||
| start(QThread::HighPriority); | |||||
| start(); | |||||
| } | } | ||||
| void CarlaEngineThread::stopNow() | void CarlaEngineThread::stopNow() | ||||
| { | { | ||||
| qDebug("CarlaEngineThread::stopNow()"); | |||||
| carla_debug("CarlaEngineThread::stopNow()"); | |||||
| if (fStopNow) | if (fStopNow) | ||||
| return; | return; | ||||
| @@ -62,25 +62,20 @@ void CarlaEngineThread::stopNow() | |||||
| const CarlaMutex::ScopedLocker sl(&fMutex); | const CarlaMutex::ScopedLocker sl(&fMutex); | ||||
| if (isRunning() && ! wait(200)) | |||||
| { | |||||
| quit(); | |||||
| if (isRunning() && ! wait(300)) | |||||
| terminate(); | |||||
| } | |||||
| if (isRunning() && ! stop(500)) | |||||
| terminate(); | |||||
| } | } | ||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| void CarlaEngineThread::run() | void CarlaEngineThread::run() | ||||
| { | { | ||||
| qDebug("CarlaEngineThread::run()"); | |||||
| carla_debug("CarlaEngineThread::run()"); | |||||
| CARLA_ASSERT(kEngine->isRunning()); | CARLA_ASSERT(kEngine->isRunning()); | ||||
| bool oscRegisted, usesSingleThread; | bool oscRegisted, usesSingleThread; | ||||
| unsigned int i, count; | unsigned int i, count; | ||||
| double value; | |||||
| float value; | |||||
| while (kEngine->isRunning() && ! fStopNow) | while (kEngine->isRunning() && ! fStopNow) | ||||
| { | { | ||||
| @@ -151,7 +146,7 @@ void CarlaEngineThread::run() | |||||
| } | } | ||||
| kEngine->idleOsc(); | kEngine->idleOsc(); | ||||
| msleep(oscRegisted ? 40 : 50); | |||||
| carla_msleep(oscRegisted ? 40 : 50); | |||||
| } | } | ||||
| } | } | ||||
| @@ -18,10 +18,9 @@ | |||||
| #ifndef __CARLA_ENGINE_THREAD_HPP__ | #ifndef __CARLA_ENGINE_THREAD_HPP__ | ||||
| #define __CARLA_ENGINE_THREAD_HPP__ | #define __CARLA_ENGINE_THREAD_HPP__ | ||||
| #include "carla_backend.hpp" | |||||
| #include "carla_utils.hpp" | |||||
| #include <QtCore/QThread> | |||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaMutex.hpp" | |||||
| #include "CarlaThread.hpp" | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -29,10 +28,10 @@ CARLA_BACKEND_START_NAMESPACE | |||||
| } // Fix editor indentation | } // Fix editor indentation | ||||
| #endif | #endif | ||||
| class CarlaEngineThread : public QThread | |||||
| class CarlaEngineThread : public CarlaThread | |||||
| { | { | ||||
| public: | public: | ||||
| CarlaEngineThread(CarlaEngine* const engine, QObject* const parent = nullptr); | |||||
| CarlaEngineThread(CarlaEngine* const engine); | |||||
| ~CarlaEngineThread(); | ~CarlaEngineThread(); | ||||
| void startNow(); | void startNow(); | ||||
| @@ -8,8 +8,8 @@ include ../Makefile.mk | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||||
| LINK_FLAGS += $(shell pkg-config --libs liblo) | |||||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore) | |||||
| LINK_FLAGS += $(shell pkg-config --libs liblo QtCore) | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| @@ -15,7 +15,8 @@ | |||||
| * For a full copy of the GNU General Public License see the GPL.txt file | * For a full copy of the GNU General Public License see the GPL.txt file | ||||
| */ | */ | ||||
| #include "standalone/CarlaStandalone.cpp" | |||||
| // still need warn check | |||||
| #include "engine/CarlaEngineOsc.cpp" | |||||
| #if 0 | #if 0 | ||||
| #include "CarlaDefines.hpp" | #include "CarlaDefines.hpp" | ||||
| @@ -34,7 +34,11 @@ int main() | |||||
| : s{'1', 's', 't', 0}, | : s{'1', 's', 't', 0}, | ||||
| i(228), | i(228), | ||||
| d(3.33333333333), | d(3.33333333333), | ||||
| ptr((void*)0x500) {} | |||||
| ptr((void*)0x500) | |||||
| { | |||||
| carla_zeroMem(padding, sizeof(char)*100); | |||||
| } | |||||
| } blob; | } blob; | ||||
| // binary -> base64 | // binary -> base64 | ||||
| @@ -46,7 +50,8 @@ int main() | |||||
| printf("BINARY '%s'\n", buf0); | printf("BINARY '%s'\n", buf0); | ||||
| char buf0dec[carla_base64_decoded_max_len(buf0)]; | |||||
| char buf0dec[carla_base64_decoded_max_len(buf0)+1]; | |||||
| carla_zeroMem(buf0dec, sizeof(buf0dec)); | |||||
| carla_base64_decode(buf0, (uint8_t*)buf0dec); | carla_base64_decode(buf0, (uint8_t*)buf0dec); | ||||
| Blob blobTester; | Blob blobTester; | ||||
| @@ -71,7 +76,8 @@ int main() | |||||
| // base64 -> string | // base64 -> string | ||||
| const char* const test2 = "SGVsbG8gV29ybGQh"; | const char* const test2 = "SGVsbG8gV29ybGQh"; | ||||
| char buf2[carla_base64_decoded_max_len(test2)]; | |||||
| char buf2[carla_base64_decoded_max_len(test2)+1]; | |||||
| carla_zeroMem(buf2, sizeof(buf2)); | |||||
| carla_base64_decode(test2, (uint8_t*)buf2); | carla_base64_decode(test2, (uint8_t*)buf2); | ||||
| printf("'%s' => '%s'\n", test2, buf2); | printf("'%s' => '%s'\n", test2, buf2); | ||||
| @@ -9,6 +9,7 @@ include ../Makefile.mk | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -Wall -Wextra | BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -Wall -Wextra | ||||
| # BUILD_CXX_FLAGS += -isystem /usr/include/qt4 | |||||
| # BUILD_CXX_FLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector | # BUILD_CXX_FLAGS += -D_FORTIFY_SOURCE=2 -fstack-protector | ||||
| # BUILD_CXX_FLAGS += -I/opt/mingw32/include | # BUILD_CXX_FLAGS += -I/opt/mingw32/include | ||||