Skip to main content

Processable

Trait Processable 

Source
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§

Source

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.

Implementations on Foreign Types§

Source§

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>, ) -> ProcessResult<()>

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>, ) -> ProcessResult<()>

Source§

impl<T, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for Box<dyn Source<T, BUF_SIZE>>
where T: Transcendental,

Source§

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

Implementors§

Source§

impl<T: Transcendental, const BUF_SIZE: usize> Processable<T, BUF_SIZE> for NodeVariant<T, BUF_SIZE>