pub trait Processable<T: Transcendental, const BUF_SIZE: usize> {
// Required method
fn process_block(
&mut self,
ctx: &mut ProcessContext<'_, T, BUF_SIZE>,
) -> ProcessResult<()>;
}Expand description
Unified trait for processing audio nodes.
This trait is implemented for all Source, Processor, and Sink types,
providing a single method that dispatches to the appropriate underlying
method (generate, process, or consume).
Required Methods§
Sourcefn 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.
The default implementation uses the node’s category to call the appropriate subtrait method. Implementors can override this if they need custom behavior.