Skip to main content

InnerProcessor

Trait InnerProcessor 

Source
pub trait InnerProcessor: Send {
    // Required methods
    fn process(&mut self, samples: &mut [f32]);
    fn flush(&mut self) -> Vec<f32>;
}
Expand description

A processor applied to the internal normalized form (48kHz / stereo / interleaved f32) before it is split into the output taps.

Kept behind a trait so flexaudio-core stays independent of any concrete DSP implementation (e.g. noise suppression). The facade injects an implementation; the core only sees this contract. Because the same processed samples feed every output tap, a single processor affects both the primary and secondary outputs.

process runs on each batch of normalized samples in place. flush is called once at stop to recover any tail the processor is holding back (e.g. a fixed delay line); it returns the trailing 48kHz / stereo interleaved samples (empty if none).

Required Methods§

Source

fn process(&mut self, samples: &mut [f32])

Process one batch of 48kHz / stereo interleaved samples in place. The slice length is always a multiple of two (stereo).

Source

fn flush(&mut self) -> Vec<f32>

Flush and return any buffered tail (48kHz / stereo interleaved). Called once when the stream stops. Returns an empty vector when nothing is held.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§