pub struct DriverResult<P>where
P: PluginExport,{
pub output: Vec<Vec<f32>>,
pub sample_rate: f64,
pub block_size: usize,
pub total_frames: usize,
pub meters: MeterReadings,
pub output_events: Vec<Event>,
pub block_snapshots: Vec<Vec<(u32, f64)>>,
pub plugin: P,
}Expand description
Captured audio + metadata + plugin instance from a
PluginDriver run.
Holds the post-run plugin instance (plugin: P) so post-run
assertions can read params or custom state directly. As a side
effect, DriverResult: !Send whenever P: !Send - which is
true for plugins built via truce::plugin! (the generated
Plugin alias is unsafe impl Send only conditionally on its
inner Params type). Test code rarely cares; document if you
hit it.
Fields§
§output: Vec<Vec<f32>>Channel-major output: output[ch][frame]. Empty when
CaptureSpec::audio == false.
sample_rate: f64§block_size: usize§total_frames: usize§meters: MeterReadingsFinal-or-per-block meter readings.
output_events: Vec<Event>Output events emitted by the plugin. Offsets are absolute
(cumulative across blocks). Empty unless
CaptureSpec::output_events.
block_snapshots: Vec<Vec<(u32, f64)>>Per-block param snapshots (one Vec per block), each entry
(param_id, plain_value). Empty unless
CaptureSpec::block_snapshots.
plugin: PPost-run plugin instance. Read params or custom state from here when writing assertions over the final state.