pub struct AudioUnitSnapshotData {
pub input_data: Vec<Vec<f32>>,
pub output_data: Vec<Vec<f32>>,
pub abnormalities: Vec<Vec<(usize, SnapshotAbnormalSample)>>,
pub sample_rate: f64,
pub num_samples: usize,
pub start_sample: usize,
}Expand description
Raw sample buffers and metadata captured from one run of an audio unit.
Returned by the snapshot_audio_unit_data* family of functions and passed to the
closure argument of [assert_audio_unit_meta_data_snapshot!].
All sample buffers are indexed as [channel][sample].
Fields§
§input_data: Vec<Vec<f32>>Input samples fed to the unit, one Vec<f32> per input channel.
output_data: Vec<Vec<f32>>Output samples produced by the unit, one Vec<f32> per output channel.
abnormalities: Vec<Vec<(usize, SnapshotAbnormalSample)>>Abnormal (NaN / ±∞) samples per output channel.
Each entry is (sample_index, kind). Only populated when
SnapshotConfig::allow_abnormal_samples is true; otherwise the processing
function panics on the first abnormal sample.
sample_rate: f64Sample rate used during processing, in Hz.
num_samples: usizeNumber of output samples captured (excluding warmup).
start_sample: usizeIndex of the first captured sample relative to the start of the stream (i.e. the warmup length in samples).
Trait Implementations§
Source§impl Clone for AudioUnitSnapshotData
impl Clone for AudioUnitSnapshotData
Source§fn clone(&self) -> AudioUnitSnapshotData
fn clone(&self) -> AudioUnitSnapshotData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more