DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit c6304d2e92351641e91d24a8008b777e4f0dea36
parent aeeb2cbe1b984d76e336f0413f79811de26242ae
Author: falkTX <falktx@falktx.com>
Date:   Wed,  1 Mar 2023 15:46:46 +0100

clap: always use state extension

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoPluginCLAP.cpp | 8++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/distrho/src/DistrhoPluginCLAP.cpp b/distrho/src/DistrhoPluginCLAP.cpp @@ -2371,7 +2371,6 @@ static const clap_plugin_latency_t clap_plugin_latency = { }; #endif -#if DISTRHO_PLUGIN_WANT_STATE // -------------------------------------------------------------------------------------------------------------------- // plugin state @@ -2391,7 +2390,6 @@ static const clap_plugin_state_t clap_plugin_state = { clap_plugin_state_save, clap_plugin_state_load }; -#endif // -------------------------------------------------------------------------------------------------------------------- // plugin @@ -2453,6 +2451,8 @@ static const void* CLAP_ABI clap_plugin_get_extension(const clap_plugin_t*, cons { if (std::strcmp(id, CLAP_EXT_PARAMS) == 0) return &clap_plugin_params; + if (std::strcmp(id, CLAP_EXT_STATE) == 0) + return &clap_plugin_state; #if DISTRHO_PLUGIN_NUM_INPUTS+DISTRHO_PLUGIN_NUM_OUTPUTS != 0 if (std::strcmp(id, CLAP_EXT_AUDIO_PORTS) == 0) return &clap_plugin_audio_ports; @@ -2465,10 +2465,6 @@ static const void* CLAP_ABI clap_plugin_get_extension(const clap_plugin_t*, cons if (std::strcmp(id, CLAP_EXT_LATENCY) == 0) return &clap_plugin_latency; #endif - #if DISTRHO_PLUGIN_WANT_STATE - if (std::strcmp(id, CLAP_EXT_STATE) == 0) - return &clap_plugin_state; - #endif #if DISTRHO_PLUGIN_HAS_UI if (std::strcmp(id, CLAP_EXT_GUI) == 0) return &clap_plugin_gui;