pub fn encode_parallel(
cfg: &ParallelConfig,
pcm: &[f32],
frame_size: usize,
) -> Vec<Vec<u8>>Expand description
Encode pcm (interleaved f32, channels-interleaved) in frame_size
samples-per-channel frames, across cfg.threads workers, returning one Opus
packet per frame in order. Falls back to a single serial encoder when the
input is too small to split usefully.
The serial equivalent is encode_serial; this returns the same count of
packets and (with adequate warmup) a perceptually-identical bitstream.