Skip to main content

process_planar

Function process_planar 

Source
pub fn process_planar<C: Convert>(
    converters: &mut [C],
    inputs: &[&[f64]],
    outputs: &mut [&mut [f64]],
) -> Result<(usize, usize)>
Expand description

Process planar channel buffers in lockstep.

Each converter is independent (no stereo mixing). The returned (consumed, produced) applies to every channel.

The caller must still pass matching layouts: one buffer per converter, and the same input/output length on every channel. Mismatches return Error::MismatchedChannels or Error::MismatchedLength instead of panicking. Converters should come from the same manager and stay in lockstep; if they have drifted, this returns Error::UnalignedConverters after some channels may already have advanced.