pub trait Sink<T: Transcendental, const BUF_SIZE: usize>: SignalNode<T, BUF_SIZE> {
// Required method
fn consume(
&mut self,
clock: &ClockTick,
signal_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> ProcessResult<()>;
}Expand description
Active sink of signals
Sinks consume audio and send it to external destinations. They have no audio outputs, but may have control and clock ports.
Required Methods§
Sourcefn consume(
&mut self,
clock: &ClockTick,
signal_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> ProcessResult<()>
fn consume( &mut self, clock: &ClockTick, signal_inputs: &[&[T; BUF_SIZE]], control_inputs: &[T], clock_inputs: &[ClockTick], feedback_inputs: &[&[T; BUF_SIZE]], ) -> ProcessResult<()>
Consume a block of audio
§Arguments
clock- Current clock ticksignal_inputs- Audio input buffers (one per audio input)control_inputs- Control signal values (one per control input)clock_inputs- Clock signal values (one per clock input)feedback_inputs- Feedback values from previous blocks
Trait Implementations§
Source§impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Sink<T, BUF_SIZE>>where
T: Transcendental,
impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Sink<T, BUF_SIZE>>where
T: Transcendental,
Source§fn process_block(
&mut self,
ctx: &mut ProcessContext<'_, T, BUF_SIZE>,
) -> ProcessResult<()>
fn process_block( &mut self, ctx: &mut ProcessContext<'_, T, BUF_SIZE>, ) -> ProcessResult<()>
Process a single block of audio. Read more