Trait oxcable::types::AudioDevice
[−]
[src]
pub trait AudioDevice { fn num_inputs(&self) -> usize; fn num_outputs(&self) -> usize; fn tick(&mut self, t: Time, inputs: &[Sample], outputs: &mut [Sample]); }
A device that processes and/or generates audio.
Required Methods
fn num_inputs(&self) -> usize
Returns the number of input channels the device accepts.
fn num_outputs(&self) -> usize
Return sthe number of output channels the device returns.
fn tick(&mut self, t: Time, inputs: &[Sample], outputs: &mut [Sample])
Processes a single frame worth of audio data. This function should be
called once per time step, starting at t=0
.
If a device accepts no inputs, or generates no outputs, then zero length slices may be passed in.
Implementors
impl AudioDevice for Filter
impl AudioDevice for Filter
impl AudioDevice for AudioIn
impl AudioDevice for AudioOut
impl<R: Read> AudioDevice for WavReader<R>
impl<W: Write + Seek> AudioDevice for WavWriter<W>
impl AudioDevice for Adder
impl AudioDevice for Gain
impl AudioDevice for Multiplexer
impl AudioDevice for Multiplier
impl AudioDevice for Oscillator
impl<D> AudioDevice for Messaged<D> where D: AudioDevice + MessageReceiver