Skip to main content

StreamProcessor

Trait StreamProcessor 

Source
pub trait StreamProcessor {
    // Required methods
    fn sample_rate(&self) -> u32;
    fn channels(&self) -> usize;
    fn block_size(&self) -> usize;
    fn process_block(
        &mut self,
        channels: &[Vec<f64>],
    ) -> Result<Vec<Vec<f64>>, String>;
    fn flush(&mut self) -> Result<Vec<Vec<f64>>, String>;
    fn reset(&mut self);
}
Expand description

A resettable audio processor with a fixed input/output block size.

Required Methods§

Source

fn sample_rate(&self) -> u32

Source

fn channels(&self) -> usize

Source

fn block_size(&self) -> usize

Source

fn process_block( &mut self, channels: &[Vec<f64>], ) -> Result<Vec<Vec<f64>>, String>

Source

fn flush(&mut self) -> Result<Vec<Vec<f64>>, String>

Source

fn reset(&mut self)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl StreamProcessor for GtcrnProcessor

Available on crate feature gtcrn only.