pub enum InputSource {
Silence,
Constant(f32),
Buffer(Vec<Vec<f32>>),
Generator(Box<dyn FnMut(usize, f64) -> f32>),
}Expand description
What audio gets fed into the plugin’s input bus each block.
Silence is the default. Effects with smoothers / lookahead /
modulators usually want one of the non-silent variants to reach
steady state during the run.
Variants§
Silence
Zero on every channel for the whole run.
Constant(f32)
Constant DC: every sample is value on every channel.
Buffer(Vec<Vec<f32>>)
Channel-major buffer (bufs[ch][frame]). Length must be
>= total_frames; shorter buffers panic at run-time. The
channel count must match the driver’s channels.
Generator(Box<dyn FnMut(usize, f64) -> f32>)
(frame_idx, sample_rate) -> sample. Same value goes into
every channel. Useful for sweeps / noise / generators.
Trait Implementations§
Source§impl Default for InputSource
impl Default for InputSource
Source§fn default() -> InputSource
fn default() -> InputSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InputSource
impl !RefUnwindSafe for InputSource
impl !Send for InputSource
impl !Sync for InputSource
impl Unpin for InputSource
impl UnsafeUnpin for InputSource
impl !UnwindSafe for InputSource
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