pub struct SnapshotConfig {
pub sample_rate: f64,
pub num_samples: usize,
pub processing_mode: Processing,
pub warm_up: WarmUp,
pub allow_abnormal_samples: bool,
pub output_mode: SnapshotOutputMode,
pub output_assertion: OutputAssertion,
}Expand description
Configuration for snapshotting an audio unit.
Fields§
§sample_rate: f64Sample rate of the audio unit.
Default is 44100.0 fundsp::DEFAULT_SR
num_samples: usizeNumber of samples to generate.
Default is 1024
processing_mode: ProcessingProcessing mode for snapshotting an audio unit.
Default - Tick
warm_up: WarmUpWarm-up mode for snapshotting an audio unit.
Default - WarmUp::None
allow_abnormal_samples: boolHow to handle abnormal samples: NaN,±Infinity
When set to true abnormal samples are allowed during processing,
but skipped in actual output. Plotted with labeled dots.
When set to false and encoutered abnormal samples,
the snapshotting process will panic.
output_mode: SnapshotOutputModeSnaphsot output mode
Use configurable chart for visual snapshots
Use Wav16 or Wav32 for audial snapshots
output_assertion: OutputAssertionAssertion applied to the output samples after processing.
Default - OutputAssertion::NonZero: panics when all output samples are 0.0.
Use OutputAssertion::Skip to opt out, or OutputAssertion::VariesFrom to
check that the output differs from an arbitrary baseline value.
Implementations§
Trait Implementations§
Source§impl Clone for SnapshotConfig
impl Clone for SnapshotConfig
Source§fn clone(&self) -> SnapshotConfig
fn clone(&self) -> SnapshotConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more