pub struct Constant<T> {
pub value: T,
}Expand description
Constant: emit a constant value (ignores input)
Fields§
§value: TImplementations§
Trait Implementations§
Source§impl<T: Clone + Send> Module for Constant<T>
impl<T: Clone + Send> Module for Constant<T>
Source§fn tick(&mut self, _input: Self::In) -> Self::Out
fn tick(&mut self, _input: Self::In) -> Self::Out
Process a single sample, advancing internal state by one time step. Read more
Source§fn process(&mut self, input: &[Self::In], output: &mut [Self::Out])
fn process(&mut self, input: &[Self::In], output: &mut [Self::Out])
Process a block of samples for efficiency. Read more
Source§fn set_sample_rate(&mut self, _sample_rate: f64)
fn set_sample_rate(&mut self, _sample_rate: f64)
Notify module of sample rate changes. Read more
Auto Trait Implementations§
impl<T> Freeze for Constant<T>where
T: Freeze,
impl<T> RefUnwindSafe for Constant<T>where
T: RefUnwindSafe,
impl<T> Send for Constant<T>where
T: Send,
impl<T> Sync for Constant<T>where
T: Sync,
impl<T> Unpin for Constant<T>where
T: Unpin,
impl<T> UnsafeUnpin for Constant<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Constant<T>where
T: UnwindSafe,
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
Source§impl<M> ModuleExt for Mwhere
M: Module,
impl<M> ModuleExt for Mwhere
M: Module,
Source§fn then<M: Module<In = Self::Out>>(self, next: M) -> Chain<Self, M>
fn then<M: Module<In = Self::Out>>(self, next: M) -> Chain<Self, M>
Chain this module with another (sequential composition:
>>>)Source§fn fanout<M: Module<In = Self::In>>(self, other: M) -> Fanout<Self, M>
fn fanout<M: Module<In = Self::In>>(self, other: M) -> Fanout<Self, M>
Split input to two parallel processors (
&&&)