Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion include/clap/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ typedef struct clap_plugin {
// [main-thread & !active]
void(CLAP_ABI *destroy)(const struct clap_plugin *plugin);

// Activate and deactivate the plugin.
// Activate 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].
//
// The plugin is considered active as soon as activate returns true, meaning
// calls that require the plugin to be active must only be made after activate returns.
//
// In this call the plugin may call host-provided methods marked [being-activated].
// Once activated the latency and port configuration must remain constant, until deactivation.
// Returns true on success.
Expand All @@ -69,6 +74,14 @@ typedef struct clap_plugin {
double sample_rate,
uint32_t min_frames_count,
uint32_t max_frames_count);

// Deactivate the plugin.
//
// If the plugin is currently in the processing state, it is considered to be stopping processing
// as part of deactivation (in other words, it is not necessary to call stop_processing).
//
// The plugin is considered deactivated (!active) as soon as deactivate is called, meaning
// that it cannot be called concurrently with other methods that require the plugin to be active.
// [main-thread & active]
void(CLAP_ABI *deactivate)(const struct clap_plugin *plugin);

Expand Down