| @@ -744,6 +744,9 @@ public: | |||
| #if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| /** | |||
| TODO add description | |||
| */ | |||
| bool requestParameterValueChange(const uint32_t index, const float value) noexcept; | |||
| #endif | |||
| protected: | |||
| @@ -112,7 +112,7 @@ bool Plugin::writeMidiEvent(const MidiEvent& midiEvent) noexcept | |||
| #if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| bool Plugin::requestParameterValueChange(const uint32_t index, const float value) noexcept | |||
| { | |||
| return pData->requestParameterValueChange(index, value); | |||
| return pData->requestParameterValueChangeCallback(index, value); | |||
| } | |||
| #endif | |||
| @@ -31,7 +31,7 @@ static const writeMidiFunc writeMidiCallback = nullptr; | |||
| #endif | |||
| #if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| static const requestParameterValueChangeFunc requestParameterValueChange = nullptr; | |||
| static const requestParameterValueChangeFunc requestParameterValueChangeCallback = nullptr; | |||
| #endif | |||
| #if DISTRHO_PLUGIN_HAS_UI | |||
| @@ -522,7 +522,7 @@ private: | |||
| return 1; //TODO needs implementation | |||
| } | |||
| static bool requestParameterValueChange(void* ptr, const uint32_t index, const float value) | |||
| static bool requestParameterValueChangeCallback(void* ptr, const uint32_t index, const float value) | |||
| { | |||
| return ((PluginCarla*)ptr)->setParameterValueChange(index, value); | |||
| } | |||
| @@ -74,7 +74,7 @@ struct Plugin::PrivateData { | |||
| // Callbacks | |||
| void* callbacksPtr; | |||
| writeMidiFunc writeMidiCallbackFunc; | |||
| requestParameterValueChangeFunc requestParameterChangeFunc; | |||
| requestParameterValueChangeFunc requestParameterValueChangeCallbackFunc; | |||
| uint32_t bufferSize; | |||
| double sampleRate; | |||
| @@ -101,7 +101,7 @@ struct Plugin::PrivateData { | |||
| #endif | |||
| callbacksPtr(nullptr), | |||
| writeMidiCallbackFunc(nullptr), | |||
| requestParameterChangeFunc(nullptr), | |||
| requestParameterValueChangeCallbackFunc(nullptr), | |||
| bufferSize(d_lastBufferSize), | |||
| sampleRate(d_lastSampleRate) | |||
| { | |||
| @@ -175,10 +175,10 @@ struct Plugin::PrivateData { | |||
| #endif | |||
| #if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| bool requestParameterValueChange(const uint32_t index, const float value) | |||
| bool requestParameterValueChangeCallback(const uint32_t index, const float value) | |||
| { | |||
| if (requestParameterChangeFunc != nullptr) | |||
| return requestParameterChangeFunc(callbacksPtr, index, value); | |||
| if (requestParameterValueChangeCallbackFunc != nullptr) | |||
| return requestParameterValueChangeCallbackFunc(callbacksPtr, index, value); | |||
| return false; | |||
| } | |||
| @@ -191,7 +191,9 @@ struct Plugin::PrivateData { | |||
| class PluginExporter | |||
| { | |||
| public: | |||
| PluginExporter(void* const callbacksPtr, const writeMidiFunc writeMidiCall, const requestParameterValueChangeFunc parameterChangeCall) | |||
| PluginExporter(void* const callbacksPtr, | |||
| const writeMidiFunc writeMidiCall, | |||
| const requestParameterValueChangeFunc requestParameterValueChangeCall) | |||
| : fPlugin(createPlugin()), | |||
| fData((fPlugin != nullptr) ? fPlugin->pData : nullptr), | |||
| fIsActive(false) | |||
| @@ -228,7 +230,7 @@ public: | |||
| fData->callbacksPtr = callbacksPtr; | |||
| fData->writeMidiCallbackFunc = writeMidiCall; | |||
| fData->requestParameterChangeFunc = parameterChangeCall; | |||
| fData->requestParameterValueChangeCallbackFunc = requestParameterValueChangeCall; | |||
| } | |||
| ~PluginExporter() | |||
| @@ -42,7 +42,7 @@ static const writeMidiFunc writeMidiCallback = nullptr; | |||
| #endif | |||
| #if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| static const requestParameterValueChangeFunc requestParameterValueChange = nullptr; | |||
| static const requestParameterValueChangeFunc requestParameterValueChangeCallback = nullptr; | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| @@ -103,7 +103,7 @@ class PluginJack | |||
| { | |||
| public: | |||
| PluginJack(jack_client_t* const client) | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChange), | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChangeCallback), | |||
| #if DISTRHO_PLUGIN_HAS_UI | |||
| fUI(this, 0, nullptr, setParameterValueCallback, setStateCallback, nullptr, setSizeCallback, getDesktopScaleFactor(), fPlugin.getInstancePointer()), | |||
| #endif | |||
| @@ -601,7 +601,7 @@ private: | |||
| return 1; //needs implementation | |||
| } | |||
| static bool requestParameterValueChange(void* ptr, const uint32_t index, const float value) | |||
| static bool requestParameterValueChangeCallback(void* ptr, const uint32_t index, const float value) | |||
| { | |||
| return thisPtr->setParameterValueChange(index, value); | |||
| } | |||
| @@ -62,15 +62,19 @@ static const writeMidiFunc writeMidiCallback = nullptr; | |||
| #endif | |||
| #if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| static const requestParameterValueChangeFunc requestParameterValueChange = nullptr; | |||
| static const requestParameterValueChangeFunc requestParameterValueChangeCallback = nullptr; | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| class PluginLv2 | |||
| { | |||
| public: | |||
| PluginLv2(const double sampleRate, const LV2_URID_Map* const uridMap, const LV2_Worker_Schedule* const worker, const LV2_ControlInputPort_Change_Request* const parameterRequest, const bool usingNominal) | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChange), | |||
| PluginLv2(const double sampleRate, | |||
| const LV2_URID_Map* const uridMap, | |||
| const LV2_Worker_Schedule* const worker, | |||
| const LV2_ControlInputPort_Change_Request* const parameterRequest, | |||
| const bool usingNominal) | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChangeCallback), | |||
| fUsingNominal(usingNominal), | |||
| #ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD | |||
| fRunCount(0), | |||
| @@ -81,7 +85,7 @@ public: | |||
| fURIDs(uridMap), | |||
| fUridMap(uridMap), | |||
| fWorker(worker), | |||
| fParamRequest(parameterRequest) | |||
| fCtrlInPortChangeReq(parameterRequest) | |||
| { | |||
| #if DISTRHO_PLUGIN_NUM_INPUTS > 0 | |||
| for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i) | |||
| @@ -1045,7 +1049,7 @@ private: | |||
| // LV2 features | |||
| const LV2_URID_Map* const fUridMap; | |||
| const LV2_Worker_Schedule* const fWorker; | |||
| const LV2_ControlInputPort_Change_Request* const fParamRequest; | |||
| const LV2_ControlInputPort_Change_Request* const fCtrlInPortChangeReq; | |||
| #if DISTRHO_PLUGIN_WANT_STATE | |||
| StringMap fStateMap; | |||
| @@ -1134,10 +1138,10 @@ private: | |||
| #if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| bool setParameterValueChange(const uint32_t index, const float value) | |||
| { | |||
| return fParamRequest->request_change(fParamRequest->handle, index, value); | |||
| return fCtrlInPortChangeReq->request_change(fCtrlInPortChangeReq->handle, index, value); | |||
| } | |||
| static bool requestParameterValueChange(void* ptr, const uint32_t index, const float value) | |||
| static bool requestParameterValueChangeCallback(void* ptr, const uint32_t index, const float value) | |||
| { | |||
| return ((PluginLv2*)ptr)->setParameterValueChange(index, value); | |||
| } | |||
| @@ -68,7 +68,7 @@ static const writeMidiFunc writeMidiCallback = nullptr; | |||
| #endif | |||
| #if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST | |||
| static const requestParameterValueChangeFunc requestParameterValueChange = nullptr; | |||
| static const requestParameterValueChangeFunc requestParameterValueChangeCallback = nullptr; | |||
| #endif | |||
| // ----------------------------------------------------------------------- | |||
| @@ -389,7 +389,7 @@ class PluginVst : public ParameterCheckHelper | |||
| { | |||
| public: | |||
| PluginVst(const audioMasterCallback audioMaster, AEffect* const effect) | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChange), | |||
| : fPlugin(this, writeMidiCallback, requestParameterValueChangeCallback), | |||
| fAudioMaster(audioMaster), | |||
| fEffect(effect) | |||
| { | |||
| @@ -1178,7 +1178,7 @@ private: | |||
| return 1; //needs implementation | |||
| } | |||
| static bool requestParameterValueChange(void* ptr, const uint32_t index, const float value) | |||
| static bool requestParameterValueChangeCallback(void* ptr, const uint32_t index, const float value) | |||
| { | |||
| return ((PluginVst*)ptr)->setParameterValueChange(index, value); | |||
| } | |||