commit 41750f73adcf019956d04d47256c699764580a9e
parent 15e5b575d72590ccf37f81429c48d2b607653d64
Author: falkTX <falktx@falktx.com>
Date: Sat, 18 Sep 2021 11:06:50 +0100
Switch back to requiring full-state when using programs+state
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
4 files changed, 12 insertions(+), 16 deletions(-)
diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h
@@ -146,12 +146,11 @@
// -----------------------------------------------------------------------
// Enable full state if plugin exports presets
-// FIXME
-// #if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && ! DISTRHO_PLUGIN_WANT_FULL_STATE
-// # warning Plugins with programs and state need to implement full state API
-// # undef DISTRHO_PLUGIN_WANT_FULL_STATE
-// # define DISTRHO_PLUGIN_WANT_FULL_STATE 1
-// #endif
+#if DISTRHO_PLUGIN_WANT_PROGRAMS && DISTRHO_PLUGIN_WANT_STATE && ! DISTRHO_PLUGIN_WANT_FULL_STATE
+# warning Plugins with programs and state need to implement full state API too
+# undef DISTRHO_PLUGIN_WANT_FULL_STATE
+# define DISTRHO_PLUGIN_WANT_FULL_STATE 1
+#endif
// -----------------------------------------------------------------------
// Disable UI if DGL or External UI is not available
diff --git a/examples/States/DistrhoPluginInfo.h b/examples/States/DistrhoPluginInfo.h
@@ -29,4 +29,7 @@
#define DISTRHO_PLUGIN_WANT_STATE 1
#define DISTRHO_UI_USER_RESIZABLE 1
+// states and presets together require this in order to function
+#define DISTRHO_PLUGIN_WANT_FULL_STATE 1
+
#endif // DISTRHO_PLUGIN_INFO_H_INCLUDED
diff --git a/examples/States/ExamplePluginStates.cpp b/examples/States/ExamplePluginStates.cpp
@@ -105,9 +105,9 @@ The plugin will be treated as an effect, but it will not change the host audio."
* Init */
/**
- This plugin has no parameters..
+ This plugin has no parameters.
*/
- void initParameter(uint32_t, Parameter&) override {}
+ void initParameter(uint32_t, Parameter&) override {}
/**
Set the name of the program @a index.
@@ -172,8 +172,8 @@ The plugin will be treated as an effect, but it will not change the host audio."
/**
This plugin has no parameters..
*/
- void setParameterValue(uint32_t, float) override {}
- float getParameterValue(uint32_t) const override { return 0.0f; }
+ void setParameterValue(uint32_t, float) override {}
+ float getParameterValue(uint32_t) const override { return 0.0f; }
/**
Load a program.
@@ -208,7 +208,6 @@ The plugin will be treated as an effect, but it will not change the host audio."
}
}
-#if DISTRHO_PLUGIN_WANT_FULL_STATE /* FIXME */
/**
Get the value of an internal state.
The host may call this function from any non-realtime context.
@@ -240,7 +239,6 @@ The plugin will be treated as an effect, but it will not change the host audio."
return sFalse;
}
-#endif
/**
Change an internal state.
diff --git a/examples/States/Makefile b/examples/States/Makefile
@@ -30,10 +30,6 @@ ifeq ($(HAVE_OPENGL),true)
TARGETS += jack
endif # HAVE_OPENGL
-ifneq ($(MACOS_OR_WINDOWS),true)
-TARGETS += dssi
-endif # MACOS_OR_WINDOWS
-
ifeq ($(HAVE_OPENGL),true)
TARGETS += lv2_sep
else