clap

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

commit 40827aac4982856fe5330daf24ed46f9b7d19105
parent 87954b7c9bc71f7c66648a33984d58952be3e465
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date:   Tue, 29 Nov 2022 14:25:07 +0100

Don't make activation while processing a requirement

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

diff --git a/include/clap/ext/draft/audio-ports-activation.h b/include/clap/ext/draft/audio-ports-activation.h @@ -11,7 +11,8 @@ /// - the plugin knows that an output is not consumed by the host, and doesn't need to /// compute it /// -/// Audio ports can be activated and deactivated at any time, even while processing. +/// Audio ports can only be activated or deactivated when the plugin is deactivated, unless +/// can_activate_while_processing() returns true. /// /// Audio buffers must still be provided if the audio port is deactivated. /// In such case, they shall be filled with 0 (or whatever is the neutral value in your context) @@ -31,6 +32,10 @@ extern "C" { #endif typedef struct clap_plugin_audio_ports_activation { + // returns true if the plugin supports activation/deactivation while processing. + // [main-thread] + bool(CLAP_ABI *can_activate_while_processing)(const clap_plugin_t *plugin); + // activate the given port // [main-thread] uint32_t(CLAP_ABI *set_active)(const clap_plugin_t *plugin, bool is_input, uint32_t port_index, bool is_active);