diff --git a/source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp index 828641a39..861a4b451 100644 --- a/source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp +++ b/source/modules/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -262,7 +262,7 @@ public: updateParameterOutputs(); -#if ! DISTRHO_PLUGIN_IS_SYNTH +#if defined(DISTRHO_PLUGIN_TARGET_DSSI) && ! DISTRHO_PLUGIN_IS_SYNTH return; // unused (void)events; (void)eventCount; diff --git a/source/modules/distrho/src/DistrhoPluginVST.cpp b/source/modules/distrho/src/DistrhoPluginVST.cpp index 11c3de93d..5262ce579 100644 --- a/source/modules/distrho/src/DistrhoPluginVST.cpp +++ b/source/modules/distrho/src/DistrhoPluginVST.cpp @@ -68,12 +68,18 @@ void strncpy(char* const dst, const char* const src, const size_t size) // ----------------------------------------------------------------------- +#if DISTRHO_PLUGIN_WANT_STATE class StateHelper { public: virtual ~StateHelper() {} virtual void setSharedState(const char* const newKey, const char* const newValue) = 0; }; +#else +typedef void StateHelper; +#endif + +// ----------------------------------------------------------------------- #if DISTRHO_PLUGIN_HAS_UI class UIVst @@ -293,7 +299,11 @@ private: // ----------------------------------------------------------------------- +#if DISTRHO_PLUGIN_WANT_STATE class PluginVst : public StateHelper +#else +class PluginVst +#endif { public: PluginVst(const audioMasterCallback audioMaster, AEffect* const effect) noexcept diff --git a/source/modules/distrho/src/DistrhoUILV2.cpp b/source/modules/distrho/src/DistrhoUILV2.cpp index 138ed4eb5..b1e5a36dd 100644 --- a/source/modules/distrho/src/DistrhoUILV2.cpp +++ b/source/modules/distrho/src/DistrhoUILV2.cpp @@ -23,6 +23,8 @@ #include "lv2/urid.h" #include "lv2/lv2_programs.h" +#include + START_NAMESPACE_DISTRHO // ----------------------------------------------------------------------- @@ -39,9 +41,6 @@ public: fWriteFunction(writeFunc) { fUiResize->ui_resize(fUiResize->handle, fUI.getWidth(), fUI.getHeight()); - - setState("MyKey1", "MyValue1"); - setState("My Key 2", "My Value 2"); } // ------------------------------------------------------------------- @@ -59,8 +58,6 @@ public: const float value(*(const float*)buffer); fUI.parameterChanged(rindex-parameterOffset, value); - - d_stderr("port changed %i, %i, %f", rindex, parameterOffset, value); } else {