pub enum InputSource {
None,
VecByChannel(Vec<Vec<f32>>),
VecByTick(Vec<Vec<f32>>),
Flat(Vec<f32>),
Generator(Box<dyn Fn(usize, usize) -> f32>),
Unit(Box<dyn AudioUnit>),
}Expand description
Input provided to the audio unit
Variants§
None
No input
VecByChannel(Vec<Vec<f32>>)
Input provided by a channel vec
- First vec contains all channels
- Second vec contains samples per channel
VecByTick(Vec<Vec<f32>>)
Input provided by a tick vec
- First vec contains all ticks
- Second vec contains samples for all channels per tick
Flat(Vec<f32>)
Input repeated on every tick
- Vector contains samples for all channels for one tick
Generator(Box<dyn Fn(usize, usize) -> f32>)
Input provided by a generator function
- First argument is the sample index
- Second argument is the channel index
Unit(Box<dyn AudioUnit>)
Input provided by an audio unit
Number of outputs of the audio unit must match the number of inputs to the test target
- if you need to set sample rate on input unit do that upfront
Implementations§
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 !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