pub enum SignalSource {
Silence,
Sine {
freq: f32,
amplitude: f32,
phase: f64,
},
WhiteNoise {
amplitude: f32,
rng: u64,
},
Wav {
samples: Arc<Vec<Vec<f32>>>,
pos: usize,
looping: bool,
},
}Expand description
A host-synthesized input signal (no capture device needed). Carries its own cursor so blocks are continuous across calls.
Variants§
Silence
Silence (all zeros).
Sine
A sine tone at freq Hz and linear amplitude (0..1).
Fields
WhiteNoise
White noise with linear amplitude (0..1).
Wav
A preloaded multi-channel sample (e.g. from read_wav), played from pos.
Implementations§
Trait Implementations§
Source§impl Clone for SignalSource
impl Clone for SignalSource
Source§fn clone(&self) -> SignalSource
fn clone(&self) -> SignalSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SignalSource
impl Debug for SignalSource
Auto Trait Implementations§
impl Freeze for SignalSource
impl RefUnwindSafe for SignalSource
impl Send for SignalSource
impl Sync for SignalSource
impl Unpin for SignalSource
impl UnsafeUnpin for SignalSource
impl UnwindSafe for SignalSource
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