ErikNatanael / knyst

Apache License 2.0
34 stars 4 forks source link

Replace NodeBufferRef #16

Open ErikNatanael opened 1 year ago

ErikNatanael commented 1 year ago

NodeBufferRef is a workaround around the fact that it is currently not possible, in safe stable Rust, to make a &mut [f32] into a &mut [&mut [f32]]. It would be cleaner if &mut [&mut [f32]] could be passed to a Gen's process function.

When stable, as_chunks_mut together with a lot of generics could be a solution. Currently, it is not encoded at compile time how many channels of input or output data a Gen expects.