#simd #iteration #audio-processing

no-std audio_buffer_interface

Traits for iterating through scalar and SIMD audio data

1 unstable release

0.1.0 Mar 29, 2024

#626 in Audio

MIT license

12KB

Audio Buffer Interface

    When supplying audio data to consumers, many crates do so by passing a single slice of audio samples, or a slice of slices of audio samples. This then leads to writing unidiomatic Rust when working with this data. Most work done over audio data is not done to all samples but to groupings of samples, like channels or frames. Providing a slices and layout information puts the burden of writing iteration logic on all users. Using iterators is more idiomatic, but the real-time constraints of audio processing make implementing these iterators difficult.

    audio_buffer_interface provides traits for iteration of audio data. Iteration is done by channels or frames, both of which return iterators of samples. Two different traits allow for iterating over scalar or SIMD values. A reference implementation licensed under the AGPL can be found here.

No runtime deps

Features