commit d1e9c23cb404a00c43d7882306c0164373af84f1
parent a6cf6a8728eb7d73aea21e5998304a24dad14c8a
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Sun, 28 Nov 2021 10:09:43 +0100
Activate now specifies a min/max frames per block
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/clap/plugin.h b/include/clap/plugin.h
@@ -68,9 +68,17 @@ typedef struct clap_plugin {
* It is not required to deactivate the plugin prior to this call. */
void (*destroy)(const struct clap_plugin *plugin);
- /* activation/deactivation
- * [main-thread] */
- bool (*activate)(const struct clap_plugin *plugin, double sample_rate);
+ // Activate and deactivate the plugin.
+ // In this call the plugin may allocate memory and prepare everything needed for the process
+ // call. The process's sample rate will be constant and process's frame count will included in
+ // the [min, max] range, which is bounded by [1, INT32_MAX].
+ // Once activated the latency and port configuration must remain constant, until deactivation.
+ //
+ // [main-thread]
+ bool (*activate)(const struct clap_plugin *plugin,
+ double sample_rate,
+ uint32_t min_frames_count,
+ uint32_t max_frames_count);
void (*deactivate)(const struct clap_plugin *plugin);
// Set to true before processing, and to false before sending the plugin to sleep.