Open Secretmapper opened 2 years ago
IMO this would be best handled by traits shared between audio crates that are generic over interleaved/deinterleaved audio buffers: https://github.com/udoprog/audio/issues/3
I agree with @Be-ing here. It would be nice to be able to handle interleaved data, but I don't want to add everything needed to be generic over data alignment in this lib. The "audio" crate looks like it could be a nice solution here.
There is an example here that does interleaved i16: https://github.com/HEnquist/rubato/blob/adapter_v2/examples/process_i16.rs That branch has a quite large rewrite to use the new audioadapter-rs crate for handling different sample formats and layouts.
It would be great if we can provide options for input/output formats (interleave/deinterleaved).
This can be done in userland (interleaving/deinterleaving before hand). But by integrating it nothing new has to be allocated/processing step needed and only the iterating logic needs to change inside the synchro process.