clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 07d3f0d01c3530a2c18809e45713afecc3a41a8d
parent fbdc3ac8c440af97b554f7aa4f67b622c0dab1cf
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Tue, 13 Sep 2022 08:47:43 +0200

Add a note to param.flush()

Fixes #147

Diffstat:
Minclude/clap/ext/params.h | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h @@ -212,6 +212,11 @@ typedef struct clap_plugin_params { // Flushes a set of parameter changes. // This method must not be called concurrently to clap_plugin->process(). // + // Note: if the plugin is processing, then the process() call will already achieve the + // parameter update (bi-directionnal), so a call to flush isn't required, also be aware + // that the plugin may use the sample offset in process(), while this information would be + // lost within flush(). + // // [active ? audio-thread : main-thread] void(CLAP_ABI *flush)(const clap_plugin_t *plugin, const clap_input_events_t *in, @@ -282,7 +287,7 @@ typedef struct clap_host_params { // // The host will then schedule a call to either: // - clap_plugin.process() - // - clap_plugin_params->flush() + // - clap_plugin_params.flush() // // This function is always safe to use and should not be called from an [audio-thread] as the // plugin would already be within process() or flush().