diff --git a/distrho/src/DistrhoPluginLV2.cpp b/distrho/src/DistrhoPluginLV2.cpp index 60ba73c3..70eaa22c 100644 --- a/distrho/src/DistrhoPluginLV2.cpp +++ b/distrho/src/DistrhoPluginLV2.cpp @@ -84,10 +84,12 @@ public: fPortControls(nullptr), fLastControlValues(nullptr), fSampleRate(sampleRate), +#if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST + fCtrlInPortChangeReq(ctrlInPortChangeReq), +#endif fURIDs(uridMap), fUridMap(uridMap), - fWorker(worker), - fCtrlInPortChangeReq(ctrlInPortChangeReq) + fWorker(worker) { #if DISTRHO_PLUGIN_NUM_INPUTS > 0 for (uint32_t i=0; i < DISTRHO_PLUGIN_NUM_INPUTS; ++i) @@ -157,6 +159,11 @@ public: // unused (void)fWorker; #endif + +#if ! DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST + // unused + (void)ctrlInPortChangeReq; +#endif } ~PluginLv2() @@ -1178,9 +1185,11 @@ private: } fURIDs; // LV2 features +#if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST + const LV2_ControlInputPort_Change_Request* const fCtrlInPortChangeReq; +#endif const LV2_URID_Map* const fUridMap; const LV2_Worker_Schedule* const fWorker; - const LV2_ControlInputPort_Change_Request* const fCtrlInPortChangeReq; #if DISTRHO_PLUGIN_WANT_STATE StringToStringMap fStateMap; diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp index ddb92339..a89932cb 100644 --- a/distrho/src/DistrhoUIPrivateData.hpp +++ b/distrho/src/DistrhoUIPrivateData.hpp @@ -52,14 +52,14 @@ START_NAMESPACE_DGL #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI struct PluginApplication { - IdleCallback* idleCallback; + DGL_NAMESPACE::IdleCallback* idleCallback; UI* ui; explicit PluginApplication() : idleCallback(nullptr), ui(nullptr) {} - void addIdleCallback(IdleCallback* const cb) + void addIdleCallback(DGL_NAMESPACE::IdleCallback* const cb) { DISTRHO_SAFE_ASSERT_RETURN(cb != nullptr,); DISTRHO_SAFE_ASSERT_RETURN(idleCallback == nullptr,); diff --git a/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp b/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp index ff3a5258..f37f2851 100644 --- a/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp +++ b/examples/EmbedExternalUI/EmbedExternalExampleUI.cpp @@ -473,10 +473,6 @@ protected: // ------------------------------------------------------------------------------------------------------- -private: - // Current value, cached for when UI becomes visible - float fValue; - /** Set our UI class as non-copyable and add a leak detector just in case. */