pub struct SnapshotConfig {
pub num_samples: usize,
pub sample_rate: f64,
pub svg_width: Option<usize>,
pub svg_height_per_channel: Option<usize>,
pub processing_mode: Processing,
pub with_inputs: bool,
}Expand description
Configuration for snapshotting an audio node.
Fields§
§num_samples: usizeNumber of samples to generate.
Default is 44100 - 1s
sample_rate: f64Sample rate of the audio node.
Default is 44100.0
svg_width: Option<usize>Optional width of the SVG viewBox
None means proportional to num_samples
svg_height_per_channel: Option<usize>Height of one channel in the SVG viewBox
None fallbacks to default - 100
processing_mode: ProcessingProcessing mode for snapshotting an audio node.
with_inputs: boolWhether to include inputs in snapshot
Implementations§
Source§impl SnapshotConfig
impl SnapshotConfig
pub fn with_samples(num_samples: usize) -> Self
Trait Implementations§
Source§impl Clone for SnapshotConfig
impl Clone for SnapshotConfig
Source§fn clone(&self) -> SnapshotConfig
fn clone(&self) -> SnapshotConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotConfig
impl Debug for SnapshotConfig
Source§impl Default for SnapshotConfig
impl Default for SnapshotConfig
impl Copy for SnapshotConfig
Auto Trait Implementations§
impl Freeze for SnapshotConfig
impl RefUnwindSafe for SnapshotConfig
impl Send for SnapshotConfig
impl Sync for SnapshotConfig
impl Unpin for SnapshotConfig
impl UnwindSafe for SnapshotConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more