pub struct SnapshotConfigBuilder { /* private fields */ }Expand description
Builder for SnapshotConfig.
Implementations§
Source§impl SnapshotConfigBuilder
impl SnapshotConfigBuilder
Sourcepub fn sample_rate(&mut self, value: f64) -> &mut Self
pub fn sample_rate(&mut self, value: f64) -> &mut Self
Sample rate of the audio unit.
Default is 44100.0 fundsp::DEFAULT_SR
Sourcepub fn num_samples(&mut self, value: usize) -> &mut Self
pub fn num_samples(&mut self, value: usize) -> &mut Self
Number of samples to generate.
Default is 1024
Sourcepub fn processing_mode(&mut self, value: Processing) -> &mut Self
pub fn processing_mode(&mut self, value: Processing) -> &mut Self
Processing mode for snapshotting an audio unit.
Default - Tick
Sourcepub fn warm_up(&mut self, value: WarmUp) -> &mut Self
pub fn warm_up(&mut self, value: WarmUp) -> &mut Self
Warm-up mode for snapshotting an audio unit.
Default - WarmUp::None
Sourcepub fn allow_abnormal_samples(&mut self, value: bool) -> &mut Self
pub fn allow_abnormal_samples(&mut self, value: bool) -> &mut Self
How 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.
Sourcepub fn output_mode<VALUE: Into<SnapshotOutputMode>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn output_mode<VALUE: Into<SnapshotOutputMode>>( &mut self, value: VALUE, ) -> &mut Self
Snaphsot output mode
Use configurable chart for visual snapshots
Use Wav16 or Wav32 for audial snapshots
Sourcepub fn try_output_mode<VALUE: TryInto<SnapshotOutputMode>>(
&mut self,
value: VALUE,
) -> Result<&mut Self, VALUE::Error>
pub fn try_output_mode<VALUE: TryInto<SnapshotOutputMode>>( &mut self, value: VALUE, ) -> Result<&mut Self, VALUE::Error>
Snaphsot output mode
Use configurable chart for visual snapshots
Use Wav16 or Wav32 for audial snapshots
Sourcepub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
pub fn build(&self) -> Result<SnapshotConfig, SnapshotConfigBuilderError>
Source§impl SnapshotConfigBuilder
Legacy (v1.x) compatibility helpers
impl SnapshotConfigBuilder
Legacy (v1.x) compatibility helpers
Sourcepub fn chart_layout(&mut self, value: Layout) -> &mut Self
pub fn chart_layout(&mut self, value: Layout) -> &mut Self
Set chart layout.
Sourcepub fn with_inputs(&mut self, value: bool) -> &mut Self
pub fn with_inputs(&mut self, value: bool) -> &mut Self
Include inputs in chart.
Sourcepub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
pub fn svg_height_per_channel(&mut self, value: usize) -> &mut Self
Set SVG height per channel.
Sourcepub fn show_labels(&mut self, value: bool) -> &mut Self
pub fn show_labels(&mut self, value: bool) -> &mut Self
Toggle label visibility.
Sourcepub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self
pub fn format_x_axis_labels_as_time(&mut self, value: bool) -> &mut Self
Format X axis labels as time.
Sourcepub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
pub fn max_labels_x_axis(&mut self, value: Option<usize>) -> &mut Self
Set maximum number of X axis labels.
Sourcepub fn chart_title<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn chart_title<S: Into<String>>(&mut self, value: S) -> &mut Self
Set chart title.
Sourcepub fn output_title<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn output_title<S: Into<String>>(&mut self, value: S) -> &mut Self
Add an output channel title.
Sourcepub fn input_title<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn input_title<S: Into<String>>(&mut self, value: S) -> &mut Self
Add an input channel title.
Sourcepub fn output_titles<S: Into<Vec<String>>>(&mut self, value: S) -> &mut Self
pub fn output_titles<S: Into<Vec<String>>>(&mut self, value: S) -> &mut Self
Add output channels’ titles.
Sourcepub fn input_titles<S: Into<Vec<String>>>(&mut self, value: S) -> &mut Self
pub fn input_titles<S: Into<Vec<String>>>(&mut self, value: S) -> &mut Self
Add input channels’ titles.
Sourcepub fn line_width(&mut self, value: f32) -> &mut Self
pub fn line_width(&mut self, value: f32) -> &mut Self
Set waveform line width.
Sourcepub fn background_color<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn background_color<S: Into<String>>(&mut self, value: S) -> &mut Self
Set background color.
Sourcepub fn output_colors(&mut self, colors: Vec<String>) -> &mut Self
pub fn output_colors(&mut self, colors: Vec<String>) -> &mut Self
Replace all output channel colors.
Sourcepub fn output_color<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn output_color<S: Into<String>>(&mut self, value: S) -> &mut Self
Append one output channel color.
Sourcepub fn input_colors(&mut self, colors: Vec<String>) -> &mut Self
pub fn input_colors(&mut self, colors: Vec<String>) -> &mut Self
Replace all input channel colors.
Sourcepub fn input_color<S: Into<String>>(&mut self, value: S) -> &mut Self
pub fn input_color<S: Into<String>>(&mut self, value: S) -> &mut Self
Append one input channel color.
Trait Implementations§
Source§impl Clone for SnapshotConfigBuilder
impl Clone for SnapshotConfigBuilder
Source§fn clone(&self) -> SnapshotConfigBuilder
fn clone(&self) -> SnapshotConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more