Rust Audio

Non-array frames

Are there many situations where the samples in a frame are not arranged in an array (as in [S; N])? If we were allowed to assume this it would greatly simplify the interface for dasp.

Especially with min_const_generics being stable it seems safe, simple, and generalizable to use [S; N].

1 Like

non-interleaved data doesn’t look like that at all. but other than this major variant, you’re good to go.

So with non-interleaved data, either you are processing the channels separately or together. If separate, just use [S; 1]. If together, than forcing you to assemble a [S; N] per frame shouldn’t be a performance issue since you would have to fetch the N values anyway (so cache misses etc will be the same). This maybe isn’t true for large N, but I don’t think loads of channels needing processing together is that common?