AUDIO
Source snapshot · 11 November 2026

API reference / ravet_plugin::policy

Module policy 

Expand description

Automation and bypass policies, applied once for every export format.

A product chooses them with Product::with_automation and Product::with_bypass. Every format adapter (CLAP and the native table behind VST3, AUv2, AAX and LV2) wraps the product’s processor in a PolicyProcessor, so the policies behave identically in every format.

The dry signal used by BypassPolicy::Hard, BypassPolicy::Crossfade and BypassPolicy::Frozen is the block’s input delayed by the processor’s reported latency (Processor::latency_samples, read at the start of every block), so it stays aligned with the processed signal and with the host’s delay compensation. The delay line is prepared for the larger of the latency reported after prepare and Product::with_maximum_latency, at most MAXIMUM_BYPASS_LATENCY samples; a larger reported latency is compensated only up to that capacity until the next prepare (the export adapters request a host restart when latency changes). A change of latency while active moves the dry signal abruptly. A reset clears the delayed history.

Structs§

PolicyProcessor
Wraps a processor in a product’s AutomationPolicy and BypassPolicy.

Enums§

AutomationPolicy
When parameter changes take effect within a block.
BypassPolicy
How the host bypass parameter (Parameter::bypass) is applied.

Constants§

MAXIMUM_BYPASS_LATENCY
Most samples of latency the bypass dry delay compensates (65,536, about 1.4 s at 48 kHz).
MAXIMUM_CROSSFADE_MS
Longest accepted BypassPolicy::Crossfade time in milliseconds.