pub struct ProcessContext<'a> {
pub sample_rate: f64,
pub max_block_size: usize,
pub transport: Option<TransportInfo>,
pub output_events: &'a mut EventList,
}Expand description
Per-block context carrying host state into process and
returning per-block side-channel data from it.
Plugins write outbound events (MIDI thru, parameter touches)
into output_events; the wrapper drains them after the call
returns. Hosts that don’t care about outbound events pass an
empty list and ignore whatever the plugin pushes.
Fields§
§sample_rate: f64Sample rate active for this block. Plugins should recompute coefficients when this changes between blocks (rare but legal — host sample-rate change without a full deactivate / activate cycle).
max_block_size: usizeMaximum frames the plugin was prepared for. The buffer’s
num_frames() may be less; never more.
transport: Option<TransportInfo>Host transport snapshot for this block. None when the
host doesn’t expose transport (most CLAP hosts via the
optional clap.transport extension only on hosts that
support it).
output_events: &'a mut EventListOutbound event sink the plugin pushes parameter touches / MIDI thru into. Cleared by the wrapper at the start of each block.