Browse Source

Switch back to requiring full-state when using programs+state

Signed-off-by: falkTX <falktx@falktx.com>
pull/327/head
falkTX 4 years ago
parent
commit
41750f73ad
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
4 changed files with 12 additions and 16 deletions
  1. +5
    -6
      distrho/src/DistrhoPluginChecks.h
  2. +3
    -0
      examples/States/DistrhoPluginInfo.h
  3. +4
    -6
      examples/States/ExamplePluginStates.cpp
  4. +0
    -4
      examples/States/Makefile

+ 5
- 6
distrho/src/DistrhoPluginChecks.h View File

@@ -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


+ 3
- 0
examples/States/DistrhoPluginInfo.h View File

@@ -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

+ 4
- 6
examples/States/ExamplePluginStates.cpp View File

@@ -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.


+ 0
- 4
examples/States/Makefile View File

@@ -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


Loading…
Cancel
Save