pub trait ProcessorF64<T, const BUF_SIZE: usize>: AudioNode<T, BUF_SIZE>where
T: Transcendental,{
// Required method
fn process(
&mut self,
clock: &ClockTick,
audio_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> Result<(), ProcessError>;
// Provided method
fn latency(&self) -> usize { ... }
}Expand description
Passive processor of audio signals
Processors transform input signals into output signals. They have audio inputs and outputs, and may have control and clock ports.
Required Methods§
Sourcefn process(
&mut self,
clock: &ClockTick,
audio_inputs: &[&[T; BUF_SIZE]],
control_inputs: &[T],
clock_inputs: &[ClockTick],
feedback_inputs: &[&[T; BUF_SIZE]],
) -> Result<(), ProcessError>
fn process( &mut self, clock: &ClockTick, audio_inputs: &[&[T; BUF_SIZE]], control_inputs: &[T], clock_inputs: &[ClockTick], feedback_inputs: &[&[T; BUF_SIZE]], ) -> Result<(), ProcessError>
Process a block of audio
§Arguments
clock- Current clock tickaudio_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 (one per feedback port)
The processor writes output samples into its own output port buffers,
accessible via self.output_port_mut(index).
Provided Methods§
Trait Implementations§
Source§impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Processor<T, BUF_SIZE>>where
T: Transcendental,
impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Processor<T, BUF_SIZE>>where
T: Transcendental,
Source§fn process_block(
&mut self,
ctx: &mut ProcessContext<'_, T, BUF_SIZE>,
) -> Result<(), ProcessError>
fn process_block( &mut self, ctx: &mut ProcessContext<'_, T, BUF_SIZE>, ) -> Result<(), ProcessError>
Process a single block of audio. Read more