Skip to content

Commit

Permalink
clap: request restart from host on reset
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Dec 30, 2024
1 parent 9a062cf commit 800583a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions distrho/src/DistrhoPluginCLAP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,11 @@ class PluginCLAP : ClapEventQueue
#endif
}

void reset()
{
fHost->request_restart(fHost);
}

bool process(const clap_process_t* const process)
{
#if DISTRHO_PLUGIN_WANT_MIDI_INPUT
Expand Down Expand Up @@ -2450,9 +2455,10 @@ static void CLAP_ABI clap_plugin_stop_processing(const clap_plugin_t*)
// nothing to do
}

static void CLAP_ABI clap_plugin_reset(const clap_plugin_t*)
static void CLAP_ABI clap_plugin_reset(const clap_plugin_t* const plugin)
{
// nothing to do
PluginCLAP* const instance = static_cast<PluginCLAP*>(plugin->plugin_data);
instance->reset();
}

static clap_process_status CLAP_ABI clap_plugin_process(const clap_plugin_t* const plugin, const clap_process_t* const process)
Expand Down

0 comments on commit 800583a

Please sign in to comment.