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§
- Policy
Processor - Wraps a processor in a product’s
AutomationPolicyandBypassPolicy.
Enums§
- Automation
Policy - When parameter changes take effect within a block.
- Bypass
Policy - 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::Crossfadetime in milliseconds.