Skip to main content

Sink

Trait Sink 

Source
pub trait Sink<T, const BUF_SIZE: usize>: SignalNode<T, BUF_SIZE>
where T: Transcendental,
{ // Required method fn consume( &mut self, clock: &ClockTick, signal_inputs: &[&[T; BUF_SIZE]], control_inputs: &[T], clock_inputs: &[ClockTick], feedback_inputs: &[&[T; BUF_SIZE]], ) -> Result<(), ProcessError>; }
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§

Source

fn consume( &mut self, clock: &ClockTick, signal_inputs: &[&[T; BUF_SIZE]], control_inputs: &[T], clock_inputs: &[ClockTick], feedback_inputs: &[&[T; BUF_SIZE]], ) -> Result<(), ProcessError>

Consume a block of audio

§Arguments
  • clock - Current clock tick
  • signal_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,

Source§

fn process_block( &mut self, ctx: &mut ProcessContext<'_, T, BUF_SIZE>, ) -> Result<(), ProcessError>

Process a single block of audio. Read more

Implementors§