| @@ -100,13 +100,7 @@ enum EnginePortType { | |||||
| * Event port type (Control or MIDI). | * Event port type (Control or MIDI). | ||||
| ** \see CarlaEngineEventPort | ** \see CarlaEngineEventPort | ||||
| */ | */ | ||||
| kEnginePortTypeEvent = 3, | |||||
| /*! | |||||
| * OSC port type. | |||||
| ** \see CarlaEngineOscPort | |||||
| */ | |||||
| kEnginePortTypeOSC = 4 | |||||
| kEnginePortTypeEvent = 3 | |||||
| }; | }; | ||||
| /*! | /*! | ||||
| @@ -246,34 +240,12 @@ struct EngineOptions { | |||||
| unsigned int audioBufferSize; | unsigned int audioBufferSize; | ||||
| unsigned int audioSampleRate; | unsigned int audioSampleRate; | ||||
| CarlaString audioDevice; | CarlaString audioDevice; | ||||
| CarlaString resourceDir; | |||||
| #ifndef BUILD_BRIDGE | |||||
| CarlaString bridge_native; | |||||
| CarlaString bridge_posix32; | |||||
| CarlaString bridge_posix64; | |||||
| CarlaString bridge_win32; | |||||
| CarlaString bridge_win64; | |||||
| #endif | |||||
| #ifdef WANT_LV2 | |||||
| CarlaString bridge_lv2Extrn; | |||||
| CarlaString bridge_lv2Gtk2; | |||||
| CarlaString bridge_lv2Gtk3; | |||||
| CarlaString bridge_lv2Ntk; | |||||
| CarlaString bridge_lv2Qt4; | |||||
| CarlaString bridge_lv2Qt5; | |||||
| CarlaString bridge_lv2Cocoa; | |||||
| CarlaString bridge_lv2Win; | |||||
| CarlaString bridge_lv2X11; | |||||
| #endif | |||||
| #ifdef WANT_VST | |||||
| CarlaString bridge_vstMac; | |||||
| CarlaString bridge_vstHWND; | |||||
| CarlaString bridge_vstX11; | |||||
| #endif | |||||
| CarlaString binaryDir; | |||||
| CarlaString resourceDir; | |||||
| EngineOptions() | EngineOptions() | ||||
| #if defined(CARLA_OS_LINUX) | |||||
| #ifdef CARLA_OS_LINUX | |||||
| : processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS), | : processMode(ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS), | ||||
| transportMode(ENGINE_TRANSPORT_MODE_JACK), | transportMode(ENGINE_TRANSPORT_MODE_JACK), | ||||
| #else | #else | ||||
| @@ -1243,7 +1215,7 @@ public: | |||||
| void oscSend_bridge_midi_program_count(const int32_t count); | void oscSend_bridge_midi_program_count(const int32_t count); | ||||
| void oscSend_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 oscSend_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 oscSend_bridge_parameter_info(const int32_t index, const char* const name, const char* const unit); | void oscSend_bridge_parameter_info(const int32_t index, const char* const name, const char* const unit); | ||||
| void oscSend_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 oscSend_bridge_parameter_data(const int32_t index, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC); | |||||
| void oscSend_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 oscSend_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 oscSend_bridge_program_info(const int32_t index, const char* const name); | void oscSend_bridge_program_info(const int32_t index, const char* const name); | ||||
| void oscSend_bridge_midi_program_info(const int32_t index, const int32_t bank, const int32_t program, const char* const label); | void oscSend_bridge_midi_program_info(const int32_t index, const int32_t bank, const int32_t program, const char* const label); | ||||
| @@ -1260,8 +1232,8 @@ public: | |||||
| void oscSend_control_add_plugin_end(const int32_t pluginId); | void oscSend_control_add_plugin_end(const int32_t pluginId); | ||||
| void oscSend_control_remove_plugin(const int32_t pluginId); | void oscSend_control_remove_plugin(const int32_t pluginId); | ||||
| void oscSend_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 oscSend_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 oscSend_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 oscSend_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 unit, const float current); | |||||
| void oscSend_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); | |||||
| void oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t hints, const char* const name, const char* const unit, const float current); | |||||
| void oscSend_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 oscSend_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 oscSend_control_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc); | void oscSend_control_set_parameter_midi_cc(const int32_t pluginId, const int32_t index, const int32_t cc); | ||||
| void oscSend_control_set_parameter_midi_channel(const int32_t pluginId, const int32_t index, const int32_t channel); | void oscSend_control_set_parameter_midi_channel(const int32_t pluginId, const int32_t index, const int32_t channel); | ||||
| @@ -307,19 +307,13 @@ typedef struct _CarlaPortCountInfo { | |||||
| */ | */ | ||||
| uint32_t outs; | uint32_t outs; | ||||
| /*! | |||||
| * Total number of ports. | |||||
| */ | |||||
| uint32_t total; | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| /*! | /*! | ||||
| * C++ constructor. | * C++ constructor. | ||||
| */ | */ | ||||
| _CarlaPortCountInfo() | _CarlaPortCountInfo() | ||||
| : ins(0), | : ins(0), | ||||
| outs(0), | |||||
| total(0) {} | |||||
| outs(0) {} | |||||
| #endif | #endif | ||||
| } CarlaPortCountInfo; | } CarlaPortCountInfo; | ||||
| @@ -485,27 +479,31 @@ CARLA_EXPORT const char* carla_get_complete_license_text(); | |||||
| CARLA_EXPORT const char* carla_get_supported_file_extensions(); | CARLA_EXPORT const char* carla_get_supported_file_extensions(); | ||||
| /*! | /*! | ||||
| * Get how many engine drivers are available to use. | |||||
| * Get how many engine drivers are available. | |||||
| */ | */ | ||||
| CARLA_EXPORT unsigned int carla_get_engine_driver_count(); | CARLA_EXPORT unsigned int carla_get_engine_driver_count(); | ||||
| /*! | /*! | ||||
| * Get the engine driver info for \a index. | |||||
| * Get an engine driver name. | |||||
| * @param index Driver index | |||||
| */ | */ | ||||
| CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index); | CARLA_EXPORT const char* carla_get_engine_driver_name(unsigned int index); | ||||
| /*! | /*! | ||||
| * Get the device names of the engine driver at \a index. | |||||
| * Get the device names of an engine driver. | |||||
| * @param index Driver index | |||||
| */ | */ | ||||
| CARLA_EXPORT const char* const* carla_get_engine_driver_device_names(unsigned int index); | CARLA_EXPORT const char* const* carla_get_engine_driver_device_names(unsigned int index); | ||||
| /*! | /*! | ||||
| * Get a device driver info. | |||||
| * Get information about a device driver. | |||||
| * @param index Driver index | |||||
| * @param name Device name | |||||
| */ | */ | ||||
| CARLA_EXPORT const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* driverName); | |||||
| CARLA_EXPORT const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* name); | |||||
| /*! | /*! | ||||
| * Get how many internal plugins are available to use. | |||||
| * Get how many internal plugins are available. | |||||
| */ | */ | ||||
| CARLA_EXPORT unsigned int carla_get_internal_plugin_count(); | CARLA_EXPORT unsigned int carla_get_internal_plugin_count(); | ||||
| @@ -30,6 +30,16 @@ struct LADSPA_RDF_Descriptor; | |||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| /*! | |||||
| * @defgroup PluginHints | |||||
| * @{ | |||||
| */ | |||||
| const unsigned int PLUGIN_NEEDS_FIXED_BUFFERS = 0x100; | |||||
| const unsigned int PLUGIN_NEEDS_SINGLE_THREAD = 0x200; | |||||
| /** @} */ | |||||
| /*! | /*! | ||||
| * @defgroup CarlaPluginAPI Carla Plugin API | * @defgroup CarlaPluginAPI Carla Plugin API | ||||
| * | * | ||||
| @@ -378,7 +388,7 @@ public: | |||||
| * | * | ||||
| * \see getParameterCount() | * \see getParameterCount() | ||||
| */ | */ | ||||
| void getParameterCountInfo(uint32_t& ins, uint32_t& outs, uint32_t& total) const; | |||||
| void getParameterCountInfo(uint32_t& ins, uint32_t& outs) const noexcept; | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set data (state) | // Set data (state) | ||||
| @@ -328,8 +328,6 @@ CarlaEnginePort* CarlaEngineClient::addPort(const EnginePortType portType, const | |||||
| return new CarlaEngineCVPort(fEngine, isInput); | return new CarlaEngineCVPort(fEngine, isInput); | ||||
| case kEnginePortTypeEvent: | case kEnginePortTypeEvent: | ||||
| return new CarlaEngineEventPort(fEngine, isInput); | return new CarlaEngineEventPort(fEngine, isInput); | ||||
| case kEnginePortTypeOSC: | |||||
| return nullptr; //new CarlaEngineOscPort(fEngine, isInput); | |||||
| } | } | ||||
| carla_stderr("CarlaEngineClient::addPort(%i, \"%s\", %s) - invalid type", portType, name, bool2str(isInput)); | carla_stderr("CarlaEngineClient::addPort(%i, \"%s\", %s) - invalid type", portType, name, bool2str(isInput)); | ||||
| @@ -403,7 +401,7 @@ const char* const* CarlaEngine::getDriverDeviceNames(const unsigned int index) | |||||
| { | { | ||||
| carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index); | carla_debug("CarlaEngine::getDriverDeviceNames(%i)", index); | ||||
| if (index == 0) | |||||
| if (index == 0) // JACK | |||||
| { | { | ||||
| static const char* ret[3] = { "Auto-Connect OFF", "Auto-Connect ON", nullptr }; | static const char* ret[3] = { "Auto-Connect OFF", "Auto-Connect ON", nullptr }; | ||||
| return ret; | return ret; | ||||
| @@ -431,12 +429,13 @@ const EngineDriverDeviceInfo* CarlaEngine::getDriverDeviceInfo(const unsigned in | |||||
| { | { | ||||
| carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index, deviceName); | carla_debug("CarlaEngine::getDriverDeviceInfo(%i, \"%s\")", index, deviceName); | ||||
| if (index == 0) | |||||
| if (index == 0) // JACK | |||||
| { | { | ||||
| static uint32_t bufSizes[11] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 0 }; | static uint32_t bufSizes[11] = { 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 0 }; | ||||
| static EngineDriverDeviceInfo devInfo; | static EngineDriverDeviceInfo devInfo; | ||||
| devInfo.hints |= ENGINE_DRIVER_VARIABLE_BUFFER_SIZE; | |||||
| devInfo.hints = ENGINE_DRIVER_DEVICE_VARIABLE_BUFFER_SIZE; | |||||
| devInfo.bufferSizes = bufSizes; | devInfo.bufferSizes = bufSizes; | ||||
| devInfo.sampleRates = nullptr; | |||||
| return &devInfo; | return &devInfo; | ||||
| } | } | ||||
| @@ -639,7 +638,7 @@ void CarlaEngine::idle() | |||||
| CarlaPlugin* const plugin(pData->plugins[i].plugin); | CarlaPlugin* const plugin(pData->plugins[i].plugin); | ||||
| if (plugin != nullptr && plugin->isEnabled()) | if (plugin != nullptr && plugin->isEnabled()) | ||||
| plugin->idleGui(); | |||||
| plugin->idle(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -696,7 +695,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons | |||||
| CarlaPlugin* plugin = nullptr; | CarlaPlugin* plugin = nullptr; | ||||
| #ifndef BUILD_BRIDGE | |||||
| #if 0 //ndef BUILD_BRIDGE | |||||
| const char* bridgeBinary; | const char* bridgeBinary; | ||||
| switch (btype) | switch (btype) | ||||
| @@ -720,7 +719,7 @@ bool CarlaEngine::addPlugin(const BinaryType btype, const PluginType ptype, cons | |||||
| # ifndef CARLA_OS_WIN | # ifndef CARLA_OS_WIN | ||||
| if (btype == BINARY_NATIVE && fOptions.bridge_native.isNotEmpty()) | if (btype == BINARY_NATIVE && fOptions.bridge_native.isNotEmpty()) | ||||
| bridgeBinary = (const char*)fOptions.bridge_native; | |||||
| bridgeBinary = (const char*)fOptions.bridge_native; | |||||
| # endif | # endif | ||||
| if (btype != BINARY_NATIVE || (fOptions.preferPluginBridges && bridgeBinary != nullptr)) | if (btype != BINARY_NATIVE || (fOptions.preferPluginBridges && bridgeBinary != nullptr)) | ||||
| @@ -1487,7 +1486,7 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| switch (option) | switch (option) | ||||
| { | { | ||||
| case ENGINE_OPTION_PROCESS_NAME: | |||||
| case ENGINE_OPTION_DEBUG: | |||||
| break; | break; | ||||
| case ENGINE_OPTION_PROCESS_MODE: | case ENGINE_OPTION_PROCESS_MODE: | ||||
| @@ -1559,69 +1558,13 @@ void CarlaEngine::setOption(const EngineOption option, const int value, const ch | |||||
| fOptions.audioDevice = valueStr; | fOptions.audioDevice = valueStr; | ||||
| break; | break; | ||||
| case ENGINE_OPTION_PATH_RESOURCES: | |||||
| fOptions.resourceDir = valueStr; | |||||
| case ENGINE_OPTION_PATH_BINARIES: | |||||
| fOptions.binaryDir = valueStr; | |||||
| break; | break; | ||||
| #ifndef BUILD_BRIDGE | |||||
| case ENGINE_OPTION_PATH_BRIDGE_NATIVE: | |||||
| fOptions.bridge_native = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_POSIX32: | |||||
| fOptions.bridge_posix32 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_POSIX64: | |||||
| fOptions.bridge_posix64 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_WIN32: | |||||
| fOptions.bridge_win32 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_WIN64: | |||||
| fOptions.bridge_win64 = valueStr; | |||||
| break; | |||||
| #endif | |||||
| #ifdef WANT_LV2 | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL: | |||||
| fOptions.bridge_lv2Extrn = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2: | |||||
| fOptions.bridge_lv2Gtk2 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3: | |||||
| fOptions.bridge_lv2Gtk3 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_NTK: | |||||
| fOptions.bridge_lv2Ntk = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_QT4: | |||||
| fOptions.bridge_lv2Qt4 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_QT5: | |||||
| fOptions.bridge_lv2Qt5 = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA: | |||||
| fOptions.bridge_lv2Cocoa = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS: | |||||
| fOptions.bridge_lv2Win = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_X11: | |||||
| fOptions.bridge_lv2X11 = valueStr; | |||||
| break; | |||||
| #endif | |||||
| #ifdef WANT_VST | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_MAC: | |||||
| fOptions.bridge_vstMac = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_HWND: | |||||
| fOptions.bridge_vstHWND = valueStr; | |||||
| break; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_X11: | |||||
| fOptions.bridge_vstX11 = valueStr; | |||||
| case ENGINE_OPTION_PATH_RESOURCES: | |||||
| fOptions.resourceDir = valueStr; | |||||
| break; | break; | ||||
| #endif | |||||
| } | } | ||||
| } | } | ||||
| @@ -1963,37 +1906,36 @@ void CarlaEngine::oscSend_control_set_plugin_data(const int32_t pluginId, const | |||||
| } | } | ||||
| } | } | ||||
| void CarlaEngine::oscSend_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 CarlaEngine::oscSend_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) | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | ||||
| CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),); | CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),); | ||||
| carla_debug("CarlaEngine::oscSend_control_set_plugin_ports(%i, %i, %i, %i, %i, %i, %i, %i)", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts, cTotals); | |||||
| carla_debug("CarlaEngine::oscSend_control_set_plugin_ports(%i, %i, %i, %i, %i, %i, %i)", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts); | |||||
| if (pData->oscData->target != nullptr) | if (pData->oscData->target != nullptr) | ||||
| { | { | ||||
| char targetPath[std::strlen(pData->oscData->path)+18]; | char targetPath[std::strlen(pData->oscData->path)+18]; | ||||
| std::strcpy(targetPath, pData->oscData->path); | std::strcpy(targetPath, pData->oscData->path); | ||||
| std::strcat(targetPath, "/set_plugin_ports"); | std::strcat(targetPath, "/set_plugin_ports"); | ||||
| lo_send(pData->oscData->target, targetPath, "iiiiiiii", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts, cTotals); | |||||
| lo_send(pData->oscData->target, targetPath, "iiiiiii", pluginId, audioIns, audioOuts, midiIns, midiOuts, cIns, cOuts); | |||||
| } | } | ||||
| } | } | ||||
| void CarlaEngine::oscSend_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 unit, const float current) | |||||
| void CarlaEngine::oscSend_control_set_parameter_data(const int32_t pluginId, const int32_t index, const int32_t hints, const char* const name, const char* const unit, const float current) | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | ||||
| CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),); | CARLA_SAFE_ASSERT_RETURN(pluginId >= 0 && pluginId < static_cast<int32_t>(pData->maxPluginNumber),); | ||||
| CARLA_SAFE_ASSERT_RETURN(index >= 0,); | CARLA_SAFE_ASSERT_RETURN(index >= 0,); | ||||
| CARLA_SAFE_ASSERT_RETURN(type != PARAMETER_UNKNOWN,); | |||||
| CARLA_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',); | CARLA_SAFE_ASSERT_RETURN(name != nullptr && name[0] != '\0',); | ||||
| CARLA_SAFE_ASSERT_RETURN(unit != nullptr,); | CARLA_SAFE_ASSERT_RETURN(unit != nullptr,); | ||||
| carla_debug("CarlaEngine::oscSend_control_set_parameter_data(%i, %i, %i, %i, \"%s\", \"%s\", %f)", pluginId, index, type, hints, name, unit, current); | |||||
| carla_debug("CarlaEngine::oscSend_control_set_parameter_data(%i, %i, %i, %i, \"%s\", \"%s\", %f)", pluginId, index, hints, name, unit, current); | |||||
| if (pData->oscData->target != nullptr) | if (pData->oscData->target != nullptr) | ||||
| { | { | ||||
| char targetPath[std::strlen(pData->oscData->path)+20]; | char targetPath[std::strlen(pData->oscData->path)+20]; | ||||
| std::strcpy(targetPath, pData->oscData->path); | std::strcpy(targetPath, pData->oscData->path); | ||||
| std::strcat(targetPath, "/set_parameter_data"); | std::strcat(targetPath, "/set_parameter_data"); | ||||
| lo_send(pData->oscData->target, targetPath, "iiiissf", pluginId, index, type, hints, name, unit, current); | |||||
| lo_send(pData->oscData->target, targetPath, "iiissf", pluginId, index, hints, name, unit, current); | |||||
| } | } | ||||
| } | } | ||||
| @@ -2350,17 +2292,17 @@ void CarlaEngine::oscSend_bridge_parameter_info(const int32_t index, const char* | |||||
| } | } | ||||
| } | } | ||||
| void CarlaEngine::oscSend_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 CarlaEngine::oscSend_bridge_parameter_data(const int32_t index, const int32_t rindex, const int32_t hints, const int32_t midiChannel, const int32_t midiCC) | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | CARLA_SAFE_ASSERT_RETURN(pData->oscData != nullptr,); | ||||
| carla_debug("CarlaEngine::oscSend_bridge_parameter_data(%i, %i, %i, %i, %i, %i)", index, type, rindex, hints, midiChannel, midiCC); | |||||
| carla_debug("CarlaEngine::oscSend_bridge_parameter_data(%i, %i, %i, %i, %i)", index, rindex, hints, midiChannel, midiCC); | |||||
| if (pData->oscData->target != nullptr) | if (pData->oscData->target != nullptr) | ||||
| { | { | ||||
| char targetPath[std::strlen(pData->oscData->path)+23]; | char targetPath[std::strlen(pData->oscData->path)+23]; | ||||
| std::strcpy(targetPath, pData->oscData->path); | std::strcpy(targetPath, pData->oscData->path); | ||||
| std::strcat(targetPath, "/bridge_parameter_data"); | std::strcat(targetPath, "/bridge_parameter_data"); | ||||
| lo_send(pData->oscData->target, targetPath, "iiiiii", index, type, rindex, hints, midiChannel, midiCC); | |||||
| lo_send(pData->oscData->target, targetPath, "iiiii", index, rindex, hints, midiChannel, midiCC); | |||||
| } | } | ||||
| } | } | ||||
| @@ -70,8 +70,6 @@ const char* EnginePortType2Str(const EnginePortType type) | |||||
| return "kEnginePortTypeCV"; | return "kEnginePortTypeCV"; | ||||
| case kEnginePortTypeEvent: | case kEnginePortTypeEvent: | ||||
| return "kEnginePortTypeEvent"; | return "kEnginePortTypeEvent"; | ||||
| case kEnginePortTypeOSC: | |||||
| return "kEnginePortTypeOSC"; | |||||
| } | } | ||||
| carla_stderr("CarlaBackend::EnginePortType2Str(%i) - invalid type", type); | carla_stderr("CarlaBackend::EnginePortType2Str(%i) - invalid type", type); | ||||
| @@ -528,8 +528,6 @@ public: | |||||
| case kEnginePortTypeEvent: | case kEnginePortTypeEvent: | ||||
| port = jackbridge_port_register(fClient, name, JACK_DEFAULT_MIDI_TYPE, isInput ? JackPortIsInput : JackPortIsOutput, 0); | port = jackbridge_port_register(fClient, name, JACK_DEFAULT_MIDI_TYPE, isInput ? JackPortIsInput : JackPortIsOutput, 0); | ||||
| break; | break; | ||||
| case kEnginePortTypeOSC: | |||||
| break; | |||||
| } | } | ||||
| } | } | ||||
| @@ -544,8 +542,6 @@ public: | |||||
| return new CarlaEngineJackCVPort(fEngine, isInput, fClient, port); | return new CarlaEngineJackCVPort(fEngine, isInput, fClient, port); | ||||
| case kEnginePortTypeEvent: | case kEnginePortTypeEvent: | ||||
| return new CarlaEngineJackEventPort(fEngine, isInput, fClient, port); | return new CarlaEngineJackEventPort(fEngine, isInput, fClient, port); | ||||
| case kEnginePortTypeOSC: | |||||
| break; | |||||
| } | } | ||||
| carla_stderr("CarlaEngineJackClient::addPort(%s, \"%s\", %s) - invalid type", EnginePortType2Str(portType), name, bool2str(isInput)); | carla_stderr("CarlaEngineJackClient::addPort(%s, \"%s\", %s) - invalid type", EnginePortType2Str(portType), name, bool2str(isInput)); | ||||
| @@ -816,7 +812,7 @@ public: | |||||
| const char* const icon((const char*)data); | const char* const icon((const char*)data); | ||||
| CARLA_ASSERT(std::strlen(icon)+1 == dataSize); | CARLA_ASSERT(std::strlen(icon)+1 == dataSize); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED, 0, groupId, 0, 0.0f, icon); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED, 0, groupId, 0, 0.0f, icon); | |||||
| jackbridge_free(data); | jackbridge_free(data); | ||||
| } | } | ||||
| @@ -1175,6 +1171,8 @@ protected: | |||||
| FloatVectorOperations::copy(audioOut1, audioIn1, nframes); | FloatVectorOperations::copy(audioOut1, audioIn1, nframes); | ||||
| FloatVectorOperations::copy(audioOut2, audioIn2, nframes); | FloatVectorOperations::copy(audioOut2, audioIn2, nframes); | ||||
| #else | #else | ||||
| carla_copyFloat(audioOut1, audioIn1, nframes); | |||||
| carla_copyFloat(audioOut2, audioIn2, nframes); | |||||
| #endif | #endif | ||||
| jackbridge_midi_clear_buffer(eventOut); | jackbridge_midi_clear_buffer(eventOut); | ||||
| } | } | ||||
| @@ -1506,11 +1504,11 @@ protected: | |||||
| bool portIsCV = (jackPortFlags & JackPortIsControlVoltage); | bool portIsCV = (jackPortFlags & JackPortIsControlVoltage); | ||||
| unsigned int canvasPortFlags = 0x0; | unsigned int canvasPortFlags = 0x0; | ||||
| canvasPortFlags |= portIsInput ? PATCHBAY_PORT_IS_INPUT : PATCHBAY_PORT_IS_OUTPUT; | |||||
| canvasPortFlags |= portIsAudio ? PATCHBAY_PORT_IS_AUDIO : PATCHBAY_PORT_IS_MIDI; | |||||
| canvasPortFlags |= portIsInput ? PATCHBAY_PORT_IS_INPUT : 0x0; | |||||
| canvasPortFlags |= portIsAudio ? PATCHBAY_PORT_TYPE_AUDIO : PATCHBAY_PORT_TYPE_MIDI; | |||||
| if (portIsAudio && portIsCV) | if (portIsAudio && portIsCV) | ||||
| canvasPortFlags |= PATCHBAY_PORT_IS_CV; | |||||
| canvasPortFlags |= PATCHBAY_PORT_TYPE_CV; | |||||
| PortNameToId portNameToId(groupId, fLastPortId++, portName, fullPortName); | PortNameToId portNameToId(groupId, fLastPortId++, portName, fullPortName); | ||||
| fUsedPortNames.append(portNameToId); | fUsedPortNames.append(portNameToId); | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef CARLA_ENGINE_OSC_HPP_INCLUDED | #ifndef CARLA_ENGINE_OSC_HPP_INCLUDED | ||||
| #define CARLA_ENGINE_OSC_HPP_INCLUDED | #define CARLA_ENGINE_OSC_HPP_INCLUDED | ||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaBackend.h" | |||||
| #include "CarlaOscUtils.hpp" | #include "CarlaOscUtils.hpp" | ||||
| #include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
| @@ -657,12 +657,12 @@ public: | |||||
| { | { | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED, 0, PATCHBAY_GROUP_CARLA, 0, 0.0f, getName()); | callback(ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED, 0, PATCHBAY_GROUP_CARLA, 0, 0.0f, getName()); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN1, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in1"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN2, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in2"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT1, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, "audio-out1"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT2, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, "audio-out2"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_IN, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_INPUT, "midi-in"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_OUT, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_OUTPUT, "midi-out"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN1, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in1"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_IN2, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, "audio-in2"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT1, PATCHBAY_PORT_TYPE_AUDIO, "audio-out1"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_AUDIO_OUT2, PATCHBAY_PORT_TYPE_AUDIO, "audio-out2"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_IN, PATCHBAY_PORT_TYPE_MIDI|PATCHBAY_PORT_IS_INPUT, "midi-in"); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_CARLA, PATCHBAY_PORT_MIDI_OUT, PATCHBAY_PORT_TYPE_MIDI, "midi-out"); | |||||
| } | } | ||||
| // Audio In | // Audio In | ||||
| @@ -677,7 +677,7 @@ public: | |||||
| for (unsigned int i=0; i < fAudioCountIn; ++i) | for (unsigned int i=0; i < fAudioCountIn; ++i) | ||||
| { | { | ||||
| std::snprintf(strBuf, STR_MAX, "capture_%i", i+1); | std::snprintf(strBuf, STR_MAX, "capture_%i", i+1); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_IN, PATCHBAY_GROUP_AUDIO_IN*1000 + i, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_OUTPUT, strBuf); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_IN, PATCHBAY_GROUP_AUDIO_IN*1000 + i, PATCHBAY_PORT_TYPE_AUDIO, strBuf); | |||||
| } | } | ||||
| } | } | ||||
| @@ -693,7 +693,7 @@ public: | |||||
| for (unsigned int i=0; i < fAudioCountOut; ++i) | for (unsigned int i=0; i < fAudioCountOut; ++i) | ||||
| { | { | ||||
| std::snprintf(strBuf, STR_MAX, "playback_%i", i+1); | std::snprintf(strBuf, STR_MAX, "playback_%i", i+1); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_OUT, PATCHBAY_GROUP_AUDIO_OUT*1000 + i, PATCHBAY_PORT_IS_AUDIO|PATCHBAY_PORT_IS_INPUT, strBuf); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_AUDIO_OUT, PATCHBAY_GROUP_AUDIO_OUT*1000 + i, PATCHBAY_PORT_TYPE_AUDIO|PATCHBAY_PORT_IS_INPUT, strBuf); | |||||
| } | } | ||||
| } | } | ||||
| @@ -708,7 +708,7 @@ public: | |||||
| std::strncpy(portNameToId.name, fDummyMidiIn.getPortName(i).c_str(), STR_MAX); | std::strncpy(portNameToId.name, fDummyMidiIn.getPortName(i).c_str(), STR_MAX); | ||||
| fUsedMidiIns.append(portNameToId); | fUsedMidiIns.append(portNameToId); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_IN, portNameToId.portId, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_OUTPUT, portNameToId.name); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_IN, portNameToId.portId, PATCHBAY_PORT_TYPE_MIDI, portNameToId.name); | |||||
| } | } | ||||
| } | } | ||||
| @@ -724,7 +724,7 @@ public: | |||||
| std::strncpy(portNameToId.name, fDummyMidiOut.getPortName(i).c_str(), STR_MAX); | std::strncpy(portNameToId.name, fDummyMidiOut.getPortName(i).c_str(), STR_MAX); | ||||
| fUsedMidiOuts.append(portNameToId); | fUsedMidiOuts.append(portNameToId); | ||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_OUT, portNameToId.portId, PATCHBAY_PORT_IS_MIDI|PATCHBAY_PORT_IS_INPUT, portNameToId.name); | |||||
| callback(ENGINE_CALLBACK_PATCHBAY_PORT_ADDED, 0, PATCHBAY_GROUP_MIDI_OUT, portNameToId.portId, PATCHBAY_PORT_TYPE_MIDI|PATCHBAY_PORT_IS_INPUT, portNameToId.name); | |||||
| } | } | ||||
| } | } | ||||
| #endif | #endif | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef CARLA_ENGINE_THREAD_HPP_INCLUDED | #ifndef CARLA_ENGINE_THREAD_HPP_INCLUDED | ||||
| #define CARLA_ENGINE_THREAD_HPP_INCLUDED | #define CARLA_ENGINE_THREAD_HPP_INCLUDED | ||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaBackend.h" | |||||
| #include "CarlaThread.hpp" | #include "CarlaThread.hpp" | ||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -30,7 +30,7 @@ OBJS = $(OBJSp) \ | |||||
| # CarlaEngineJuce.cpp.o | # CarlaEngineJuce.cpp.o | ||||
| HEADERS = \ | HEADERS = \ | ||||
| ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp \ | |||||
| ../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \ | |||||
| CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp | CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp | ||||
| TARGET = ../libcarla_engine.a | TARGET = ../libcarla_engine.a | ||||
| @@ -365,7 +365,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| unsigned int options = 0x0; | unsigned int options = 0x0; | ||||
| @@ -578,7 +578,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void showGui(const bool yesNo) override | |||||
| void showCustomUI(const bool yesNo) override | |||||
| { | { | ||||
| if (yesNo) | if (yesNo) | ||||
| osc_send_show(pData->osc.data); | osc_send_show(pData->osc.data); | ||||
| @@ -586,12 +586,12 @@ public: | |||||
| osc_send_hide(pData->osc.data); | osc_send_hide(pData->osc.data); | ||||
| } | } | ||||
| void idleGui() override | |||||
| void idle() override | |||||
| { | { | ||||
| if (! pData->osc.thread.isRunning()) | if (! pData->osc.thread.isRunning()) | ||||
| carla_stderr2("TESTING: Bridge has closed!"); | carla_stderr2("TESTING: Bridge has closed!"); | ||||
| CarlaPlugin::idleGui(); | |||||
| CarlaPlugin::idle(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -891,7 +891,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1389,17 +1389,15 @@ public: | |||||
| case kPluginBridgeParameterData: | case kPluginBridgeParameterData: | ||||
| { | { | ||||
| CARLA_BRIDGE_CHECK_OSC_TYPES(6, "iiiiii"); | |||||
| CARLA_BRIDGE_CHECK_OSC_TYPES(5, "iiiii"); | |||||
| const int32_t index = argv[0]->i; | const int32_t index = argv[0]->i; | ||||
| const int32_t type = argv[1]->i; | |||||
| const int32_t rindex = argv[2]->i; | const int32_t rindex = argv[2]->i; | ||||
| const int32_t hints = argv[3]->i; | const int32_t hints = argv[3]->i; | ||||
| const int32_t channel = argv[4]->i; | const int32_t channel = argv[4]->i; | ||||
| const int32_t cc = argv[5]->i; | const int32_t cc = argv[5]->i; | ||||
| CARLA_ASSERT_INT2(index >= 0 && index < static_cast<int32_t>(pData->param.count), index, pData->param.count); | CARLA_ASSERT_INT2(index >= 0 && index < static_cast<int32_t>(pData->param.count), index, pData->param.count); | ||||
| CARLA_ASSERT(type >= 0); | |||||
| CARLA_ASSERT(rindex >= 0); | CARLA_ASSERT(rindex >= 0); | ||||
| CARLA_ASSERT(hints >= 0); | CARLA_ASSERT(hints >= 0); | ||||
| CARLA_ASSERT(channel >= 0 && channel < 16); | CARLA_ASSERT(channel >= 0 && channel < 16); | ||||
| @@ -1407,7 +1405,6 @@ public: | |||||
| if (index >= 0 && static_cast<int32_t>(pData->param.count)) | if (index >= 0 && static_cast<int32_t>(pData->param.count)) | ||||
| { | { | ||||
| pData->param.data[index].type = static_cast<ParameterType>(type); | |||||
| pData->param.data[index].index = index; | pData->param.data[index].index = index; | ||||
| pData->param.data[index].rindex = rindex; | pData->param.data[index].rindex = rindex; | ||||
| pData->param.data[index].hints = hints; | pData->param.data[index].hints = hints; | ||||
| @@ -349,7 +349,7 @@ const ParameterRanges& CarlaPlugin::getParameterRanges(const uint32_t parameterI | |||||
| bool CarlaPlugin::isParameterOutput(const uint32_t parameterId) const | bool CarlaPlugin::isParameterOutput(const uint32_t parameterId) const | ||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); | CARLA_SAFE_ASSERT_RETURN(parameterId < pData->param.count, false); | ||||
| return (pData->param.data[parameterId].type == PARAMETER_OUTPUT); | |||||
| return ((pData->param.data[parameterId].hints & PARAMETER_IS_INPUT) == 0); | |||||
| } | } | ||||
| const MidiProgramData& CarlaPlugin::getMidiProgramData(const uint32_t index) const | const MidiProgramData& CarlaPlugin::getMidiProgramData(const uint32_t index) const | ||||
| @@ -374,7 +374,7 @@ int32_t CarlaPlugin::getChunkData(void** const dataPtr) const | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int CarlaPlugin::getAvailableOptions() const | |||||
| unsigned int CarlaPlugin::getOptionsAvailable() const | |||||
| { | { | ||||
| CARLA_ASSERT(false); // this should never happen | CARLA_ASSERT(false); // this should never happen | ||||
| return 0x0; | return 0x0; | ||||
| @@ -463,17 +463,16 @@ void CarlaPlugin::getMidiProgramName(const uint32_t index, char* const strBuf) c | |||||
| std::strncpy(strBuf, pData->midiprog.data[index].name, STR_MAX); | std::strncpy(strBuf, pData->midiprog.data[index].name, STR_MAX); | ||||
| } | } | ||||
| void CarlaPlugin::getParameterCountInfo(uint32_t& ins, uint32_t& outs, uint32_t& total) const | |||||
| void CarlaPlugin::getParameterCountInfo(uint32_t& ins, uint32_t& outs) const noexcept | |||||
| { | { | ||||
| ins = 0; | ins = 0; | ||||
| outs = 0; | outs = 0; | ||||
| total = pData->param.count; | |||||
| for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
| { | { | ||||
| if (pData->param.data[i].type == PARAMETER_INPUT) | |||||
| if (pData->param.data[i].hints & PARAMETER_IS_INPUT) | |||||
| ++ins; | ++ins; | ||||
| else if (pData->param.data[i].type == PARAMETER_OUTPUT) | |||||
| else | |||||
| ++outs; | ++outs; | ||||
| } | } | ||||
| } | } | ||||
| @@ -566,7 +565,7 @@ const SaveState& CarlaPlugin::getSaveState() | |||||
| { | { | ||||
| const ParameterData& paramData(pData->param.data[i]); | const ParameterData& paramData(pData->param.data[i]); | ||||
| if (paramData.type != PARAMETER_INPUT || (paramData.hints & PARAMETER_IS_ENABLED) == 0) | |||||
| if ((paramData.hints & PARAMETER_IS_INPUT) == 0 || (paramData.hints & PARAMETER_IS_ENABLED) == 0) | |||||
| continue; | continue; | ||||
| StateParameter* stateParameter(new StateParameter()); | StateParameter* stateParameter(new StateParameter()); | ||||
| @@ -897,7 +896,7 @@ void CarlaPlugin::setName(const char* const newName) | |||||
| void CarlaPlugin::setOption(const unsigned int option, const bool yesNo) | void CarlaPlugin::setOption(const unsigned int option, const bool yesNo) | ||||
| { | { | ||||
| CARLA_ASSERT(getAvailableOptions() & option); | |||||
| CARLA_ASSERT(getOptionsAvailable() & option); | |||||
| if (yesNo) | if (yesNo) | ||||
| fOptions |= option; | fOptions |= option; | ||||
| @@ -1424,7 +1423,7 @@ void CarlaPlugin::setMidiProgramById(const uint32_t bank, const uint32_t program | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void CarlaPlugin::showGui(const bool yesNo) | |||||
| void CarlaPlugin::showCustomUI(const bool yesNo) | |||||
| { | { | ||||
| CARLA_ASSERT(false); | CARLA_ASSERT(false); | ||||
| return; | return; | ||||
| @@ -1433,7 +1432,7 @@ void CarlaPlugin::showGui(const bool yesNo) | |||||
| (void)yesNo; | (void)yesNo; | ||||
| } | } | ||||
| void CarlaPlugin::idleGui() | |||||
| void CarlaPlugin::idle() | |||||
| { | { | ||||
| if (! fEnabled) | if (! fEnabled) | ||||
| return; | return; | ||||
| @@ -1446,7 +1445,7 @@ void CarlaPlugin::idleGui() | |||||
| // Update parameter outputs | // Update parameter outputs | ||||
| for (uint32_t i=0; i < pData->param.count; ++i) | for (uint32_t i=0; i < pData->param.count; ++i) | ||||
| { | { | ||||
| if (pData->param.data[i].type == PARAMETER_OUTPUT) | |||||
| if ((pData->param.data[i].hints & PARAMETER_IS_INPUT) == 0) | |||||
| uiParameterChange(i, getParameterValue(i)); | uiParameterChange(i, getParameterValue(i)); | ||||
| } | } | ||||
| } | } | ||||
| @@ -1546,15 +1545,15 @@ void CarlaPlugin::registerToOscClient() | |||||
| // Base count | // Base count | ||||
| { | { | ||||
| uint32_t cIns, cOuts, cTotals; | |||||
| getParameterCountInfo(cIns, cOuts, cTotals); | |||||
| uint32_t cIns, cOuts; | |||||
| getParameterCountInfo(cIns, cOuts); | |||||
| #ifdef BUILD_BRIDGE | #ifdef BUILD_BRIDGE | ||||
| pData->engine->oscSend_bridge_audio_count(getAudioInCount(), getAudioOutCount(), getAudioInCount() + getAudioOutCount()); | pData->engine->oscSend_bridge_audio_count(getAudioInCount(), getAudioOutCount(), getAudioInCount() + getAudioOutCount()); | ||||
| pData->engine->oscSend_bridge_midi_count(getMidiInCount(), getMidiOutCount(), getMidiInCount() + getMidiOutCount()); | pData->engine->oscSend_bridge_midi_count(getMidiInCount(), getMidiOutCount(), getMidiInCount() + getMidiOutCount()); | ||||
| pData->engine->oscSend_bridge_parameter_count(cIns, cOuts, cTotals); | pData->engine->oscSend_bridge_parameter_count(cIns, cOuts, cTotals); | ||||
| #else | #else | ||||
| pData->engine->oscSend_control_set_plugin_ports(fId, getAudioInCount(), getAudioOutCount(), getMidiInCount(), getMidiOutCount(), cIns, cOuts, cTotals); | |||||
| pData->engine->oscSend_control_set_plugin_ports(fId, getAudioInCount(), getAudioOutCount(), getMidiInCount(), getMidiOutCount(), cIns, cOuts); | |||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -1576,11 +1575,11 @@ void CarlaPlugin::registerToOscClient() | |||||
| #ifdef BUILD_BRIDGE | #ifdef BUILD_BRIDGE | ||||
| pData->engine->oscSend_bridge_parameter_info(i, bufName, bufUnit); | pData->engine->oscSend_bridge_parameter_info(i, bufName, bufUnit); | ||||
| pData->engine->oscSend_bridge_parameter_data(i, paramData.type, paramData.rindex, paramData.hints, paramData.midiChannel, paramData.midiCC); | |||||
| pData->engine->oscSend_bridge_parameter_data(i, paramData.rindex, paramData.hints, paramData.midiChannel, paramData.midiCC); | |||||
| pData->engine->oscSend_bridge_parameter_ranges(i, paramRanges.def, paramRanges.min, paramRanges.max, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge); | pData->engine->oscSend_bridge_parameter_ranges(i, paramRanges.def, paramRanges.min, paramRanges.max, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge); | ||||
| pData->engine->oscSend_bridge_set_parameter_value(i, getParameterValue(i)); | pData->engine->oscSend_bridge_set_parameter_value(i, getParameterValue(i)); | ||||
| #else | #else | ||||
| pData->engine->oscSend_control_set_parameter_data(fId, i, paramData.type, paramData.hints, bufName, bufUnit, getParameterValue(i)); | |||||
| pData->engine->oscSend_control_set_parameter_data(fId, i,paramData.hints, bufName, bufUnit, getParameterValue(i)); | |||||
| pData->engine->oscSend_control_set_parameter_ranges(fId, i, paramRanges.min, paramRanges.max, paramRanges.def, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge); | pData->engine->oscSend_control_set_parameter_ranges(fId, i, paramRanges.min, paramRanges.max, paramRanges.def, paramRanges.step, paramRanges.stepSmall, paramRanges.stepLarge); | ||||
| pData->engine->oscSend_control_set_parameter_midi_cc(fId, i, paramData.midiCC); | pData->engine->oscSend_control_set_parameter_midi_cc(fId, i, paramData.midiCC); | ||||
| pData->engine->oscSend_control_set_parameter_midi_channel(fId, i, paramData.midiChannel); | pData->engine->oscSend_control_set_parameter_midi_channel(fId, i, paramData.midiChannel); | ||||
| @@ -51,8 +51,6 @@ const unsigned short kPluginMaxMidiEvents = 512; | |||||
| const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_IN = 0x01; | const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_IN = 0x01; | ||||
| const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_OUT = 0x02; | const unsigned int PLUGIN_EXTRA_HINT_HAS_MIDI_OUT = 0x02; | ||||
| const unsigned int PLUGIN_EXTRA_HINT_CAN_RUN_RACK = 0x04; | const unsigned int PLUGIN_EXTRA_HINT_CAN_RUN_RACK = 0x04; | ||||
| const unsigned int PLUGIN_EXTRA_HINT_FIXED_BUFFERS = 0x10; | |||||
| const unsigned int PLUGIN_EXTRA_HINT_SINGLE_THREAD = 0x20; | |||||
| // ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef CARLA_PLUGIN_THREAD_HPP_INCLUDED | #ifndef CARLA_PLUGIN_THREAD_HPP_INCLUDED | ||||
| #define CARLA_PLUGIN_THREAD_HPP_INCLUDED | #define CARLA_PLUGIN_THREAD_HPP_INCLUDED | ||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaBackend.h" | |||||
| #include "CarlaThread.hpp" | #include "CarlaThread.hpp" | ||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -53,9 +53,9 @@ public: | |||||
| carla_debug("DssiPlugin::~DssiPlugin()"); | carla_debug("DssiPlugin::~DssiPlugin()"); | ||||
| // close UI | // close UI | ||||
| if (fHints & PLUGIN_HAS_GUI) | |||||
| if (fHints & PLUGIN_HAS_CUSTOM_UI) | |||||
| { | { | ||||
| showGui(false); | |||||
| showCustomUI(false); | |||||
| pData->osc.thread.stop(pData->engine->getOptions().uiBridgesTimeout * 2); | pData->osc.thread.stop(pData->engine->getOptions().uiBridgesTimeout * 2); | ||||
| } | } | ||||
| @@ -154,7 +154,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| const bool isAmSynth = fFilename.contains("amsynth", true); | const bool isAmSynth = fFilename.contains("amsynth", true); | ||||
| const bool isDssiVst = fFilename.contains("dssi-vst", true); | const bool isDssiVst = fFilename.contains("dssi-vst", true); | ||||
| @@ -358,7 +358,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void showGui(const bool yesNo) override | |||||
| void showCustomUI(const bool yesNo) override | |||||
| { | { | ||||
| if (yesNo) | if (yesNo) | ||||
| { | { | ||||
| @@ -615,7 +615,7 @@ public: | |||||
| if (LADSPA_IS_PORT_INPUT(portType)) | if (LADSPA_IS_PORT_INPUT(portType)) | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlIn = true; | needsCtrlIn = true; | ||||
| @@ -658,7 +658,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlOut = true; | needsCtrlOut = true; | ||||
| @@ -666,7 +665,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_UNKNOWN; | |||||
| carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | ||||
| } | } | ||||
| @@ -745,7 +743,7 @@ public: | |||||
| fHints |= PLUGIN_IS_RTSAFE; | fHints |= PLUGIN_IS_RTSAFE; | ||||
| if (fGuiFilename != nullptr) | if (fGuiFilename != nullptr) | ||||
| fHints |= PLUGIN_HAS_GUI; | |||||
| fHints |= PLUGIN_HAS_CUSTOM_UI; | |||||
| if (aOuts > 0 && (aIns == aOuts || aIns == 1)) | if (aOuts > 0 && (aIns == aOuts || aIns == 1)) | ||||
| fHints |= PLUGIN_CAN_DRYWET; | fHints |= PLUGIN_CAN_DRYWET; | ||||
| @@ -1163,7 +1161,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1411,7 +1409,7 @@ public: | |||||
| for (uint32_t k=0; k < pData->param.count; ++k) | for (uint32_t k=0; k < pData->param.count; ++k) | ||||
| { | { | ||||
| if (pData->param.data[k].type != PARAMETER_OUTPUT) | |||||
| if (pData->param.data[k].hints & PARAMETER_IS_INPUT) | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC > 0) | if (pData->param.data[k].midiCC > 0) | ||||
| @@ -1954,7 +1952,7 @@ public: | |||||
| pData->idStr += std::strrchr(filename, OS_SEP)+1; | pData->idStr += std::strrchr(filename, OS_SEP)+1; | ||||
| pData->idStr += "/"; | pData->idStr += "/"; | ||||
| pData->idStr += label; | pData->idStr += label; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| // ignore settings, we need this anyway | // ignore settings, we need this anyway | ||||
| if (isAmSynth || isDssiVst) | if (isAmSynth || isDssiVst) | ||||
| @@ -156,7 +156,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| unsigned int options = 0x0; | unsigned int options = 0x0; | ||||
| @@ -644,8 +644,7 @@ public: | |||||
| j = FluidSynthReverbOnOff; | j = FluidSynthReverbOnOff; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/ | PARAMETER_IS_BOOLEAN; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/ | PARAMETER_IS_BOOLEAN; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -660,8 +659,7 @@ public: | |||||
| j = FluidSynthReverbRoomSize; | j = FluidSynthReverbRoomSize; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -676,8 +674,7 @@ public: | |||||
| j = FluidSynthReverbDamp; | j = FluidSynthReverbDamp; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -692,8 +689,7 @@ public: | |||||
| j = FluidSynthReverbLevel; | j = FluidSynthReverbLevel; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = MIDI_CONTROL_REVERB_SEND_LEVEL; | pData->param.data[j].midiCC = MIDI_CONTROL_REVERB_SEND_LEVEL; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -708,8 +704,7 @@ public: | |||||
| j = FluidSynthReverbWidth; | j = FluidSynthReverbWidth; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED /*| PARAMETER_IS_AUTOMABLE*/; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -724,8 +719,7 @@ public: | |||||
| j = FluidSynthChorusOnOff; | j = FluidSynthChorusOnOff; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_BOOLEAN; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_BOOLEAN; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -740,8 +734,7 @@ public: | |||||
| j = FluidSynthChorusNr; | j = FluidSynthChorusNr; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -756,8 +749,7 @@ public: | |||||
| j = FluidSynthChorusLevel; | j = FluidSynthChorusLevel; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = 0; //MIDI_CONTROL_CHORUS_SEND_LEVEL; | pData->param.data[j].midiCC = 0; //MIDI_CONTROL_CHORUS_SEND_LEVEL; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -772,8 +764,7 @@ public: | |||||
| j = FluidSynthChorusSpeedHz; | j = FluidSynthChorusSpeedHz; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.29f; | pData->param.ranges[j].min = 0.29f; | ||||
| @@ -788,8 +779,7 @@ public: | |||||
| j = FluidSynthChorusDepthMs; | j = FluidSynthChorusDepthMs; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 0.0f; | pData->param.ranges[j].min = 0.0f; | ||||
| @@ -804,8 +794,7 @@ public: | |||||
| j = FluidSynthChorusType; | j = FluidSynthChorusType; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = FLUID_CHORUS_MOD_SINE; | pData->param.ranges[j].min = FLUID_CHORUS_MOD_SINE; | ||||
| @@ -820,8 +809,7 @@ public: | |||||
| j = FluidSynthPolyphony; | j = FluidSynthPolyphony; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = 1.0f; | pData->param.ranges[j].min = 1.0f; | ||||
| @@ -836,8 +824,7 @@ public: | |||||
| j = FluidSynthInterpolation; | j = FluidSynthInterpolation; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT | PARAMETER_IS_ENABLED | PARAMETER_IS_INTEGER | PARAMETER_USES_SCALEPOINTS; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = FLUID_INTERP_NONE; | pData->param.ranges[j].min = FLUID_INTERP_NONE; | ||||
| @@ -852,7 +839,6 @@ public: | |||||
| j = FluidSynthVoiceCount; | j = FluidSynthVoiceCount; | ||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_AUTOMABLE | PARAMETER_IS_INTEGER; | pData->param.data[j].hints = PARAMETER_IS_ENABLED | PARAMETER_IS_AUTOMABLE | PARAMETER_IS_INTEGER; | ||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| @@ -1176,7 +1162,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1608,7 +1594,7 @@ public: | |||||
| // load settings | // load settings | ||||
| pData->idStr = "SF2/"; | pData->idStr = "SF2/"; | ||||
| pData->idStr += label; | pData->idStr += label; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| } | } | ||||
| return true; | return true; | ||||
| @@ -163,7 +163,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| const bool isDssiVst = fFilename.contains("dssi-vst", true); | const bool isDssiVst = fFilename.contains("dssi-vst", true); | ||||
| @@ -622,7 +622,7 @@ public: | |||||
| if (LADSPA_IS_PORT_INPUT(portType)) | if (LADSPA_IS_PORT_INPUT(portType)) | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlIn = true; | needsCtrlIn = true; | ||||
| @@ -653,7 +653,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlOut = true; | needsCtrlOut = true; | ||||
| @@ -661,7 +660,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_UNKNOWN; | |||||
| carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | ||||
| } | } | ||||
| @@ -988,7 +986,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1059,7 +1057,7 @@ public: | |||||
| for (uint32_t k=0; k < pData->param.count; ++k) | for (uint32_t k=0; k < pData->param.count; ++k) | ||||
| { | { | ||||
| if (pData->param.data[k].type != PARAMETER_OUTPUT) | |||||
| if (pData->param.data[k].hints & PARAMETER_IS_INPUT) | |||||
| continue; | continue; | ||||
| pData->param.ranges[k].fixValue(fParamBuffers[k]); | pData->param.ranges[k].fixValue(fParamBuffers[k]); | ||||
| @@ -1481,7 +1479,7 @@ public: | |||||
| pData->idStr += CarlaString(getUniqueId()); | pData->idStr += CarlaString(getUniqueId()); | ||||
| pData->idStr += "/"; | pData->idStr += "/"; | ||||
| pData->idStr += label; | pData->idStr += label; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| // ignore settings, we need this anyway | // ignore settings, we need this anyway | ||||
| if (isDssiVst) | if (isDssiVst) | ||||
| @@ -245,7 +245,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| unsigned int options = 0x0; | unsigned int options = 0x0; | ||||
| @@ -682,7 +682,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1104,7 +1104,7 @@ public: | |||||
| pData->idStr = kIsGIG ? "GIG" : "SFZ"; | pData->idStr = kIsGIG ? "GIG" : "SFZ"; | ||||
| pData->idStr += "/"; | pData->idStr += "/"; | ||||
| pData->idStr += label; | pData->idStr += label; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| } | } | ||||
| return true; | return true; | ||||
| @@ -397,7 +397,7 @@ public: | |||||
| // close UI | // close UI | ||||
| if (fUi.type != PLUGIN_UI_NULL) | if (fUi.type != PLUGIN_UI_NULL) | ||||
| { | { | ||||
| showGui(false); | |||||
| showCustomUI(false); | |||||
| if (fUi.type == PLUGIN_UI_OSC) | if (fUi.type == PLUGIN_UI_OSC) | ||||
| { | { | ||||
| @@ -630,7 +630,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| const uint32_t hasMidiIn(getMidiInCount() > 0); | const uint32_t hasMidiIn(getMidiInCount() > 0); | ||||
| @@ -1066,7 +1066,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void showGui(const bool yesNo) override | |||||
| void showCustomUI(const bool yesNo) override | |||||
| { | { | ||||
| if (fUi.type == PLUGIN_UI_NULL) | if (fUi.type == PLUGIN_UI_NULL) | ||||
| return; | return; | ||||
| @@ -1229,7 +1229,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void idleGui() override | |||||
| void idle() override | |||||
| { | { | ||||
| //if (fUi.type == PLUGIN_UI_NULL) | //if (fUi.type == PLUGIN_UI_NULL) | ||||
| // return CarlaPlugin::idleGui(); | // return CarlaPlugin::idleGui(); | ||||
| @@ -1270,12 +1270,12 @@ public: | |||||
| if (fExt.uiidle != nullptr && fExt.uiidle->idle(fUi.handle) != 0) | if (fExt.uiidle != nullptr && fExt.uiidle->idle(fUi.handle) != 0) | ||||
| { | { | ||||
| showGui(false); | |||||
| showCustomUI(false); | |||||
| pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, fId, 0, 0, 0.0f, nullptr); | pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, fId, 0, 0, 0.0f, nullptr); | ||||
| } | } | ||||
| } | } | ||||
| CarlaPlugin::idleGui(); | |||||
| CarlaPlugin::idle(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -1570,10 +1570,9 @@ public: | |||||
| fDescriptor->connect_port(fHandle2, i, fCvIn.ports[j].port->getBuffer()); | fDescriptor->connect_port(fHandle2, i, fCvIn.ports[j].port->getBuffer()); | ||||
| j = fCvIn.ports[j].param; | j = fCvIn.ports[j].param; | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = i; | pData->param.data[j].rindex = i; | ||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED|PARAMETER_IS_READ_ONLY; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT|PARAMETER_IS_ENABLED|PARAMETER_IS_READ_ONLY; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| pData->param.ranges[j].min = -1.0f; | pData->param.ranges[j].min = -1.0f; | ||||
| @@ -1598,7 +1597,6 @@ public: | |||||
| fDescriptor->connect_port(fHandle2, i, fCvOut.ports[j].port->getBuffer()); | fDescriptor->connect_port(fHandle2, i, fCvOut.ports[j].port->getBuffer()); | ||||
| j = fCvOut.ports[j].param; | j = fCvOut.ports[j].param; | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = i; | pData->param.data[j].rindex = i; | ||||
| pData->param.data[j].hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints = PARAMETER_IS_ENABLED|PARAMETER_IS_AUTOMABLE; | ||||
| @@ -1960,7 +1958,7 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlIn = true; | needsCtrlIn = true; | ||||
| @@ -2009,7 +2007,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | pData->param.data[j].hints |= PARAMETER_IS_ENABLED; | ||||
| pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | pData->param.data[j].hints |= PARAMETER_IS_AUTOMABLE; | ||||
| needsCtrlOut = true; | needsCtrlOut = true; | ||||
| @@ -2017,7 +2014,6 @@ public: | |||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_UNKNOWN; | |||||
| carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | carla_stderr2("WARNING - Got a broken Port (Control, but not input or output)"); | ||||
| } | } | ||||
| @@ -2121,7 +2117,7 @@ public: | |||||
| if (fUi.type != PLUGIN_UI_NULL) | if (fUi.type != PLUGIN_UI_NULL) | ||||
| { | { | ||||
| fHints |= PLUGIN_HAS_GUI; | |||||
| fHints |= PLUGIN_HAS_CUSTOM_UI; | |||||
| if (fUi.type == PLUGIN_UI_QT || fUi.type == PLUGIN_UI_PARENT) | if (fUi.type == PLUGIN_UI_QT || fUi.type == PLUGIN_UI_PARENT) | ||||
| fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | ||||
| @@ -2804,7 +2800,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -3064,7 +3060,7 @@ public: | |||||
| for (k=0; k < pData->param.count; ++k) | for (k=0; k < pData->param.count; ++k) | ||||
| { | { | ||||
| if (pData->param.data[k].type != PARAMETER_OUTPUT) | |||||
| if (pData->param.data[k].hints & PARAMETER_IS_INPUT) | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].hints & PARAMETER_IS_STRICT_BOUNDS) | if (pData->param.data[k].hints & PARAMETER_IS_STRICT_BOUNDS) | ||||
| @@ -3188,7 +3184,7 @@ public: | |||||
| for (k=0; k < pData->param.count; ++k) | for (k=0; k < pData->param.count; ++k) | ||||
| { | { | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].hints & PARAMETER_IS_TRIGGER) | if (pData->param.data[k].hints & PARAMETER_IS_TRIGGER) | ||||
| @@ -4046,20 +4042,20 @@ protected: | |||||
| switch (type) | switch (type) | ||||
| { | { | ||||
| case LV2_UI_GTK2: | |||||
| return options.bridge_lv2Gtk2; | |||||
| case LV2_UI_GTK3: | |||||
| return options.bridge_lv2Gtk3; | |||||
| case LV2_UI_QT4: | |||||
| return options.bridge_lv2Qt4; | |||||
| case LV2_UI_QT5: | |||||
| return options.bridge_lv2Qt5; | |||||
| case LV2_UI_COCOA: | |||||
| return options.bridge_lv2Cocoa; | |||||
| case LV2_UI_WINDOWS: | |||||
| return options.bridge_lv2Win; | |||||
| case LV2_UI_X11: | |||||
| return options.bridge_lv2X11; | |||||
| // case LV2_UI_GTK2: | |||||
| // return options.bridge_lv2Gtk2; | |||||
| // case LV2_UI_GTK3: | |||||
| // return options.bridge_lv2Gtk3; | |||||
| // case LV2_UI_QT4: | |||||
| // return options.bridge_lv2Qt4; | |||||
| // case LV2_UI_QT5: | |||||
| // return options.bridge_lv2Qt5; | |||||
| // case LV2_UI_COCOA: | |||||
| // return options.bridge_lv2Cocoa; | |||||
| // case LV2_UI_WINDOWS: | |||||
| // return options.bridge_lv2Win; | |||||
| // case LV2_UI_X11: | |||||
| // return options.bridge_lv2X11; | |||||
| default: | default: | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| @@ -4469,7 +4465,7 @@ public: | |||||
| // load settings | // load settings | ||||
| pData->idStr = "LV2/"; | pData->idStr = "LV2/"; | ||||
| pData->idStr += uri; | pData->idStr += uri; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| // ignore settings, we need this anyway | // ignore settings, we need this anyway | ||||
| if (getMidiInCount() > 0 || needsFixedBuffer()) | if (getMidiInCount() > 0 || needsFixedBuffer()) | ||||
| @@ -34,7 +34,7 @@ OBJS = \ | |||||
| LinuxSamplerPlugin.cpp.o | LinuxSamplerPlugin.cpp.o | ||||
| HEADERS = \ | HEADERS = \ | ||||
| ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp \ | |||||
| ../CarlaBackend.h ../CarlaEngine.hpp ../CarlaPlugin.hpp \ | |||||
| CarlaPluginInternal.hpp CarlaPluginThread.hpp | CarlaPluginInternal.hpp CarlaPluginThread.hpp | ||||
| TARGET = ../libcarla_plugin.a | TARGET = ../libcarla_plugin.a | ||||
| @@ -245,7 +245,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr, 0x0); | CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr, 0x0); | ||||
| @@ -628,7 +628,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void showGui(const bool yesNo) override | |||||
| void showCustomUI(const bool yesNo) override | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); | ||||
| CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | ||||
| @@ -670,13 +670,15 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| void idleGui() override | |||||
| void idle() override | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fDescriptor != nullptr,); | ||||
| CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr,); | ||||
| if (fIsUiVisible && fDescriptor->ui_idle != nullptr) | if (fIsUiVisible && fDescriptor->ui_idle != nullptr) | ||||
| fDescriptor->ui_idle(fHandle); | fDescriptor->ui_idle(fHandle); | ||||
| CarlaPlugin::idle(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -959,12 +961,11 @@ public: | |||||
| if (paramInfo->hints & ::PARAMETER_IS_OUTPUT) | if (paramInfo->hints & ::PARAMETER_IS_OUTPUT) | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_OUTPUT; | |||||
| needsCtrlOut = true; | needsCtrlOut = true; | ||||
| } | } | ||||
| else | else | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].hints |= PARAMETER_IS_INPUT; | |||||
| needsCtrlIn = true; | needsCtrlIn = true; | ||||
| } | } | ||||
| @@ -1428,7 +1429,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -1614,7 +1615,7 @@ public: | |||||
| for (k=0; k < pData->param.count; ++k) | for (k=0; k < pData->param.count; ++k) | ||||
| { | { | ||||
| if (pData->param.data[k].type != PARAMETER_OUTPUT) | |||||
| if (pData->param.data[k].hints & PARAMETER_IS_INPUT) | |||||
| continue; | continue; | ||||
| curValue = fDescriptor->get_parameter_value(fHandle, k); | curValue = fDescriptor->get_parameter_value(fHandle, k); | ||||
| @@ -2317,7 +2318,7 @@ public: | |||||
| // load settings | // load settings | ||||
| pData->idStr = "Native/"; | pData->idStr = "Native/"; | ||||
| pData->idStr += label; | pData->idStr += label; | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| // ignore settings, we need this anyway | // ignore settings, we need this anyway | ||||
| if (getMidiInCount() > 0 || (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) != 0) | if (getMidiInCount() > 0 || (fDescriptor->hints & ::PLUGIN_NEEDS_FIXED_BUFFERS) != 0) | ||||
| @@ -72,9 +72,9 @@ public: | |||||
| carla_debug("VstPlugin::~VstPlugin()"); | carla_debug("VstPlugin::~VstPlugin()"); | ||||
| // close UI | // close UI | ||||
| if (fHints & PLUGIN_HAS_GUI) | |||||
| if (fHints & PLUGIN_HAS_CUSTOM_UI) | |||||
| { | { | ||||
| showGui(false); | |||||
| showCustomUI(false); | |||||
| if (fGui.isOsc) | if (fGui.isOsc) | ||||
| { | { | ||||
| @@ -177,7 +177,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Information (per-plugin data) | // Information (per-plugin data) | ||||
| unsigned int getAvailableOptions() const override | |||||
| unsigned int getOptionsAvailable() const override | |||||
| { | { | ||||
| CARLA_ASSERT(fEffect != nullptr); | CARLA_ASSERT(fEffect != nullptr); | ||||
| @@ -363,7 +363,7 @@ public: | |||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| // Set gui stuff | // Set gui stuff | ||||
| void showGui(const bool yesNo) override | |||||
| void showCustomUI(const bool yesNo) override | |||||
| { | { | ||||
| if (fGui.isVisible == yesNo) | if (fGui.isVisible == yesNo) | ||||
| return; | return; | ||||
| @@ -468,7 +468,7 @@ public: | |||||
| fGui.isVisible = yesNo; | fGui.isVisible = yesNo; | ||||
| } | } | ||||
| void idleGui() override | |||||
| void idle() override | |||||
| { | { | ||||
| #ifdef VESTIGE_HEADER | #ifdef VESTIGE_HEADER | ||||
| if (fEffect != nullptr /*&& effect->ptr1*/) | if (fEffect != nullptr /*&& effect->ptr1*/) | ||||
| @@ -486,7 +486,7 @@ public: | |||||
| } | } | ||||
| } | } | ||||
| CarlaPlugin::idleGui(); | |||||
| CarlaPlugin::idle(); | |||||
| } | } | ||||
| // ------------------------------------------------------------------- | // ------------------------------------------------------------------- | ||||
| @@ -605,10 +605,9 @@ public: | |||||
| for (j=0; j < params; ++j) | for (j=0; j < params; ++j) | ||||
| { | { | ||||
| pData->param.data[j].type = PARAMETER_INPUT; | |||||
| pData->param.data[j].index = j; | pData->param.data[j].index = j; | ||||
| pData->param.data[j].rindex = j; | pData->param.data[j].rindex = j; | ||||
| pData->param.data[j].hints = 0x0; | |||||
| pData->param.data[j].hints = PARAMETER_IS_INPUT; | |||||
| pData->param.data[j].midiChannel = 0; | pData->param.data[j].midiChannel = 0; | ||||
| pData->param.data[j].midiCC = -1; | pData->param.data[j].midiCC = -1; | ||||
| @@ -787,7 +786,7 @@ public: | |||||
| if (fEffect->flags & effFlagsHasEditor) | if (fEffect->flags & effFlagsHasEditor) | ||||
| { | { | ||||
| fHints |= PLUGIN_HAS_GUI; | |||||
| fHints |= PLUGIN_HAS_CUSTOM_UI; | |||||
| if (! fGui.isOsc) | if (! fGui.isOsc) | ||||
| fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | fHints |= PLUGIN_NEEDS_SINGLE_THREAD; | ||||
| @@ -799,9 +798,6 @@ public: | |||||
| if ((fEffect->flags & effFlagsCanReplacing) != 0 && fEffect->processReplacing != fEffect->process) | if ((fEffect->flags & effFlagsCanReplacing) != 0 && fEffect->processReplacing != fEffect->process) | ||||
| fHints |= PLUGIN_CAN_PROCESS_REPLACING; | fHints |= PLUGIN_CAN_PROCESS_REPLACING; | ||||
| if (fEffect->flags & effFlagsHasEditor) | |||||
| fHints |= PLUGIN_HAS_GUI; | |||||
| if (static_cast<uintptr_t>(dispatcher(effCanDo, 0, 0, (void*)"hasCockosExtensions", 0.0f)) == 0xbeef0000) | if (static_cast<uintptr_t>(dispatcher(effCanDo, 0, 0, (void*)"hasCockosExtensions", 0.0f)) == 0xbeef0000) | ||||
| fHints |= PLUGIN_HAS_COCKOS_EXTENSIONS; | fHints |= PLUGIN_HAS_COCKOS_EXTENSIONS; | ||||
| @@ -1256,7 +1252,7 @@ public: | |||||
| continue; | continue; | ||||
| if (pData->param.data[k].midiCC != ctrlEvent.param) | if (pData->param.data[k].midiCC != ctrlEvent.param) | ||||
| continue; | continue; | ||||
| if (pData->param.data[k].type != PARAMETER_INPUT) | |||||
| if ((pData->param.data[k].hints & PARAMETER_IS_INPUT) == 0) | |||||
| continue; | continue; | ||||
| if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | if ((pData->param.data[k].hints & PARAMETER_IS_AUTOMABLE) == 0) | ||||
| continue; | continue; | ||||
| @@ -2327,7 +2323,7 @@ public: | |||||
| //pData->idStr += std::strrchr(filename, OS_SEP)+1; // FIXME! | //pData->idStr += std::strrchr(filename, OS_SEP)+1; // FIXME! | ||||
| //pData->idStr += "/"; | //pData->idStr += "/"; | ||||
| pData->idStr += CarlaString(getUniqueId()); | pData->idStr += CarlaString(getUniqueId()); | ||||
| fOptions = pData->loadSettings(fOptions, getAvailableOptions()); | |||||
| fOptions = pData->loadSettings(fOptions, getOptionsAvailable()); | |||||
| // ignore settings, we need this anyway | // ignore settings, we need this anyway | ||||
| if (getMidiInCount() > 0) | if (getMidiInCount() > 0) | ||||
| @@ -296,11 +296,11 @@ const char* const* carla_get_engine_driver_device_names(unsigned int index) | |||||
| return CarlaEngine::getDriverDeviceNames(index); | return CarlaEngine::getDriverDeviceNames(index); | ||||
| } | } | ||||
| const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* deviceName) | |||||
| const EngineDriverDeviceInfo* carla_get_engine_driver_device_info(unsigned int index, const char* name) | |||||
| { | { | ||||
| carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, deviceName); | |||||
| carla_debug("carla_get_engine_driver_device_info(%i, \"%s\")", index, name); | |||||
| return CarlaEngine::getDriverDeviceInfo(index, deviceName); | |||||
| return CarlaEngine::getDriverDeviceInfo(index, name); | |||||
| } | } | ||||
| #if 0 | #if 0 | ||||
| @@ -8,91 +8,91 @@ include ../Makefile.mk | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||||
| BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # Common | # Common | ||||
| # LINK_FLAGS += $(shell pkg-config --libs liblo) | |||||
| LINK_FLAGS += $(shell pkg-config --libs liblo) | |||||
| # LINK_FLAGS += $(JACKBRIDGE_LIBS) | |||||
| LINK_FLAGS += $(JACKBRIDGE_LIBS) | |||||
| # LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | # LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS) | ||||
| # LINK_FLAGS += $(JUCE_CORE_LIBS) | # LINK_FLAGS += $(JUCE_CORE_LIBS) | ||||
| # LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | # LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS) | ||||
| # LINK_FLAGS += $(JUCE_EVENTS_LIBS) | # LINK_FLAGS += $(JUCE_EVENTS_LIBS) | ||||
| # LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | # LINK_FLAGS += $(JUCE_GRAPHICS_LIBS) | ||||
| # LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | # LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS) | ||||
| # LINK_FLAGS += $(RTAUDIO_LIBS) | |||||
| # LINK_FLAGS += $(RTMIDI_LIBS) | |||||
| # LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||||
| # | |||||
| # ifeq ($(HAVE_OPENGL),true) | |||||
| # LINK_FLAGS += $(DGL_LIBS) | |||||
| # endif | |||||
| # | |||||
| # ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
| # LINK_FLAGS += $(LILV_LIBS) | |||||
| # endif | |||||
| LINK_FLAGS += $(RTAUDIO_LIBS) | |||||
| LINK_FLAGS += $(RTMIDI_LIBS) | |||||
| LINK_FLAGS += $(RTMEMPOOL_LIBS) | |||||
| ifeq ($(HAVE_OPENGL),true) | |||||
| LINK_FLAGS += $(DGL_LIBS) | |||||
| endif | |||||
| ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
| LINK_FLAGS += $(LILV_LIBS) | |||||
| endif | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # Plugin | # Plugin | ||||
| # ifeq ($(HAVE_FLUIDSYNTH),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs fluidsynth) | |||||
| # endif | |||||
| # | |||||
| # ifeq ($(HAVE_LINUXSAMPLER),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs linuxsampler) | |||||
| # ifeq ($(WIN32),true) | |||||
| # LINK_FLAGS += lrpcrt4 | |||||
| # endif | |||||
| # endif | |||||
| ifeq ($(HAVE_FLUIDSYNTH),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs fluidsynth) | |||||
| endif | |||||
| ifeq ($(HAVE_LINUXSAMPLER),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs linuxsampler) | |||||
| ifeq ($(WIN32),true) | |||||
| LINK_FLAGS += lrpcrt4 | |||||
| endif | |||||
| endif | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # Native | # Native | ||||
| # ifeq ($(HAVE_AF_DEPS),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs sndfile) | |||||
| # ifeq ($(HAVE_FFMPEG),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil) | |||||
| # endif | |||||
| # endif | |||||
| # | |||||
| # ifeq ($(HAVE_MF_DEPS),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs smf) | |||||
| # endif | |||||
| # | |||||
| # ifeq ($(HAVE_ZYN_DEPS),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib) | |||||
| # ifeq ($(HAVE_ZYN_UI_DEPS),true) | |||||
| # LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk) | |||||
| # endif | |||||
| # endif | |||||
| ifeq ($(HAVE_AF_DEPS),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs sndfile) | |||||
| ifeq ($(HAVE_FFMPEG),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil) | |||||
| endif | |||||
| endif | |||||
| ifeq ($(HAVE_MF_DEPS),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs smf) | |||||
| endif | |||||
| ifeq ($(HAVE_ZYN_DEPS),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib) | |||||
| ifeq ($(HAVE_ZYN_UI_DEPS),true) | |||||
| LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk) | |||||
| endif | |||||
| endif | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| # LIBS = ../libcarla_engine.a | |||||
| # LIBS += ../libcarla_plugin.a | |||||
| LIBS = ../libcarla_engine.a | |||||
| LIBS += ../libcarla_plugin.a | |||||
| # LIBS += ../../modules/carla_native.a | |||||
| # LIBS += ../../modules/jackbridge.a | |||||
| LIBS += ../../modules/carla_native.a | |||||
| LIBS += ../../modules/jackbridge.a | |||||
| # LIBS += ../../modules/juce_audio_basics.a | # LIBS += ../../modules/juce_audio_basics.a | ||||
| # LIBS += ../../modules/juce_core.a | # LIBS += ../../modules/juce_core.a | ||||
| # LIBS += ../../modules/juce_data_structures.a | # LIBS += ../../modules/juce_data_structures.a | ||||
| # LIBS += ../../modules/juce_events.a | # LIBS += ../../modules/juce_events.a | ||||
| # LIBS += ../../modules/juce_graphics.a | # LIBS += ../../modules/juce_graphics.a | ||||
| # LIBS += ../../modules/juce_gui_basics.a | # LIBS += ../../modules/juce_gui_basics.a | ||||
| # LIBS += ../../modules/rtaudio.a | |||||
| # LIBS += ../../modules/rtmidi.a | |||||
| # LIBS += ../../modules/rtmempool.a | |||||
| LIBS += ../../modules/rtaudio.a | |||||
| LIBS += ../../modules/rtmidi.a | |||||
| LIBS += ../../modules/rtmempool.a | |||||
| # ifeq ($(HAVE_OPENGL),true) | |||||
| # LIBS += ../../modules/dgl.a | |||||
| # endif | |||||
| ifeq ($(HAVE_OPENGL),true) | |||||
| LIBS += ../../modules/dgl.a | |||||
| endif | |||||
| # ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
| # LIBS += ../../modules/lilv.a | |||||
| # endif | |||||
| ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||||
| LIBS += ../../modules/lilv.a | |||||
| endif | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| @@ -977,10 +977,7 @@ class CarlaPortCountInfo(Structure): | |||||
| ("ins", c_uint32), | ("ins", c_uint32), | ||||
| # Number of outputs. | # Number of outputs. | ||||
| ("outs", c_uint32), | |||||
| # Total number of ports. | |||||
| ("total", c_uint32) | |||||
| ("outs", c_uint32) | |||||
| ] | ] | ||||
| # Parameter information. | # Parameter information. | ||||
| @@ -1058,8 +1055,7 @@ PyCarlaPluginInfo = { | |||||
| # @see CarlaPortCountInfo | # @see CarlaPortCountInfo | ||||
| PyCarlaPortCountInfo = { | PyCarlaPortCountInfo = { | ||||
| 'ins': 0, | 'ins': 0, | ||||
| 'outs': 0, | |||||
| 'total': 0 | |||||
| 'outs': 0 | |||||
| } | } | ||||
| # @see CarlaParameterInfo | # @see CarlaParameterInfo | ||||
| @@ -1117,17 +1113,25 @@ class Host(object): | |||||
| def get_supported_file_extensions(self): | def get_supported_file_extensions(self): | ||||
| return self.lib.carla_get_supported_file_extensions() | return self.lib.carla_get_supported_file_extensions() | ||||
| # Get how many engine drivers are available. | |||||
| def get_engine_driver_count(self): | def get_engine_driver_count(self): | ||||
| return self.lib.carla_get_engine_driver_count() | return self.lib.carla_get_engine_driver_count() | ||||
| # Get an engine driver name. | |||||
| # @param index Driver index | |||||
| def get_engine_driver_name(self, index): | def get_engine_driver_name(self, index): | ||||
| return self.lib.carla_get_engine_driver_name(index) | return self.lib.carla_get_engine_driver_name(index) | ||||
| # Get the device names of an engine driver. | |||||
| # @param index Driver index | |||||
| def get_engine_driver_device_names(self, index): | def get_engine_driver_device_names(self, index): | ||||
| return charPtrPtrToStringList(self.lib.carla_get_engine_driver_device_names(index)) | return charPtrPtrToStringList(self.lib.carla_get_engine_driver_device_names(index)) | ||||
| def get_engine_driver_device_info(self, index, deviceName): | |||||
| return structToDict(self.lib.carla_get_engine_driver_device_info(index, deviceName)) | |||||
| # Get information about a device driver. | |||||
| # @param index Driver index | |||||
| # @param name Device name | |||||
| def get_engine_driver_device_info(self, index, name): | |||||
| return structToDict(self.lib.carla_get_engine_driver_device_info(index, name)) | |||||
| def get_internal_plugin_count(self): | def get_internal_plugin_count(self): | ||||
| return self.lib.carla_get_internal_plugin_count() | return self.lib.carla_get_internal_plugin_count() | ||||
| @@ -1385,8 +1389,6 @@ class Host(object): | |||||
| self.lib.carla_get_supported_file_extensions.argtypes = None | self.lib.carla_get_supported_file_extensions.argtypes = None | ||||
| self.lib.carla_get_supported_file_extensions.restype = c_char_p | self.lib.carla_get_supported_file_extensions.restype = c_char_p | ||||
| return | |||||
| self.lib.carla_get_engine_driver_count.argtypes = None | self.lib.carla_get_engine_driver_count.argtypes = None | ||||
| self.lib.carla_get_engine_driver_count.restype = c_uint | self.lib.carla_get_engine_driver_count.restype = c_uint | ||||
| @@ -1399,6 +1401,8 @@ class Host(object): | |||||
| self.lib.carla_get_engine_driver_device_info.argtypes = [c_uint, c_char_p] | self.lib.carla_get_engine_driver_device_info.argtypes = [c_uint, c_char_p] | ||||
| self.lib.carla_get_engine_driver_device_info.restype = POINTER(EngineDriverDeviceInfo) | self.lib.carla_get_engine_driver_device_info.restype = POINTER(EngineDriverDeviceInfo) | ||||
| return | |||||
| self.lib.carla_get_internal_plugin_count.argtypes = None | self.lib.carla_get_internal_plugin_count.argtypes = None | ||||
| self.lib.carla_get_internal_plugin_count.restype = c_uint | self.lib.carla_get_internal_plugin_count.restype = c_uint | ||||
| @@ -17,7 +17,7 @@ | |||||
| #ifndef JACKBRIDGE_HPP_INCLUDED | #ifndef JACKBRIDGE_HPP_INCLUDED | ||||
| #define JACKBRIDGE_HPP_INCLUDED | #define JACKBRIDGE_HPP_INCLUDED | ||||
| #include "CarlaDefines.hpp" | |||||
| #include "CarlaDefines.h" | |||||
| #ifndef JACKBRIDGE_EXPORT | #ifndef JACKBRIDGE_EXPORT | ||||
| # undef CARLA_EXPORT | # undef CARLA_EXPORT | ||||
| @@ -14,7 +14,7 @@ | |||||
| * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||||
| */ | */ | ||||
| #include "CarlaDefines.hpp" | |||||
| #include "CarlaDefines.h" | |||||
| #include "JackBridge.hpp" | #include "JackBridge.hpp" | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef LADSPA_RDF_HPP_INCLUDED | #ifndef LADSPA_RDF_HPP_INCLUDED | ||||
| #define LADSPA_RDF_HPP_INCLUDED | #define LADSPA_RDF_HPP_INCLUDED | ||||
| #include "CarlaDefines.hpp" | |||||
| #include "CarlaDefines.h" | |||||
| // Base Types | // Base Types | ||||
| typedef float LADSPA_Data; | typedef float LADSPA_Data; | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef LV2_RDF_HPP_INCLUDED | #ifndef LV2_RDF_HPP_INCLUDED | ||||
| #define LV2_RDF_HPP_INCLUDED | #define LV2_RDF_HPP_INCLUDED | ||||
| #include "CarlaDefines.hpp" | |||||
| #include "CarlaDefines.h" | |||||
| #ifdef CARLA_PROPER_CPP11_SUPPORT | #ifdef CARLA_PROPER_CPP11_SUPPORT | ||||
| # include <cstdint> | # include <cstdint> | ||||
| @@ -45,7 +45,7 @@ | |||||
| #ifndef RTMIDI_H | #ifndef RTMIDI_H | ||||
| #define RTMIDI_H | #define RTMIDI_H | ||||
| #include "CarlaDefines.hpp" | |||||
| #include "CarlaDefines.h" | |||||
| #include "RtError.h" | #include "RtError.h" | ||||
| #include <string> | #include <string> | ||||
| @@ -24,7 +24,7 @@ BUILD_CXX_FLAGS += -isystem /opt/kxstudio/include | |||||
| # -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
| ANSI_FLAGS = -DBUILD_ANSI_TEST -DREAL_BUILD -I/usr/include/carla -I/usr/include/carla/includes | |||||
| ANSI_FLAGS = -DBUILD_ANSI_TEST -DREAL_BUILD -I../backend -I../includes | |||||
| ANSI_FLAGS += -Wall -Wextra -Werror | ANSI_FLAGS += -Wall -Wextra -Werror | ||||
| ANSI_FLAGS += -DDEBUG -O0 -g | ANSI_FLAGS += -DDEBUG -O0 -g | ||||
| ANSI_FLAGS += -ansi -pedantic -pedantic-errors | ANSI_FLAGS += -ansi -pedantic -pedantic-errors | ||||
| @@ -18,7 +18,7 @@ | |||||
| #ifndef CARLA_BACKEND_UTILS_HPP_INCLUDED | #ifndef CARLA_BACKEND_UTILS_HPP_INCLUDED | ||||
| #define CARLA_BACKEND_UTILS_HPP_INCLUDED | #define CARLA_BACKEND_UTILS_HPP_INCLUDED | ||||
| #include "CarlaBackend.hpp" | |||||
| #include "CarlaBackend.h" | |||||
| #include "CarlaString.hpp" | #include "CarlaString.hpp" | ||||
| CARLA_BACKEND_START_NAMESPACE | CARLA_BACKEND_START_NAMESPACE | ||||
| @@ -143,25 +143,6 @@ const char* PluginCategory2Str(const PluginCategory category) | |||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| static inline | |||||
| const char* ParameterType2Str(const ParameterType type) | |||||
| { | |||||
| switch (type) | |||||
| { | |||||
| case PARAMETER_UNKNOWN: | |||||
| return "PARAMETER_UNKNOWN"; | |||||
| case PARAMETER_INPUT: | |||||
| return "PARAMETER_INPUT"; | |||||
| case PARAMETER_OUTPUT: | |||||
| return "PARAMETER_OUTPUT"; | |||||
| case PARAMETER_SPECIAL: | |||||
| return "PARAMETER_SPECIAL"; | |||||
| } | |||||
| carla_stderr("CarlaBackend::ParameterType2Str(%i) - invalid type", type); | |||||
| return nullptr; | |||||
| } | |||||
| static inline | static inline | ||||
| const char* InternalParameterIndex2Str(const InternalParameterIndex index) | const char* InternalParameterIndex2Str(const InternalParameterIndex index) | ||||
| { | { | ||||
| @@ -204,8 +185,8 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) | |||||
| return "ENGINE_CALLBACK_PLUGIN_REMOVED"; | return "ENGINE_CALLBACK_PLUGIN_REMOVED"; | ||||
| case ENGINE_CALLBACK_PLUGIN_RENAMED: | case ENGINE_CALLBACK_PLUGIN_RENAMED: | ||||
| return "ENGINE_CALLBACK_PLUGIN_RENAMED"; | return "ENGINE_CALLBACK_PLUGIN_RENAMED"; | ||||
| case ENGINE_CALLBACK_PLUGIN_DISABLED: | |||||
| return "ENGINE_CALLBACK_PLUGIN_DISABLED"; | |||||
| case ENGINE_CALLBACK_PLUGIN_UNAVAILABLE: | |||||
| return "ENGINE_CALLBACK_PLUGIN_UNAVAILABLE"; | |||||
| case ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED: | case ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED: | ||||
| return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED"; | return "ENGINE_CALLBACK_PARAMETER_VALUE_CHANGED"; | ||||
| case ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED: | case ENGINE_CALLBACK_PARAMETER_DEFAULT_CHANGED: | ||||
| @@ -226,12 +207,22 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) | |||||
| return "ENGINE_CALLBACK_NOTE_OFF"; | return "ENGINE_CALLBACK_NOTE_OFF"; | ||||
| case ENGINE_CALLBACK_UPDATE: | case ENGINE_CALLBACK_UPDATE: | ||||
| return "ENGINE_CALLBACK_UPDATE"; | return "ENGINE_CALLBACK_UPDATE"; | ||||
| case ENGINE_CALLBACK_RELOAD_INFO: | |||||
| return "ENGINE_CALLBACK_RELOAD_INFO"; | |||||
| case ENGINE_CALLBACK_RELOAD_PARAMETERS: | |||||
| return "ENGINE_CALLBACK_RELOAD_PARAMETERS"; | |||||
| case ENGINE_CALLBACK_RELOAD_PROGRAMS: | |||||
| return "ENGINE_CALLBACK_RELOAD_PROGRAMS"; | |||||
| case ENGINE_CALLBACK_RELOAD_ALL: | |||||
| return "ENGINE_CALLBACK_RELOAD_ALL"; | |||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED: | case ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED"; | return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ADDED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED: | case ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED"; | return "ENGINE_CALLBACK_PATCHBAY_CLIENT_REMOVED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED: | case ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED"; | return "ENGINE_CALLBACK_PATCHBAY_CLIENT_RENAMED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED: | |||||
| return "ENGINE_CALLBACK_PATCHBAY_CLIENT_ICON_CHANGED"; | |||||
| case ENGINE_CALLBACK_PATCHBAY_PORT_ADDED: | case ENGINE_CALLBACK_PATCHBAY_PORT_ADDED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_PORT_ADDED"; | return "ENGINE_CALLBACK_PATCHBAY_PORT_ADDED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_PORT_REMOVED: | case ENGINE_CALLBACK_PATCHBAY_PORT_REMOVED: | ||||
| @@ -242,36 +233,22 @@ const char* EngineCallbackOpcode2Str(const EngineCallbackOpcode opcode) | |||||
| return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED"; | return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_ADDED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED: | case ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED: | ||||
| return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED"; | return "ENGINE_CALLBACK_PATCHBAY_CONNECTION_REMOVED"; | ||||
| case ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED: | |||||
| return "ENGINE_CALLBACK_PATCHBAY_ICON_CHANGED"; | |||||
| case ENGINE_CALLBACK_RELOAD_INFO: | |||||
| return "ENGINE_CALLBACK_RELOAD_INFO"; | |||||
| case ENGINE_CALLBACK_RELOAD_PARAMETERS: | |||||
| return "ENGINE_CALLBACK_RELOAD_PARAMETERS"; | |||||
| case ENGINE_CALLBACK_RELOAD_PROGRAMS: | |||||
| return "ENGINE_CALLBACK_RELOAD_PROGRAMS"; | |||||
| case ENGINE_CALLBACK_RELOAD_ALL: | |||||
| return "ENGINE_CALLBACK_RELOAD_ALL"; | |||||
| case ENGINE_CALLBACK_BUFFER_SIZE_CHANGED: | |||||
| return "ENGINE_CALLBACK_BUFFER_SIZE_CHANGED"; | |||||
| case ENGINE_CALLBACK_SAMPLE_RATE_CHANGED: | |||||
| return "ENGINE_CALLBACK_SAMPLE_RATE_CHANGED"; | |||||
| case ENGINE_CALLBACK_PROCESS_MODE_CHANGED: | |||||
| return "ENGINE_CALLBACK_PROCESS_MODE_CHANGED"; | |||||
| case ENGINE_CALLBACK_ENGINE_STARTED: | case ENGINE_CALLBACK_ENGINE_STARTED: | ||||
| return "ENGINE_CALLBACK_ENGINE_STARTED"; | return "ENGINE_CALLBACK_ENGINE_STARTED"; | ||||
| case ENGINE_CALLBACK_ENGINE_STOPPED: | case ENGINE_CALLBACK_ENGINE_STOPPED: | ||||
| return "ENGINE_CALLBACK_ENGINE_STOPPED"; | return "ENGINE_CALLBACK_ENGINE_STOPPED"; | ||||
| case ENGINE_CALLBACK_NSM_ANNOUNCE: | |||||
| return "ENGINE_CALLBACK_NSM_ANNOUNCE"; | |||||
| case ENGINE_CALLBACK_NSM_OPEN: | |||||
| return "ENGINE_CALLBACK_NSM_OPEN"; | |||||
| case ENGINE_CALLBACK_NSM_SAVE: | |||||
| return "ENGINE_CALLBACK_NSM_SAVE"; | |||||
| case ENGINE_CALLBACK_ERROR: | |||||
| return "ENGINE_CALLBACK_ERROR"; | |||||
| case ENGINE_CALLBACK_PROCESS_MODE_CHANGED: | |||||
| return "ENGINE_CALLBACK_PROCESS_MODE_CHANGED"; | |||||
| case ENGINE_CALLBACK_TRANSPORT_MODE_CHANGED: | |||||
| return "ENGINE_CALLBACK_TRANSPORT_MODE_CHANGED"; | |||||
| case ENGINE_CALLBACK_BUFFER_SIZE_CHANGED: | |||||
| return "ENGINE_CALLBACK_BUFFER_SIZE_CHANGED"; | |||||
| case ENGINE_CALLBACK_SAMPLE_RATE_CHANGED: | |||||
| return "ENGINE_CALLBACK_SAMPLE_RATE_CHANGED"; | |||||
| case ENGINE_CALLBACK_INFO: | case ENGINE_CALLBACK_INFO: | ||||
| return "ENGINE_CALLBACK_INFO"; | return "ENGINE_CALLBACK_INFO"; | ||||
| case ENGINE_CALLBACK_ERROR: | |||||
| return "ENGINE_CALLBACK_ERROR"; | |||||
| case ENGINE_CALLBACK_QUIT: | case ENGINE_CALLBACK_QUIT: | ||||
| return "ENGINE_CALLBACK_QUIT"; | return "ENGINE_CALLBACK_QUIT"; | ||||
| } | } | ||||
| @@ -285,8 +262,8 @@ const char* EngineOption2Str(const EngineOption option) | |||||
| { | { | ||||
| switch (option) | switch (option) | ||||
| { | { | ||||
| case ENGINE_OPTION_PROCESS_NAME: | |||||
| return "ENGINE_OPTION_PROCESS_NAME"; | |||||
| case ENGINE_OPTION_DEBUG: | |||||
| return "ENGINE_OPTION_DEBUG"; | |||||
| case ENGINE_OPTION_PROCESS_MODE: | case ENGINE_OPTION_PROCESS_MODE: | ||||
| return "ENGINE_OPTION_PROCESS_MODE"; | return "ENGINE_OPTION_PROCESS_MODE"; | ||||
| case ENGINE_OPTION_TRANSPORT_MODE: | case ENGINE_OPTION_TRANSPORT_MODE: | ||||
| @@ -311,48 +288,10 @@ const char* EngineOption2Str(const EngineOption option) | |||||
| return "ENGINE_OPTION_AUDIO_SAMPLE_RATE"; | return "ENGINE_OPTION_AUDIO_SAMPLE_RATE"; | ||||
| case ENGINE_OPTION_AUDIO_DEVICE: | case ENGINE_OPTION_AUDIO_DEVICE: | ||||
| return "ENGINE_OPTION_AUDIO_DEVICE"; | return "ENGINE_OPTION_AUDIO_DEVICE"; | ||||
| case ENGINE_OPTION_PATH_BINARIES: | |||||
| return "ENGINE_OPTION_PATH_BINARIES"; | |||||
| case ENGINE_OPTION_PATH_RESOURCES: | case ENGINE_OPTION_PATH_RESOURCES: | ||||
| return "ENGINE_OPTION_PATH_RESOURCES"; | return "ENGINE_OPTION_PATH_RESOURCES"; | ||||
| #ifndef BUILD_BRIDGE | |||||
| case ENGINE_OPTION_PATH_BRIDGE_NATIVE: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_NATIVE"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_POSIX32: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_POSIX32"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_POSIX64: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_POSIX64"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_WIN32: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_WIN32"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_WIN64: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_WIN64"; | |||||
| #endif | |||||
| #ifdef WANT_LV2 | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_EXTERNAL"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_GTK2"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_GTK3"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_NTK: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_NTK"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_QT4: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_QT4"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_QT5: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_QT5"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_COCOA"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_WINDOWS"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_LV2_X11: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_LV2_X11"; | |||||
| #endif | |||||
| #ifdef WANT_VST | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_MAC: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_VST_MAC"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_HWND: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_VST_HWND"; | |||||
| case ENGINE_OPTION_PATH_BRIDGE_VST_X11: | |||||
| return "ENGINE_OPTION_PATH_BRIDGE_VST_X11"; | |||||
| #endif | |||||
| } | } | ||||
| carla_stderr("CarlaBackend::EngineOption2Str(%i) - invalid option", option); | carla_stderr("CarlaBackend::EngineOption2Str(%i) - invalid option", option); | ||||