| @@ -195,7 +195,7 @@ clean: | |||||
| $(MAKE) clean -C c++/carla-bridge | $(MAKE) clean -C c++/carla-bridge | ||||
| $(MAKE) clean -C c++/carla-discovery | $(MAKE) clean -C c++/carla-discovery | ||||
| $(MAKE) clean -C c++/carla-lilv | $(MAKE) clean -C c++/carla-lilv | ||||
| rm -f *~ src/*~ src/*.pyc src/*.dll src/*.so src/ui_*.py src/icons_rc.py | |||||
| rm -f *~ src/*~ src/*.pyc src/ui_*.py src/icons_rc.py | |||||
| install: | install: | ||||
| @@ -397,15 +397,17 @@ enum CallbackType { | |||||
| /*! | /*! | ||||
| * A note has been pressed. | * A note has been pressed. | ||||
| * | * | ||||
| * \param value1 The note | |||||
| * \param value2 Velocity of the note | |||||
| * \param value1 Channel | |||||
| * \param value2 Note | |||||
| * \param value3 Velocity | |||||
| */ | */ | ||||
| CALLBACK_NOTE_ON = 4, | CALLBACK_NOTE_ON = 4, | ||||
| /*! | /*! | ||||
| * A note has been released. | * A note has been released. | ||||
| * | * | ||||
| * \param value1 The note | |||||
| * \param value1 Channel | |||||
| * \param value2 Note | |||||
| */ | */ | ||||
| CALLBACK_NOTE_OFF = 5, | CALLBACK_NOTE_OFF = 5, | ||||
| @@ -19,8 +19,8 @@ | |||||
| #include "carla_plugin.h" | #include "carla_plugin.h" | ||||
| // Single, standalone engine | // Single, standalone engine | ||||
| static CarlaBackend::CarlaEngine* carla_engine = nullptr; | |||||
| static CarlaBackend::CallbackFunc carla_func = nullptr; | |||||
| static CarlaBackend::CarlaEngine* carlaEngine = nullptr; | |||||
| static CarlaBackend::CallbackFunc carlaFunc = nullptr; | |||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -94,45 +94,47 @@ bool engine_init(const char* driver_name, const char* client_name) | |||||
| #ifdef CARLA_ENGINE_JACK | #ifdef CARLA_ENGINE_JACK | ||||
| if (strcmp(driver_name, "JACK") == 0) | if (strcmp(driver_name, "JACK") == 0) | ||||
| carla_engine = new CarlaBackend::CarlaEngineJack; | |||||
| carlaEngine = new CarlaBackend::CarlaEngineJack; | |||||
| #else | |||||
| if (false) | |||||
| pass(); | |||||
| #endif | #endif | ||||
| #ifdef CARLA_ENGINE_RTAUDIO | #ifdef CARLA_ENGINE_RTAUDIO | ||||
| #ifdef __LINUX_ALSA__ | #ifdef __LINUX_ALSA__ | ||||
| if (strcmp(driver_name, "ALSA") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_ALSA); | |||||
| else if (strcmp(driver_name, "ALSA") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_ALSA); | |||||
| #endif | #endif | ||||
| #ifdef __LINUX_PULSE__ | #ifdef __LINUX_PULSE__ | ||||
| if (strcmp(driver_name, "PulseAudio") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_PULSE); | |||||
| else if (strcmp(driver_name, "PulseAudio") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_PULSE); | |||||
| #endif | #endif | ||||
| #ifdef __LINUX_OSS__ | #ifdef __LINUX_OSS__ | ||||
| if (strcmp(driver_name, "OSS") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_OSS); | |||||
| else if (strcmp(driver_name, "OSS") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::LINUX_OSS); | |||||
| #endif | #endif | ||||
| #ifdef __UNIX_JACK__ | #ifdef __UNIX_JACK__ | ||||
| if (strcmp(driver_name, "JACK (RtAudio)") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::UNIX_JACK); | |||||
| else if (strcmp(driver_name, "JACK (RtAudio)") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::UNIX_JACK); | |||||
| #endif | #endif | ||||
| #ifdef __MACOSX_CORE__ | #ifdef __MACOSX_CORE__ | ||||
| if (strcmp(driver_name, "CoreAudio") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::MACOSX_CORE); | |||||
| else if (strcmp(driver_name, "CoreAudio") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::MACOSX_CORE); | |||||
| #endif | #endif | ||||
| #ifdef __WINDOWS_ASIO__ | #ifdef __WINDOWS_ASIO__ | ||||
| if (strcmp(driver_name, "ASIO") == 0) | |||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::WINDOWS_ASIO); | |||||
| else if (strcmp(driver_name, "ASIO") == 0) | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::WINDOWS_ASIO); | |||||
| #endif | #endif | ||||
| #ifdef __WINDOWS_DS__ | #ifdef __WINDOWS_DS__ | ||||
| else if (strcmp(driver_name, "DirectSound") == 0) | else if (strcmp(driver_name, "DirectSound") == 0) | ||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::WINDOWS_DS); | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::WINDOWS_DS); | |||||
| #endif | #endif | ||||
| #ifdef __RTAUDIO_DUMMY__ | #ifdef __RTAUDIO_DUMMY__ | ||||
| else if (strcmp(driver_name, "Dummy") == 0) | else if (strcmp(driver_name, "Dummy") == 0) | ||||
| carla_engine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::RTAUDIO_DUMMY); | |||||
| carlaEngine = new CarlaBackend::CarlaEngineRtAudio(RtAudio::RTAUDIO_DUMMY); | |||||
| #endif | #endif | ||||
| #endif | #endif | ||||
| if (! carla_engine) | |||||
| else | |||||
| { | { | ||||
| CarlaBackend::setLastError("The seleted audio driver is not available!"); | CarlaBackend::setLastError("The seleted audio driver is not available!"); | ||||
| return false; | return false; | ||||
| @@ -147,9 +149,9 @@ bool engine_init(const char* driver_name, const char* client_name) | |||||
| } | } | ||||
| #endif | #endif | ||||
| carla_engine->setCallback(carla_func); | |||||
| carlaEngine->setCallback(carlaFunc); | |||||
| bool started = carla_engine->init(client_name); | |||||
| bool started = carlaEngine->init(client_name); | |||||
| if (started) | if (started) | ||||
| CarlaBackend::setLastError("no error"); | CarlaBackend::setLastError("no error"); | ||||
| @@ -161,14 +163,14 @@ bool engine_close() | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::engine_close()"); | qDebug("CarlaBackendStandalone::engine_close()"); | ||||
| if (! carla_engine) | |||||
| if (! carlaEngine) | |||||
| { | { | ||||
| CarlaBackend::setLastError("Engine is not started"); | CarlaBackend::setLastError("Engine is not started"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| bool closed = carla_engine->close(); | |||||
| carla_engine->removeAllPlugins(); | |||||
| bool closed = carlaEngine->close(); | |||||
| carlaEngine->removeAllPlugins(); | |||||
| // cleanup static data | // cleanup static data | ||||
| get_plugin_info(0); | get_plugin_info(0); | ||||
| @@ -183,8 +185,8 @@ bool engine_close() | |||||
| CarlaBackend::resetOptions(); | CarlaBackend::resetOptions(); | ||||
| CarlaBackend::setLastError(nullptr); | CarlaBackend::setLastError(nullptr); | ||||
| delete carla_engine; | |||||
| carla_engine = nullptr; | |||||
| delete carlaEngine; | |||||
| carlaEngine = nullptr; | |||||
| return closed; | return closed; | ||||
| } | } | ||||
| @@ -193,7 +195,7 @@ bool is_engine_running() | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::is_engine_running()"); | qDebug("CarlaBackendStandalone::is_engine_running()"); | ||||
| return carla_engine && carla_engine->isRunning(); | |||||
| return carlaEngine && carlaEngine->isRunning(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -202,14 +204,14 @@ short add_plugin(CarlaBackend::BinaryType btype, CarlaBackend::PluginType ptype, | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::add_plugin(%s, %s, \"%s\", \"%s\", \"%s\", %p)", CarlaBackend::BinaryType2str(btype), CarlaBackend::PluginType2str(ptype), filename, name, label, extra_stuff); | qDebug("CarlaBackendStandalone::add_plugin(%s, %s, \"%s\", \"%s\", \"%s\", %p)", CarlaBackend::BinaryType2str(btype), CarlaBackend::PluginType2str(ptype), filename, name, label, extra_stuff); | ||||
| return carla_engine->addPlugin(btype, ptype, filename, name, label, extra_stuff); | |||||
| return carlaEngine->addPlugin(btype, ptype, filename, name, label, extra_stuff); | |||||
| } | } | ||||
| bool remove_plugin(unsigned short plugin_id) | bool remove_plugin(unsigned short plugin_id) | ||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::remove_plugin(%i)", plugin_id); | qDebug("CarlaBackendStandalone::remove_plugin(%i)", plugin_id); | ||||
| return carla_engine->removePlugin(plugin_id); | |||||
| return carlaEngine->removePlugin(plugin_id); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -238,7 +240,7 @@ const PluginInfo* get_plugin_info(unsigned short plugin_id) | |||||
| info.copyright = nullptr; | info.copyright = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -263,7 +265,7 @@ const PluginInfo* get_plugin_info(unsigned short plugin_id) | |||||
| return &info; | return &info; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_plugin_info(%i) - could not find plugin", plugin_id); | qCritical("CarlaBackendStandalone::get_plugin_info(%i) - could not find plugin", plugin_id); | ||||
| return &info; | return &info; | ||||
| @@ -275,7 +277,7 @@ const PortCountInfo* get_audio_port_count_info(unsigned short plugin_id) | |||||
| static PortCountInfo info; | static PortCountInfo info; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -295,7 +297,7 @@ const PortCountInfo* get_midi_port_count_info(unsigned short plugin_id) | |||||
| static PortCountInfo info; | static PortCountInfo info; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -315,7 +317,7 @@ const PortCountInfo* get_parameter_count_info(unsigned short plugin_id) | |||||
| static PortCountInfo info; | static PortCountInfo info; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -351,7 +353,7 @@ const ParameterInfo* get_parameter_info(unsigned short plugin_id, quint32 parame | |||||
| info.unit = nullptr; | info.unit = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -376,7 +378,7 @@ const ParameterInfo* get_parameter_info(unsigned short plugin_id, quint32 parame | |||||
| return &info; | return &info; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_parameter_info(%i, %i) - could not find plugin", plugin_id, parameter_id); | qCritical("CarlaBackendStandalone::get_parameter_info(%i, %i) - could not find plugin", plugin_id, parameter_id); | ||||
| return &info; | return &info; | ||||
| @@ -394,7 +396,7 @@ const ScalePointInfo* get_parameter_scalepoint_info(unsigned short plugin_id, qu | |||||
| info.label = nullptr; | info.label = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -418,7 +420,7 @@ const ScalePointInfo* get_parameter_scalepoint_info(unsigned short plugin_id, qu | |||||
| return &info; | return &info; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_parameter_scalepoint_info(%i, %i, %i) - could not find plugin", plugin_id, parameter_id, scalepoint_id); | qCritical("CarlaBackendStandalone::get_parameter_scalepoint_info(%i, %i, %i) - could not find plugin", plugin_id, parameter_id, scalepoint_id); | ||||
| return &info; | return &info; | ||||
| @@ -430,7 +432,7 @@ const GuiInfo* get_gui_info(unsigned short plugin_id) | |||||
| static GuiInfo info; | static GuiInfo info; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -450,7 +452,7 @@ const CarlaBackend::ParameterData* get_parameter_data(unsigned short plugin_id, | |||||
| static CarlaBackend::ParameterData data; | static CarlaBackend::ParameterData data; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -471,7 +473,7 @@ const CarlaBackend::ParameterRanges* get_parameter_ranges(unsigned short plugin_ | |||||
| static CarlaBackend::ParameterRanges ranges; | static CarlaBackend::ParameterRanges ranges; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -492,7 +494,7 @@ const CarlaBackend::midi_program_t* get_midi_program_data(unsigned short plugin_ | |||||
| static CarlaBackend::midi_program_t data; | static CarlaBackend::midi_program_t data; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -513,7 +515,7 @@ const CarlaBackend::CustomData* get_custom_data(unsigned short plugin_id, quint3 | |||||
| static CarlaBackend::CustomData data; | static CarlaBackend::CustomData data; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -540,7 +542,7 @@ const char* get_chunk_data(unsigned short plugin_id) | |||||
| chunk_data = nullptr; | chunk_data = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -563,7 +565,7 @@ const char* get_chunk_data(unsigned short plugin_id) | |||||
| return chunk_data; | return chunk_data; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_chunk_data(%i) - could not find plugin", plugin_id); | qCritical("CarlaBackendStandalone::get_chunk_data(%i) - could not find plugin", plugin_id); | ||||
| return nullptr; | return nullptr; | ||||
| @@ -575,7 +577,7 @@ uint32_t get_parameter_count(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_parameter_count(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_parameter_count(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->parameterCount(); | return plugin->parameterCount(); | ||||
| @@ -588,7 +590,7 @@ uint32_t get_program_count(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_program_count(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_program_count(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->programCount(); | return plugin->programCount(); | ||||
| @@ -601,7 +603,7 @@ uint32_t get_midi_program_count(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_midi_program_count(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_midi_program_count(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->midiProgramCount(); | return plugin->midiProgramCount(); | ||||
| @@ -614,7 +616,7 @@ uint32_t get_custom_data_count(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_custom_data_count(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_custom_data_count(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->customDataCount(); | return plugin->customDataCount(); | ||||
| @@ -632,7 +634,7 @@ const char* get_parameter_text(unsigned short plugin_id, quint32 parameter_id) | |||||
| static char buf_text[STR_MAX] = { 0 }; | static char buf_text[STR_MAX] = { 0 }; | ||||
| memset(buf_text, 0, sizeof(char)*STR_MAX); | memset(buf_text, 0, sizeof(char)*STR_MAX); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -646,7 +648,7 @@ const char* get_parameter_text(unsigned short plugin_id, quint32 parameter_id) | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_parameter_text(%i, %i) - could not find plugin", plugin_id, parameter_id); | qCritical("CarlaBackendStandalone::get_parameter_text(%i, %i) - could not find plugin", plugin_id, parameter_id); | ||||
| return nullptr; | return nullptr; | ||||
| @@ -664,7 +666,7 @@ const char* get_program_name(unsigned short plugin_id, quint32 program_id) | |||||
| program_name = nullptr; | program_name = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -682,7 +684,7 @@ const char* get_program_name(unsigned short plugin_id, quint32 program_id) | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_program_name(%i, %i) - could not find plugin", plugin_id, program_id); | qCritical("CarlaBackendStandalone::get_program_name(%i, %i) - could not find plugin", plugin_id, program_id); | ||||
| return nullptr; | return nullptr; | ||||
| @@ -699,7 +701,7 @@ const char* get_midi_program_name(unsigned short plugin_id, quint32 midi_program | |||||
| midi_program_name = nullptr; | midi_program_name = nullptr; | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -717,7 +719,7 @@ const char* get_midi_program_name(unsigned short plugin_id, quint32 midi_program | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_midi_program_name(%i, %i) - could not find plugin", plugin_id, midi_program_id); | qCritical("CarlaBackendStandalone::get_midi_program_name(%i, %i) - could not find plugin", plugin_id, midi_program_id); | ||||
| return nullptr; | return nullptr; | ||||
| @@ -735,7 +737,7 @@ const char* get_real_plugin_name(unsigned short plugin_id) | |||||
| real_plugin_name = nullptr; | real_plugin_name = nullptr; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -747,7 +749,7 @@ const char* get_real_plugin_name(unsigned short plugin_id) | |||||
| return real_plugin_name; | return real_plugin_name; | ||||
| } | } | ||||
| if (carla_engine->isRunning()) | |||||
| if (carlaEngine->isRunning()) | |||||
| qCritical("CarlaBackendStandalone::get_real_plugin_name(%i) - could not find plugin", plugin_id); | qCritical("CarlaBackendStandalone::get_real_plugin_name(%i) - could not find plugin", plugin_id); | ||||
| return real_plugin_name; | return real_plugin_name; | ||||
| @@ -759,7 +761,7 @@ qint32 get_current_program_index(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_current_program_index(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_current_program_index(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->currentProgram(); | return plugin->currentProgram(); | ||||
| @@ -772,7 +774,7 @@ qint32 get_current_midi_program_index(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_current_midi_program_index(%i)", plugin_id); | qDebug("CarlaBackendStandalone::get_current_midi_program_index(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->currentMidiProgram(); | return plugin->currentMidiProgram(); | ||||
| @@ -787,7 +789,7 @@ double get_default_parameter_value(unsigned short plugin_id, quint32 parameter_i | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_default_parameter_value(%i, %i)", plugin_id, parameter_id); | qDebug("CarlaBackendStandalone::get_default_parameter_value(%i, %i)", plugin_id, parameter_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -806,7 +808,7 @@ double get_current_parameter_value(unsigned short plugin_id, quint32 parameter_i | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_current_parameter_value(%i, %i)", plugin_id, parameter_id); | qDebug("CarlaBackendStandalone::get_current_parameter_value(%i, %i)", plugin_id, parameter_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -826,7 +828,7 @@ double get_current_parameter_value(unsigned short plugin_id, quint32 parameter_i | |||||
| double get_input_peak_value(unsigned short plugin_id, unsigned short port_id) | double get_input_peak_value(unsigned short plugin_id, unsigned short port_id) | ||||
| { | { | ||||
| if (plugin_id < CarlaBackend::MAX_PLUGINS && (port_id == 1 || port_id == 2)) | if (plugin_id < CarlaBackend::MAX_PLUGINS && (port_id == 1 || port_id == 2)) | ||||
| return carla_engine->getInputPeak(plugin_id, port_id-1); | |||||
| return carlaEngine->getInputPeak(plugin_id, port_id-1); | |||||
| qCritical("CarlaBackendStandalone::get_input_peak_value(%i, %i) - invalid plugin or port value", plugin_id, port_id); | qCritical("CarlaBackendStandalone::get_input_peak_value(%i, %i) - invalid plugin or port value", plugin_id, port_id); | ||||
| return 0.0; | return 0.0; | ||||
| @@ -835,7 +837,7 @@ double get_input_peak_value(unsigned short plugin_id, unsigned short port_id) | |||||
| double get_output_peak_value(unsigned short plugin_id, unsigned short port_id) | double get_output_peak_value(unsigned short plugin_id, unsigned short port_id) | ||||
| { | { | ||||
| if (plugin_id < CarlaBackend::MAX_PLUGINS && (port_id == 1 || port_id == 2)) | if (plugin_id < CarlaBackend::MAX_PLUGINS && (port_id == 1 || port_id == 2)) | ||||
| return carla_engine->getOutputPeak(plugin_id, port_id-1); | |||||
| return carlaEngine->getOutputPeak(plugin_id, port_id-1); | |||||
| qCritical("CarlaBackendStandalone::get_output_peak_value(%i, %i) - invalid plugin or port value", plugin_id, port_id); | qCritical("CarlaBackendStandalone::get_output_peak_value(%i, %i) - invalid plugin or port value", plugin_id, port_id); | ||||
| return 0.0; | return 0.0; | ||||
| @@ -847,7 +849,7 @@ void set_active(unsigned short plugin_id, bool onoff) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_active(%i, %s)", plugin_id, bool2str(onoff)); | qDebug("CarlaBackendStandalone::set_active(%i, %s)", plugin_id, bool2str(onoff)); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setActive(onoff, true, false); | return plugin->setActive(onoff, true, false); | ||||
| @@ -859,7 +861,7 @@ void set_drywet(unsigned short plugin_id, double value) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_drywet(%i, %g)", plugin_id, value); | qDebug("CarlaBackendStandalone::set_drywet(%i, %g)", plugin_id, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setDryWet(value, true, false); | return plugin->setDryWet(value, true, false); | ||||
| @@ -871,7 +873,7 @@ void set_volume(unsigned short plugin_id, double value) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_volume(%i, %g)", plugin_id, value); | qDebug("CarlaBackendStandalone::set_volume(%i, %g)", plugin_id, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setVolume(value, true, false); | return plugin->setVolume(value, true, false); | ||||
| @@ -883,7 +885,7 @@ void set_balance_left(unsigned short plugin_id, double value) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_balance_left(%i, %g)", plugin_id, value); | qDebug("CarlaBackendStandalone::set_balance_left(%i, %g)", plugin_id, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setBalanceLeft(value, true, false); | return plugin->setBalanceLeft(value, true, false); | ||||
| @@ -895,7 +897,7 @@ void set_balance_right(unsigned short plugin_id, double value) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_balance_right(%i, %g)", plugin_id, value); | qDebug("CarlaBackendStandalone::set_balance_right(%i, %g)", plugin_id, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setBalanceRight(value, true, false); | return plugin->setBalanceRight(value, true, false); | ||||
| @@ -909,7 +911,7 @@ void set_parameter_value(unsigned short plugin_id, quint32 parameter_id, double | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_parameter_value(%i, %i, %g)", plugin_id, parameter_id, value); | qDebug("CarlaBackendStandalone::set_parameter_value(%i, %i, %g)", plugin_id, parameter_id, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -933,7 +935,7 @@ void set_parameter_midi_channel(unsigned short plugin_id, quint32 parameter_id, | |||||
| return; | return; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -961,7 +963,7 @@ void set_parameter_midi_cc(unsigned short plugin_id, quint32 parameter_id, int16 | |||||
| return; | return; | ||||
| } | } | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -979,7 +981,7 @@ void set_program(unsigned short plugin_id, quint32 program_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_program(%i, %i)", plugin_id, program_id); | qDebug("CarlaBackendStandalone::set_program(%i, %i)", plugin_id, program_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -997,7 +999,7 @@ void set_midi_program(unsigned short plugin_id, quint32 midi_program_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_midi_program(%i, %i)", plugin_id, midi_program_id); | qDebug("CarlaBackendStandalone::set_midi_program(%i, %i)", plugin_id, midi_program_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -1017,7 +1019,7 @@ void set_custom_data(unsigned short plugin_id, CarlaBackend::CustomDataType type | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_custom_data(%i, %i, \"%s\", \"%s\")", plugin_id, type, key, value); | qDebug("CarlaBackendStandalone::set_custom_data(%i, %i, \"%s\", \"%s\")", plugin_id, type, key, value); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->setCustomData(type, key, value, true); | return plugin->setCustomData(type, key, value, true); | ||||
| @@ -1029,7 +1031,7 @@ void set_chunk_data(unsigned short plugin_id, const char* chunk_data) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_chunk_data(%i, \"%s\")", plugin_id, chunk_data); | qDebug("CarlaBackendStandalone::set_chunk_data(%i, \"%s\")", plugin_id, chunk_data); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -1047,7 +1049,7 @@ void set_gui_data(unsigned short plugin_id, int data, quintptr gui_addr) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_gui_data(%i, %i, " P_UINTPTR ")", plugin_id, data, gui_addr); | qDebug("CarlaBackendStandalone::set_gui_data(%i, %i, " P_UINTPTR ")", plugin_id, data, gui_addr); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| { | { | ||||
| @@ -1068,7 +1070,7 @@ void show_gui(unsigned short plugin_id, bool yesno) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::show_gui(%i, %s)", plugin_id, bool2str(yesno)); | qDebug("CarlaBackendStandalone::show_gui(%i, %s)", plugin_id, bool2str(yesno)); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->showGui(yesno); | return plugin->showGui(yesno); | ||||
| @@ -1078,7 +1080,7 @@ void show_gui(unsigned short plugin_id, bool yesno) | |||||
| void idle_guis() | void idle_guis() | ||||
| { | { | ||||
| carla_engine->idlePluginGuis(); | |||||
| carlaEngine->idlePluginGuis(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -1087,7 +1089,7 @@ void send_midi_note(unsigned short plugin_id, quint8 channel, quint8 note, quint | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::send_midi_note(%i, %i, %i, %i)", plugin_id, channel, note, velocity); | qDebug("CarlaBackendStandalone::send_midi_note(%i, %i, %i, %i)", plugin_id, channel, note, velocity); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->sendMidiSingleNote(channel, note, velocity, true, true, false); | return plugin->sendMidiSingleNote(channel, note, velocity, true, true, false); | ||||
| @@ -1099,7 +1101,7 @@ void prepare_for_save(unsigned short plugin_id) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::prepare_for_save(%i)", plugin_id); | qDebug("CarlaBackendStandalone::prepare_for_save(%i)", plugin_id); | ||||
| CarlaBackend::CarlaPlugin* const plugin = carla_engine->getPlugin(plugin_id); | |||||
| CarlaBackend::CarlaPlugin* const plugin = carlaEngine->getPlugin(plugin_id); | |||||
| if (plugin) | if (plugin) | ||||
| return plugin->prepareForSave(); | return plugin->prepareForSave(); | ||||
| @@ -1113,14 +1115,14 @@ quint32 get_buffer_size() | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_buffer_size()"); | qDebug("CarlaBackendStandalone::get_buffer_size()"); | ||||
| return carla_engine->getBufferSize(); | |||||
| return carlaEngine->getBufferSize(); | |||||
| } | } | ||||
| double get_sample_rate() | double get_sample_rate() | ||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_sample_rate()"); | qDebug("CarlaBackendStandalone::get_sample_rate()"); | ||||
| return carla_engine->getSampleRate(); | |||||
| return carlaEngine->getSampleRate(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -1134,7 +1136,7 @@ const char* get_host_osc_url() | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::get_host_osc_url()"); | qDebug("CarlaBackendStandalone::get_host_osc_url()"); | ||||
| return carla_engine->getOscServerPath(); | |||||
| return carlaEngine->getOscServerPath(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------------------------------------------------------- | // ------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -1143,10 +1145,10 @@ void set_callback_function(CarlaBackend::CallbackFunc func) | |||||
| { | { | ||||
| qDebug("CarlaBackendStandalone::set_callback_function(%p)", func); | qDebug("CarlaBackendStandalone::set_callback_function(%p)", func); | ||||
| carla_func = func; | |||||
| carlaFunc = func; | |||||
| if (carla_engine) | |||||
| carla_engine->setCallback(func); | |||||
| if (carlaEngine) | |||||
| carlaEngine->setCallback(func); | |||||
| } | } | ||||
| void set_option(CarlaBackend::OptionsType option, int value, const char* valueStr) | void set_option(CarlaBackend::OptionsType option, int value, const char* valueStr) | ||||
| @@ -1094,9 +1094,9 @@ void CarlaEngine::osc_send_set_midi_program_data(int plugin_id, int midi_program | |||||
| } | } | ||||
| } | } | ||||
| void CarlaEngine::osc_send_note_on(int plugin_id, int note, int velo) | |||||
| void CarlaEngine::osc_send_note_on(int plugin_id, int channel, int note, int velo) | |||||
| { | { | ||||
| qDebug("CarlaEngine::osc_send_note_on(%i, %i, %i)", plugin_id, note, velo); | |||||
| qDebug("CarlaEngine::osc_send_note_on(%i, %i, %i, %i)", plugin_id, channel, note, velo); | |||||
| const CarlaOscData* const oscData = m_osc.getControllerData(); | const CarlaOscData* const oscData = m_osc.getControllerData(); | ||||
| if (oscData->target) | if (oscData->target) | ||||
| @@ -1104,13 +1104,13 @@ void CarlaEngine::osc_send_note_on(int plugin_id, int note, int velo) | |||||
| char target_path[strlen(oscData->path)+9]; | char target_path[strlen(oscData->path)+9]; | ||||
| strcpy(target_path, oscData->path); | strcpy(target_path, oscData->path); | ||||
| strcat(target_path, "/note_on"); | strcat(target_path, "/note_on"); | ||||
| lo_send(oscData->target, target_path, "iii", plugin_id, note, velo); | |||||
| lo_send(oscData->target, target_path, "iiii", plugin_id, channel, note, velo); | |||||
| } | } | ||||
| } | } | ||||
| void CarlaEngine::osc_send_note_off(int plugin_id, int note) | |||||
| void CarlaEngine::osc_send_note_off(int plugin_id, int channel, int note) | |||||
| { | { | ||||
| qDebug("CarlaEngine::osc_send_note_off(%i, %i)", plugin_id, note); | |||||
| qDebug("CarlaEngine::osc_send_note_off(%i, %i, %i)", plugin_id, channel, note); | |||||
| const CarlaOscData* const oscData = m_osc.getControllerData(); | const CarlaOscData* const oscData = m_osc.getControllerData(); | ||||
| if (oscData->target) | if (oscData->target) | ||||
| @@ -1118,7 +1118,7 @@ void CarlaEngine::osc_send_note_off(int plugin_id, int note) | |||||
| char target_path[strlen(oscData->path)+10]; | char target_path[strlen(oscData->path)+10]; | ||||
| strcpy(target_path, oscData->path); | strcpy(target_path, oscData->path); | ||||
| strcat(target_path, "/note_off"); | strcat(target_path, "/note_off"); | ||||
| lo_send(oscData->target, target_path, "ii", plugin_id, note); | |||||
| lo_send(oscData->target, target_path, "iii", plugin_id, channel, note); | |||||
| } | } | ||||
| } | } | ||||
| @@ -140,8 +140,6 @@ struct CarlaEnginePortNativeHandle { | |||||
| class CarlaEngineClient; | class CarlaEngineClient; | ||||
| class CarlaEngineBasePort; | class CarlaEngineBasePort; | ||||
| Q_COMPILER_INITIALIZER_LISTS | |||||
| /*! | /*! | ||||
| * \class CarlaEngine | * \class CarlaEngine | ||||
| * | * | ||||
| @@ -333,8 +331,8 @@ public: | |||||
| void osc_send_set_midi_program_data(int plugin_id, int midi_program_id, int bank_id, int program_id, const char* midi_program_name); | void osc_send_set_midi_program_data(int plugin_id, int midi_program_id, int bank_id, int program_id, const char* midi_program_name); | ||||
| void osc_send_set_input_peak_value(int plugin_id, int port_id, double value); | void osc_send_set_input_peak_value(int plugin_id, int port_id, double value); | ||||
| void osc_send_set_output_peak_value(int plugin_id, int port_id, double value); | void osc_send_set_output_peak_value(int plugin_id, int port_id, double value); | ||||
| void osc_send_note_on(int plugin_id, int note, int velo); | |||||
| void osc_send_note_off(int plugin_id, int note); | |||||
| void osc_send_note_on(int plugin_id, int channel, int note, int velo); | |||||
| void osc_send_note_off(int plugin_id, int channel, int note); | |||||
| void osc_send_exit(); | void osc_send_exit(); | ||||
| #ifndef BUILD_BRIDGE | #ifndef BUILD_BRIDGE | ||||
| @@ -93,11 +93,11 @@ enum PluginBridgeInfoType { | |||||
| enum PluginPostEventType { | enum PluginPostEventType { | ||||
| PluginPostEventNull, | PluginPostEventNull, | ||||
| PluginPostEventDebug, | PluginPostEventDebug, | ||||
| PluginPostEventParameterChange, | |||||
| PluginPostEventProgramChange, | |||||
| PluginPostEventMidiProgramChange, | |||||
| PluginPostEventNoteOn, | |||||
| PluginPostEventNoteOff | |||||
| PluginPostEventParameterChange, // param, N, value | |||||
| PluginPostEventProgramChange, // index | |||||
| PluginPostEventMidiProgramChange, // index | |||||
| PluginPostEventNoteOn, // channel, note, velo | |||||
| PluginPostEventNoteOff // channel, note | |||||
| }; | }; | ||||
| struct PluginAudioData { | struct PluginAudioData { | ||||
| @@ -159,13 +159,15 @@ struct PluginMidiProgramData { | |||||
| struct PluginPostEvent { | struct PluginPostEvent { | ||||
| PluginPostEventType type; | PluginPostEventType type; | ||||
| int32_t index; | |||||
| double value; | |||||
| int32_t value1; | |||||
| int32_t value2; | |||||
| double value3; | |||||
| PluginPostEvent() | PluginPostEvent() | ||||
| : type(PluginPostEventNull), | : type(PluginPostEventNull), | ||||
| index(-1), | |||||
| value(0.0) {} | |||||
| value1(-1), | |||||
| value2(-1), | |||||
| value3(0.0) {} | |||||
| }; | }; | ||||
| struct ExternalMidiNote { | struct ExternalMidiNote { | ||||
| @@ -1582,18 +1584,17 @@ public: | |||||
| if (sendOsc) | if (sendOsc) | ||||
| { | { | ||||
| if (velo) | if (velo) | ||||
| x_engine->osc_send_note_on(m_id, note, velo); | |||||
| x_engine->osc_send_note_on(m_id, channel, note, velo); | |||||
| else | else | ||||
| x_engine->osc_send_note_off(m_id, note); | |||||
| x_engine->osc_send_note_off(m_id, channel, note); | |||||
| if (m_hints & PLUGIN_IS_BRIDGE) | if (m_hints & PLUGIN_IS_BRIDGE) | ||||
| { | { | ||||
| uint8_t mdata[4] = { 0 }; | |||||
| mdata[1] = velo ? MIDI_STATUS_NOTE_ON : MIDI_STATUS_NOTE_OFF; | |||||
| mdata[2] = note; | |||||
| mdata[3] = velo; | |||||
| osc_send_midi(&osc.data, mdata); | |||||
| uint8_t midiData[4] = { 0 }; | |||||
| midiData[1] = (velo ? MIDI_STATUS_NOTE_ON : MIDI_STATUS_NOTE_OFF) + channel; | |||||
| midiData[2] = note; | |||||
| midiData[3] = velo; | |||||
| osc_send_midi(&osc.data, midiData); | |||||
| } | } | ||||
| } | } | ||||
| #else | #else | ||||
| @@ -1639,8 +1640,9 @@ public: | |||||
| extMidiNotes[i].velo = 0; | extMidiNotes[i].velo = 0; | ||||
| postEvents.data[i + postPad].type = PluginPostEventNoteOff; | postEvents.data[i + postPad].type = PluginPostEventNoteOff; | ||||
| postEvents.data[i + postPad].index = i; | |||||
| postEvents.data[i + postPad].value = 0.0; | |||||
| postEvents.data[i + postPad].value1 = i; | |||||
| postEvents.data[i + postPad].value2 = 0; | |||||
| postEvents.data[i + postPad].value3 = 0.0; | |||||
| } | } | ||||
| postEvents.mutex.unlock(); | postEvents.mutex.unlock(); | ||||
| @@ -1654,16 +1656,17 @@ public: | |||||
| * Post pone an event of type \a type.\n | * Post pone an event of type \a type.\n | ||||
| * The event will be processed later in a high-priority thread (but not the main one). | * The event will be processed later in a high-priority thread (but not the main one). | ||||
| */ | */ | ||||
| void postponeEvent(PluginPostEventType type, int32_t index, double value) | |||||
| void postponeEvent(PluginPostEventType type, int32_t value1, int32_t value2, double value3) | |||||
| { | { | ||||
| postEvents.mutex.lock(); | postEvents.mutex.lock(); | ||||
| for (unsigned short i=0; i < MAX_POST_EVENTS; i++) | for (unsigned short i=0; i < MAX_POST_EVENTS; i++) | ||||
| { | { | ||||
| if (postEvents.data[i].type == PluginPostEventNull) | if (postEvents.data[i].type == PluginPostEventNull) | ||||
| { | { | ||||
| postEvents.data[i].type = type; | |||||
| postEvents.data[i].index = index; | |||||
| postEvents.data[i].value = value; | |||||
| postEvents.data[i].type = type; | |||||
| postEvents.data[i].value1 = value1; | |||||
| postEvents.data[i].value2 = value2; | |||||
| postEvents.data[i].value3 = value3; | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1695,94 +1698,92 @@ public: | |||||
| return; | return; | ||||
| case PluginPostEventDebug: | case PluginPostEventDebug: | ||||
| x_engine->callback(CALLBACK_DEBUG, m_id, event->index, 0, event->value); | |||||
| x_engine->callback(CALLBACK_DEBUG, m_id, event->value1, event->value2, event->value3); | |||||
| break; | break; | ||||
| case PluginPostEventParameterChange: | case PluginPostEventParameterChange: | ||||
| // Update OSC based UIs | // Update OSC based UIs | ||||
| m_needsParamUpdate = true; | m_needsParamUpdate = true; | ||||
| osc_send_control(&osc.data, event->index, event->value); | |||||
| osc_send_control(&osc.data, event->value1, event->value3); | |||||
| // Update OSC control client | // Update OSC control client | ||||
| x_engine->osc_send_set_parameter_value(m_id, event->index, event->value); | |||||
| x_engine->osc_send_set_parameter_value(m_id, event->value1, event->value3); | |||||
| // Update Host | // Update Host | ||||
| x_engine->callback(CALLBACK_PARAMETER_CHANGED, m_id, event->index, 0, event->value); | |||||
| x_engine->callback(CALLBACK_PARAMETER_CHANGED, m_id, event->value1, 0, event->value3); | |||||
| break; | break; | ||||
| case PluginPostEventProgramChange: | case PluginPostEventProgramChange: | ||||
| // Update OSC based UIs | // Update OSC based UIs | ||||
| m_needsProgUpdate = true; | m_needsProgUpdate = true; | ||||
| osc_send_program(&osc.data, event->index); | |||||
| osc_send_program(&osc.data, event->value1); | |||||
| // Update OSC control client | // Update OSC control client | ||||
| x_engine->osc_send_set_program(m_id, event->index); | |||||
| x_engine->osc_send_set_program(m_id, event->value1); | |||||
| for (uint32_t j=0; j < param.count; j++) | for (uint32_t j=0; j < param.count; j++) | ||||
| x_engine->osc_send_set_default_value(m_id, j, param.ranges[j].def); | x_engine->osc_send_set_default_value(m_id, j, param.ranges[j].def); | ||||
| // Update Host | // Update Host | ||||
| x_engine->callback(CALLBACK_PROGRAM_CHANGED, m_id, event->index, 0, 0.0); | |||||
| x_engine->callback(CALLBACK_PROGRAM_CHANGED, m_id, event->value1, 0, 0.0); | |||||
| break; | break; | ||||
| case PluginPostEventMidiProgramChange: | case PluginPostEventMidiProgramChange: | ||||
| //if (event->index < (int32_t)midiprog.count) | |||||
| //{ | |||||
| //if (event->index >= 0) | |||||
| //{ | |||||
| //const midi_program_t* const midiprog = plugin->midiProgramData(postEvents[j].index); | |||||
| // Update OSC based UIs | |||||
| //osc_send_midi_program(osc_data, midiprog->bank, midiprog->program, (plugin->type() == PLUGIN_DSSI)); | |||||
| //} | |||||
| // Update OSC based UIs | // Update OSC based UIs | ||||
| m_needsProgUpdate = true; | m_needsProgUpdate = true; | ||||
| osc_send_midi_program(&osc.data, event->index); | |||||
| if (m_type == PLUGIN_DSSI) | |||||
| { | |||||
| if (event->value1 >= 0 && event->value1 < (int32_t)midiprog.count) | |||||
| osc_send_program(&osc.data, midiprog.data[event->value1].bank, midiprog.data[event->value1].program); | |||||
| } | |||||
| else | |||||
| osc_send_midi_program(&osc.data, event->value1); | |||||
| // Update OSC control client | // Update OSC control client | ||||
| x_engine->osc_send_set_midi_program(m_id, event->index); | |||||
| x_engine->osc_send_set_midi_program(m_id, event->value1); | |||||
| for (uint32_t j=0; j < param.count; j++) | for (uint32_t j=0; j < param.count; j++) | ||||
| x_engine->osc_send_set_default_value(m_id, j, param.ranges[j].def); | x_engine->osc_send_set_default_value(m_id, j, param.ranges[j].def); | ||||
| // Update Host | // Update Host | ||||
| x_engine->callback(CALLBACK_MIDI_PROGRAM_CHANGED, m_id, event->index, 0, 0.0); | |||||
| x_engine->callback(CALLBACK_MIDI_PROGRAM_CHANGED, m_id, event->value1, 0, 0.0); | |||||
| //} | //} | ||||
| break; | break; | ||||
| case PluginPostEventNoteOn: | case PluginPostEventNoteOn: | ||||
| // Update OSC based UIs | // Update OSC based UIs | ||||
| if (cin_channel >= 0 && cin_channel < 16) | |||||
| if (true) | |||||
| { | { | ||||
| uint8_t mdata[4] = { 0 }; | |||||
| mdata[1] = MIDI_STATUS_NOTE_ON + cin_channel; | |||||
| mdata[2] = event->index; | |||||
| mdata[3] = rint(event->value); | |||||
| osc_send_midi(&osc.data, mdata); | |||||
| uint8_t midiData[4] = { 0 }; | |||||
| midiData[1] = MIDI_STATUS_NOTE_ON + event->value1; | |||||
| midiData[2] = event->value2; | |||||
| midiData[3] = rint(event->value3); | |||||
| osc_send_midi(&osc.data, midiData); | |||||
| } | } | ||||
| // Update OSC control client | // Update OSC control client | ||||
| x_engine->osc_send_note_on(m_id, event->index, event->value); | |||||
| x_engine->osc_send_note_on(m_id, event->value1, event->value2, event->value3); | |||||
| // Update Host | // Update Host | ||||
| x_engine->callback(CALLBACK_NOTE_ON, m_id, event->index, rint(event->value), 0.0); | |||||
| x_engine->callback(CALLBACK_NOTE_ON, m_id, event->value1, event->value2, event->value3); | |||||
| break; | break; | ||||
| case PluginPostEventNoteOff: | case PluginPostEventNoteOff: | ||||
| // Update OSC based UIs | // Update OSC based UIs | ||||
| if (cin_channel >= 0 && cin_channel < 16) | |||||
| if (true) | |||||
| { | { | ||||
| uint8_t mdata[4] = { 0 }; | |||||
| mdata[1] = MIDI_STATUS_NOTE_OFF + cin_channel; | |||||
| mdata[2] = event->index; | |||||
| osc_send_midi(&osc.data, mdata); | |||||
| uint8_t midiData[4] = { 0 }; | |||||
| midiData[1] = MIDI_STATUS_NOTE_OFF + event->value1; | |||||
| midiData[2] = event->value2; | |||||
| osc_send_midi(&osc.data, midiData); | |||||
| } | } | ||||
| // Update OSC control client | // Update OSC control client | ||||
| x_engine->osc_send_note_off(m_id, event->index); | |||||
| x_engine->osc_send_note_off(m_id, event->value1, event->value2); | |||||
| // Update Host | // Update Host | ||||
| x_engine->callback(CALLBACK_NOTE_OFF, m_id, event->index, 0, 0.0); | |||||
| x_engine->callback(CALLBACK_NOTE_OFF, m_id, event->value1, event->value2, 0.0); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -866,7 +866,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value; | value = cinEvent->value; | ||||
| setDryWet(value, false, false); | setDryWet(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -874,7 +874,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value*127/100; | value = cinEvent->value*127/100; | ||||
| setVolume(value, false, false); | setVolume(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -901,8 +901,8 @@ public: | |||||
| setBalanceLeft(left, false, false); | setBalanceLeft(left, false, false); | ||||
| setBalanceRight(right, false, false); | setBalanceRight(right, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, right); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| @@ -932,7 +932,7 @@ public: | |||||
| } | } | ||||
| setParameterValue(k, value, false, false, false); | setParameterValue(k, value, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, value); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, value); | |||||
| } | } | ||||
| } | } | ||||
| @@ -954,7 +954,7 @@ public: | |||||
| if (midiprog.data[k].bank == nextBankId && midiprog.data[k].program == nextProgramId) | if (midiprog.data[k].bank == nextBankId && midiprog.data[k].program == nextProgramId) | ||||
| { | { | ||||
| setMidiProgram(k, false, false, false, false); | setMidiProgram(k, false, false, false, false); | ||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0.0); | |||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0, 0.0); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1069,7 +1069,7 @@ public: | |||||
| midiEvent->data.note.note = note; | midiEvent->data.note.note = note; | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOff, note, 0.0); | |||||
| postponeEvent(PluginPostEventNoteOff, channel, note, 0.0); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| { | { | ||||
| @@ -1082,7 +1082,7 @@ public: | |||||
| midiEvent->data.note.velocity = velo; | midiEvent->data.note.velocity = velo; | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOn, note, velo); | |||||
| postponeEvent(PluginPostEventNoteOn, channel, note, velo); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status)) | else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status)) | ||||
| { | { | ||||
| @@ -860,7 +860,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value; | value = cinEvent->value; | ||||
| setDryWet(value, false, false); | setDryWet(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -868,7 +868,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value*127/100; | value = cinEvent->value*127/100; | ||||
| setVolume(value, false, false); | setVolume(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -895,8 +895,8 @@ public: | |||||
| setBalanceLeft(left, false, false); | setBalanceLeft(left, false, false); | ||||
| setBalanceRight(right, false, false); | setBalanceRight(right, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, right); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| @@ -926,7 +926,7 @@ public: | |||||
| } | } | ||||
| setParameterValue(k, value, false, false, false); | setParameterValue(k, value, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, value); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, value); | |||||
| } | } | ||||
| } | } | ||||
| @@ -951,7 +951,7 @@ public: | |||||
| if (cinEvent->channel == cin_channel) | if (cinEvent->channel == cin_channel) | ||||
| { | { | ||||
| setMidiProgram(k, false, false, false, false); | setMidiProgram(k, false, false, false, false); | ||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0.0); | |||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0, 0.0); | |||||
| } | } | ||||
| else | else | ||||
| fluid_synth_program_select(f_synth, cinEvent->channel, f_id, bankId, progId); | fluid_synth_program_select(f_synth, cinEvent->channel, f_id, bankId, progId); | ||||
| @@ -1066,7 +1066,7 @@ public: | |||||
| fluid_synth_noteoff(f_synth, channel, note); | fluid_synth_noteoff(f_synth, channel, note); | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOff, note, 0.0); | |||||
| postponeEvent(PluginPostEventNoteOff, channel, note, 0.0); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| { | { | ||||
| @@ -1076,7 +1076,7 @@ public: | |||||
| fluid_synth_noteon(f_synth, channel, note, velo); | fluid_synth_noteon(f_synth, channel, note, velo); | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOn, note, velo); | |||||
| postponeEvent(PluginPostEventNoteOn, channel, note, velo); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_AFTERTOUCH(status)) | else if (MIDI_IS_STATUS_AFTERTOUCH(status)) | ||||
| { | { | ||||
| @@ -715,7 +715,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value; | value = cinEvent->value; | ||||
| setDryWet(value, false, false); | setDryWet(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -723,7 +723,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value*127/100; | value = cinEvent->value*127/100; | ||||
| setVolume(value, false, false); | setVolume(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -750,8 +750,8 @@ public: | |||||
| setBalanceLeft(left, false, false); | setBalanceLeft(left, false, false); | ||||
| setBalanceRight(right, false, false); | setBalanceRight(right, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, right); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| @@ -781,7 +781,7 @@ public: | |||||
| } | } | ||||
| setParameterValue(k, value, false, false, false); | setParameterValue(k, value, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, value); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, value); | |||||
| } | } | ||||
| } | } | ||||
| @@ -341,7 +341,7 @@ public: | |||||
| midiInputPort->DispatchNoteOff(note, 0, channel, time); | midiInputPort->DispatchNoteOff(note, 0, channel, time); | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOff, note, 0.0); | |||||
| postponeEvent(PluginPostEventNoteOff, channel, note, 0.0); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| { | { | ||||
| @@ -351,7 +351,7 @@ public: | |||||
| midiInputPort->DispatchNoteOn(note, velo, channel, time); | midiInputPort->DispatchNoteOn(note, velo, channel, time); | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOn, note, velo); | |||||
| postponeEvent(PluginPostEventNoteOn, channel, note, velo); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_AFTERTOUCH(status)) | else if (MIDI_IS_STATUS_AFTERTOUCH(status)) | ||||
| { | { | ||||
| @@ -1761,7 +1761,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value; | value = cinEvent->value; | ||||
| setDryWet(value, false, false); | setDryWet(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -1769,7 +1769,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value*127/100; | value = cinEvent->value*127/100; | ||||
| setVolume(value, false, false); | setVolume(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -1796,8 +1796,8 @@ public: | |||||
| setBalanceLeft(left, false, false); | setBalanceLeft(left, false, false); | ||||
| setBalanceRight(right, false, false); | setBalanceRight(right, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, right); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| @@ -1827,7 +1827,7 @@ public: | |||||
| } | } | ||||
| setParameterValue(k, value, false, false, false); | setParameterValue(k, value, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, value); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, value); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1849,7 +1849,7 @@ public: | |||||
| if (midiprog.data[k].bank == nextBankId && midiprog.data[k].program == nextProgramId) | if (midiprog.data[k].bank == nextBankId && midiprog.data[k].program == nextProgramId) | ||||
| { | { | ||||
| setMidiProgram(k, false, false, false, false); | setMidiProgram(k, false, false, false, false); | ||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0.0); | |||||
| postponeEvent(PluginPostEventMidiProgramChange, k, 0, 0.0); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -2001,9 +2001,9 @@ public: | |||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| { | { | ||||
| if (MIDI_IS_STATUS_NOTE_OFF(status)) | if (MIDI_IS_STATUS_NOTE_OFF(status)) | ||||
| postponeEvent(PluginPostEventNoteOff, minEvent->data[1], 0.0); | |||||
| postponeEvent(PluginPostEventNoteOff, channel, minEvent->data[1], 0.0); | |||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| postponeEvent(PluginPostEventNoteOn, minEvent->data[1], minEvent->data[2]); | |||||
| postponeEvent(PluginPostEventNoteOn, channel, minEvent->data[1], minEvent->data[2]); | |||||
| } | } | ||||
| } | } | ||||
| @@ -2034,41 +2034,41 @@ public: | |||||
| { | { | ||||
| case LV2_PORT_TIME_BAR: | case LV2_PORT_TIME_BAR: | ||||
| setParameterValue(k, timeInfo->bbt.bar, false, false, false); | setParameterValue(k, timeInfo->bbt.bar, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.bar); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.bar); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_BAR_BEAT: | case LV2_PORT_TIME_BAR_BEAT: | ||||
| setParameterValue(k, timeInfo->bbt.tick, false, false, false); | setParameterValue(k, timeInfo->bbt.tick, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.tick); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.tick); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_BEAT: | case LV2_PORT_TIME_BEAT: | ||||
| setParameterValue(k, timeInfo->bbt.beat, false, false, false); | setParameterValue(k, timeInfo->bbt.beat, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.beat); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.beat); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_BEAT_UNIT: | case LV2_PORT_TIME_BEAT_UNIT: | ||||
| setParameterValue(k, timeInfo->bbt.beat_type, false, false, false); | setParameterValue(k, timeInfo->bbt.beat_type, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.beat_type); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.beat_type); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_BEATS_PER_BAR: | case LV2_PORT_TIME_BEATS_PER_BAR: | ||||
| setParameterValue(k, timeInfo->bbt.beats_per_bar, false, false, false); | setParameterValue(k, timeInfo->bbt.beats_per_bar, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.beats_per_bar); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.beats_per_bar); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_BEATS_PER_MINUTE: | case LV2_PORT_TIME_BEATS_PER_MINUTE: | ||||
| setParameterValue(k, timeInfo->bbt.beats_per_minute, false, false, false); | setParameterValue(k, timeInfo->bbt.beats_per_minute, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->bbt.beats_per_minute); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->bbt.beats_per_minute); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_FRAME: | case LV2_PORT_TIME_FRAME: | ||||
| setParameterValue(k, timeInfo->frame, false, false, false); | setParameterValue(k, timeInfo->frame, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->frame); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->frame); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_FRAMES_PER_SECOND: | case LV2_PORT_TIME_FRAMES_PER_SECOND: | ||||
| break; | break; | ||||
| case LV2_PORT_TIME_POSITION: | case LV2_PORT_TIME_POSITION: | ||||
| setParameterValue(k, timeInfo->time, false, false, false); | setParameterValue(k, timeInfo->time, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->time); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->time); | |||||
| break; | break; | ||||
| case LV2_PORT_TIME_SPEED: | case LV2_PORT_TIME_SPEED: | ||||
| setParameterValue(k, timeInfo->playing ? 1.0 : 0.0, false, false, false); | setParameterValue(k, timeInfo->playing ? 1.0 : 0.0, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, timeInfo->playing ? 1.0 : 0.0); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, timeInfo->playing ? 1.0 : 0.0); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -54,12 +54,12 @@ HEADERS = \ | |||||
| INCLUDEPATH = .. \ | INCLUDEPATH = .. \ | ||||
| ../../carla-includes | ../../carla-includes | ||||
| DEFINES += NDEBUG DEBUG | |||||
| DEFINES = QTCREATOR_TEST | |||||
| DEFINES += DEBUG # NDEBUG | |||||
| DEFINES += CARLA_ENGINE_JACK | DEFINES += CARLA_ENGINE_JACK | ||||
| DEFINES += CARLA_ENGINE_RTAUDIO HAVE_GETTIMEOFDAY __LINUX_ALSA__ __LINUX_ALSASEQ__ __LINUX_PULSE__ __RTAUDIO_DEBUG__ __RTMIDI_DEBUG__ | DEFINES += CARLA_ENGINE_RTAUDIO HAVE_GETTIMEOFDAY __LINUX_ALSA__ __LINUX_ALSASEQ__ __LINUX_PULSE__ __RTAUDIO_DEBUG__ __RTMIDI_DEBUG__ | ||||
| DEFINES += WANT_FLUIDSYNTH WANT_LINUXSAMPLER | |||||
| DEFINES += HAVE_SUIL | DEFINES += HAVE_SUIL | ||||
| DEFINES += QTCREATOR_TEST | |||||
| DEFINES += WANT_FLUIDSYNTH WANT_LINUXSAMPLER | |||||
| LIBS = ../../carla-lilv/carla_lilv.a -ldl | LIBS = ../../carla-lilv/carla_lilv.a -ldl | ||||
| INCLUDEPATH += ../rtaudio-4.0.11 | INCLUDEPATH += ../rtaudio-4.0.11 | ||||
| @@ -745,7 +745,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value; | value = cinEvent->value; | ||||
| setDryWet(value, false, false); | setDryWet(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_DRYWET, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -753,7 +753,7 @@ public: | |||||
| { | { | ||||
| value = cinEvent->value*127/100; | value = cinEvent->value*127/100; | ||||
| setVolume(value, false, false); | setVolume(value, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, value); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_VOLUME, 0, value); | |||||
| continue; | continue; | ||||
| } | } | ||||
| @@ -780,8 +780,8 @@ public: | |||||
| setBalanceLeft(left, false, false); | setBalanceLeft(left, false, false); | ||||
| setBalanceRight(right, false, false); | setBalanceRight(right, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, right); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_LEFT, 0, left); | |||||
| postponeEvent(PluginPostEventParameterChange, PARAMETER_BALANCE_RIGHT, 0, right); | |||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| @@ -811,7 +811,7 @@ public: | |||||
| } | } | ||||
| setParameterValue(k, value, false, false, false); | setParameterValue(k, value, false, false, false); | ||||
| postponeEvent(PluginPostEventParameterChange, k, value); | |||||
| postponeEvent(PluginPostEventParameterChange, k, 0, value); | |||||
| } | } | ||||
| } | } | ||||
| @@ -829,7 +829,7 @@ public: | |||||
| if (progId < prog.count) | if (progId < prog.count) | ||||
| { | { | ||||
| setProgram(progId, false, false, false, false); | setProgram(progId, false, false, false, false); | ||||
| postponeEvent(PluginPostEventMidiProgramChange, progId, 0.0); | |||||
| postponeEvent(PluginPostEventMidiProgramChange, progId, 0, 0.0); | |||||
| } | } | ||||
| } | } | ||||
| break; | break; | ||||
| @@ -938,7 +938,7 @@ public: | |||||
| midiEvent->midiData[1] = note; | midiEvent->midiData[1] = note; | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOff, note, 0.0); | |||||
| postponeEvent(PluginPostEventNoteOff, channel, note, 0.0); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_NOTE_ON(status)) | else if (MIDI_IS_STATUS_NOTE_ON(status)) | ||||
| { | { | ||||
| @@ -950,7 +950,7 @@ public: | |||||
| midiEvent->midiData[2] = velo; | midiEvent->midiData[2] = velo; | ||||
| if (channel == cin_channel) | if (channel == cin_channel) | ||||
| postponeEvent(PluginPostEventNoteOn, note, velo); | |||||
| postponeEvent(PluginPostEventNoteOn, channel, note, velo); | |||||
| } | } | ||||
| else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status)) | else if (MIDI_IS_STATUS_POLYPHONIC_AFTERTOUCH(status)) | ||||
| { | { | ||||
| @@ -1217,7 +1217,7 @@ public: | |||||
| if (self->x_engine->isOnAudioThread() && ! self->x_engine->isOffline()) | if (self->x_engine->isOnAudioThread() && ! self->x_engine->isOffline()) | ||||
| { | { | ||||
| self->setParameterValue(index, opt, false, false, false); | self->setParameterValue(index, opt, false, false, false); | ||||
| self->postponeEvent(PluginPostEventParameterChange, index, opt); | |||||
| self->postponeEvent(PluginPostEventParameterChange, index, 0, opt); | |||||
| } | } | ||||
| else | else | ||||
| self->setParameterValue(index, opt, false, true, true); | self->setParameterValue(index, opt, false, true, true); | ||||
| @@ -7,8 +7,8 @@ CONFIG = release static | |||||
| CONFIG += link_pkgconfig qt warn_on | CONFIG += link_pkgconfig qt warn_on | ||||
| DEFINES = DEBUG BUILD_NATIVE | DEFINES = DEBUG BUILD_NATIVE | ||||
| #DEFINES += WANT_FLUIDSYNTH WANT_LINUXSAMPLER | |||||
| #PKGCONFIG = fluidsynth linuxsampler | |||||
| DEFINES += WANT_FLUIDSYNTH WANT_LINUXSAMPLER | |||||
| PKGCONFIG = fluidsynth linuxsampler | |||||
| TARGET = carla-discovery-qtcreator | TARGET = carla-discovery-qtcreator | ||||
| TEMPLATE = app | TEMPLATE = app | ||||
| @@ -36,9 +36,9 @@ INCLUDEPATH = .. \ | |||||
| LIBS = \ | LIBS = \ | ||||
| ../../carla-lilv/carla_lilv.a | ../../carla-lilv/carla_lilv.a | ||||
| #win { | |||||
| LIBS += -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -lqtmain | |||||
| #} | |||||
| QMAKE_CXXFLAGS *= -std=c++0x | QMAKE_CXXFLAGS *= -std=c++0x | ||||
| QMAKE_LFLAGS *= -static -static-libgcc | |||||
| win { | |||||
| LIBS += -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -lqtmain | |||||
| QMAKE_LFLAGS *= -static -static-libgcc | |||||
| } | |||||
| @@ -98,4 +98,6 @@ const char* bool2str(bool yesno) | |||||
| return yesno ? "true" : "false"; | return yesno ? "true" : "false"; | ||||
| } | } | ||||
| inline void pass(void) {} | |||||
| #endif // CARLA_INCLUDES_H | #endif // CARLA_INCLUDES_H | ||||
| @@ -634,9 +634,9 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI URI) | |||||
| else if (strcmp(designation, LV2_TIME__speed) == 0) | else if (strcmp(designation, LV2_TIME__speed) == 0) | ||||
| RDF_Port->Designation = LV2_PORT_TIME_SPEED; | RDF_Port->Designation = LV2_PORT_TIME_SPEED; | ||||
| else if (strncmp(designation, LV2_PARAMETERS_PREFIX, strlen(LV2_PARAMETERS_PREFIX)) == 0) | else if (strncmp(designation, LV2_PARAMETERS_PREFIX, strlen(LV2_PARAMETERS_PREFIX)) == 0) | ||||
| 0; // skip | |||||
| pass(); | |||||
| else if (strncmp(designation, LV2_PORT_GROUPS_PREFIX, strlen(LV2_PORT_GROUPS_PREFIX)) == 0) | else if (strncmp(designation, LV2_PORT_GROUPS_PREFIX, strlen(LV2_PORT_GROUPS_PREFIX)) == 0) | ||||
| 0; // skip | |||||
| pass(); | |||||
| else | else | ||||
| qWarning("lv2_rdf_new(%s) - got unknown Port Designation '%s'", URI, designation); | qWarning("lv2_rdf_new(%s) - got unknown Port Designation '%s'", URI, designation); | ||||
| } | } | ||||
| @@ -46,36 +46,38 @@ class DigitalPeakMeter(QWidget): | |||||
| self.m_paintTimer.timeout.connect(self.update) | self.m_paintTimer.timeout.connect(self.update) | ||||
| self.m_paintTimer.start() | self.m_paintTimer.start() | ||||
| def displayMeter(self, meter_n, level): | |||||
| if meter_n < 0 or meter_n > self.m_channels: | |||||
| qCritical("DigitalPeakMeter::displayMeter(%i, %f) - Invalid meter number" % (meter_n, level)) | |||||
| return | |||||
| def displayMeter(self, meter, level): | |||||
| if meter < 0 or meter >= self.m_channels: | |||||
| return qCritical("DigitalPeakMeter::displayMeter(%i, %f) - invalid meter number" % (meter, level)) | |||||
| if level < 0.0: | if level < 0.0: | ||||
| level = -level | level = -level | ||||
| if level > 1.0: | if level > 1.0: | ||||
| level = 1.0 | level = 1.0 | ||||
| self.m_channels_data[meter_n - 1] = level | |||||
| self.m_channelsData[meter-1] = level | |||||
| def setChannels(self, channels): | def setChannels(self, channels): | ||||
| if (channels < 0) | |||||
| return qCritical("DigitalPeakMeter::setChannels(%i) - channels must be a positive integer" % channels) | |||||
| self.m_channels = channels | self.m_channels = channels | ||||
| self.m_channels_data = [] | |||||
| self.m_channelsData = [] | |||||
| self.m_lastValueData = [] | self.m_lastValueData = [] | ||||
| for x in range(channels): | for x in range(channels): | ||||
| self.m_channels_data.append(0.0) | |||||
| self.m_channelsData.append(0.0) | |||||
| self.m_lastValueData.append(0.0) | self.m_lastValueData.append(0.0) | ||||
| def setColor(self, color): | def setColor(self, color): | ||||
| if color == self.GREEN: | if color == self.GREEN: | ||||
| self.m_colorBase = QColor("#5DE73D") | |||||
| self.m_colorBase = QColor("#5DE73D") | |||||
| self.m_colorBaseT = QColor(15, 110, 15, 100) | self.m_colorBaseT = QColor(15, 110, 15, 100) | ||||
| elif color == self.BLUE: | elif color == self.BLUE: | ||||
| self.m_colorBase = QColor("#52EEF8") | |||||
| self.m_colorBase = QColor("#52EEF8") | |||||
| self.m_colorBaseT = QColor(15, 15, 110, 100) | self.m_colorBaseT = QColor(15, 15, 110, 100) | ||||
| else: | else: | ||||
| return | |||||
| return qCritical("DigitalPeakMeter::setColor(%i) - invalid color" % color) | |||||
| self.setOrientation(self.m_orientation) | self.setOrientation(self.m_orientation) | ||||
| @@ -98,6 +100,9 @@ class DigitalPeakMeter(QWidget): | |||||
| self.m_gradientMeter.setColorAt(0.8, self.m_colorBase) | self.m_gradientMeter.setColorAt(0.8, self.m_colorBase) | ||||
| self.m_gradientMeter.setColorAt(1.0, self.m_colorBase) | self.m_gradientMeter.setColorAt(1.0, self.m_colorBase) | ||||
| else: | |||||
| return qCritical("DigitalPeakMeter::setOrientation(%i) - invalid orientation" % orientation) | |||||
| self.updateSizes() | self.updateSizes() | ||||
| def setRefreshRate(self, rate): | def setRefreshRate(self, rate): | ||||
| @@ -110,6 +115,7 @@ class DigitalPeakMeter(QWidget): | |||||
| value = 0 | value = 0 | ||||
| elif value > 5: | elif value > 5: | ||||
| value = 5 | value = 5 | ||||
| self.m_smoothMultiplier = value | self.m_smoothMultiplier = value | ||||
| def minimumSizeHint(self): | def minimumSizeHint(self): | ||||
| @@ -119,17 +125,19 @@ class DigitalPeakMeter(QWidget): | |||||
| return QSize(self.m_width, self.m_height) | return QSize(self.m_width, self.m_height) | ||||
| def updateSizes(self): | def updateSizes(self): | ||||
| self.m_width = self.width() | |||||
| self.m_width = self.width() | |||||
| self.m_height = self.height() | self.m_height = self.height() | ||||
| self.m_sizeMeter = 0 | self.m_sizeMeter = 0 | ||||
| if self.m_orientation == self.HORIZONTAL: | if self.m_orientation == self.HORIZONTAL: | ||||
| self.m_gradientMeter.setFinalStop(self.m_width, 0) | self.m_gradientMeter.setFinalStop(self.m_width, 0) | ||||
| if self.m_channels > 0: | if self.m_channels > 0: | ||||
| self.m_sizeMeter = self.m_height / self.m_channels | self.m_sizeMeter = self.m_height / self.m_channels | ||||
| elif self.m_orientation == self.VERTICAL: | elif self.m_orientation == self.VERTICAL: | ||||
| self.m_gradientMeter.setFinalStop(0, self.m_height) | self.m_gradientMeter.setFinalStop(0, self.m_height) | ||||
| if self.m_channels > 0: | if self.m_channels > 0: | ||||
| self.m_sizeMeter = self.m_width / self.m_channels | self.m_sizeMeter = self.m_width / self.m_channels | ||||
| @@ -142,10 +150,12 @@ class DigitalPeakMeter(QWidget): | |||||
| painter.setBrush(Qt.black) | painter.setBrush(Qt.black) | ||||
| painter.drawRect(0, 0, self.m_width, self.m_height) | painter.drawRect(0, 0, self.m_width, self.m_height) | ||||
| meter_x = 0 | |||||
| meterX = 0 | |||||
| painter.setPen(self.m_colorBackground) | |||||
| painter.setBrush(self.m_gradientMeter) | |||||
| for i in range(self.m_channels): | for i in range(self.m_channels): | ||||
| level = self.m_channels_data[i] | |||||
| level = self.m_channelsData[i] | |||||
| if level == self.m_lastValueData[i]: | if level == self.m_lastValueData[i]: | ||||
| continue | continue | ||||
| @@ -159,20 +169,15 @@ class DigitalPeakMeter(QWidget): | |||||
| if value < 0.0: | if value < 0.0: | ||||
| value = 0.0 | value = 0.0 | ||||
| # Don't bounce the meter so much | |||||
| if self.m_smoothMultiplier > 0: | |||||
| elif self.m_smoothMultiplier > 0: | |||||
| value = (self.m_lastValueData[i] * self.m_smoothMultiplier + value) / (self.m_smoothMultiplier + 1) | value = (self.m_lastValueData[i] * self.m_smoothMultiplier + value) / (self.m_smoothMultiplier + 1) | ||||
| painter.setPen(self.m_colorBackground) | |||||
| painter.setBrush(self.m_gradientMeter) | |||||
| if self.m_orientation == self.HORIZONTAL: | if self.m_orientation == self.HORIZONTAL: | ||||
| painter.drawRect(0, meter_x, value, self.m_sizeMeter) | |||||
| painter.drawRect(0, meterX, value, self.m_sizeMeter) | |||||
| elif self.m_orientation == self.VERTICAL: | elif self.m_orientation == self.VERTICAL: | ||||
| painter.drawRect(meter_x, value, self.m_sizeMeter, self.m_height) | |||||
| painter.drawRect(meterX, value, self.m_sizeMeter, self.m_height) | |||||
| meter_x += self.m_sizeMeter | |||||
| meterX += self.m_sizeMeter | |||||
| self.m_lastValueData[i] = value | self.m_lastValueData[i] = value | ||||
| painter.setBrush(QColor(0, 0, 0, 0)) | painter.setBrush(QColor(0, 0, 0, 0)) | ||||
| @@ -180,7 +185,7 @@ class DigitalPeakMeter(QWidget): | |||||
| if self.m_orientation == self.HORIZONTAL: | if self.m_orientation == self.HORIZONTAL: | ||||
| # Variables | # Variables | ||||
| lsmall = self.m_width | lsmall = self.m_width | ||||
| lfull = self.m_height - 1 | |||||
| lfull = self.m_height - 1 | |||||
| # Base | # Base | ||||
| painter.setPen(self.m_colorBaseT) | painter.setPen(self.m_colorBaseT) | ||||
| @@ -203,7 +208,7 @@ class DigitalPeakMeter(QWidget): | |||||
| elif self.m_orientation == self.VERTICAL: | elif self.m_orientation == self.VERTICAL: | ||||
| # Variables | # Variables | ||||
| lsmall = self.m_height | lsmall = self.m_height | ||||
| lfull = self.m_width - 1 | |||||
| lfull = self.m_width - 1 | |||||
| # Base | # Base | ||||
| painter.setPen(self.m_colorBaseT) | painter.setPen(self.m_colorBaseT) | ||||
| @@ -79,9 +79,9 @@ def session_callback(event, arg): | |||||
| def reconnect_inputs(): | def reconnect_inputs(): | ||||
| play_port_1 = jacklib.port_by_name(client, "system:playback_1") | play_port_1 = jacklib.port_by_name(client, "system:playback_1") | ||||
| play_port_2 = jacklib.port_by_name(client, "system:playback_2") | play_port_2 = jacklib.port_by_name(client, "system:playback_2") | ||||
| client_name = str(jacklib.get_client_name(client), encoding="utf-8") | |||||
| list_port_1 = c_char_p_p_to_list(jacklib.port_get_all_connections(client, play_port_1)) | list_port_1 = c_char_p_p_to_list(jacklib.port_get_all_connections(client, play_port_1)) | ||||
| list_port_2 = c_char_p_p_to_list(jacklib.port_get_all_connections(client, play_port_2)) | list_port_2 = c_char_p_p_to_list(jacklib.port_get_all_connections(client, play_port_2)) | ||||
| client_name = str(jacklib.get_client_name(client), encoding="utf-8") | |||||
| for port in list_port_1: | for port in list_port_1: | ||||
| this_port = jacklib.port_by_name(client, port) | this_port = jacklib.port_by_name(client, port) | ||||