Symphonia icon indicating copy to clipboard operation
Symphonia copied to clipboard

core: Add `SampleBuffer::samples_mut`

Open FelixMcFelix opened this issue 2 years ago • 0 comments

Allows mutable access to exported samples, enabling in-place processing of output audio data.

Currently, to use functions like libopus's soft_clip (which take &mut [f32], interleaved) this can only be achieved on SampleBuffer with a significant memcopy (seemingly ~8us for 1920 f32 samples, relative to ~40us decode + ~80us encode). samples_mut removes this additional overhead.

FelixMcFelix avatar Jul 25 '22 14:07 FelixMcFelix