CPPCoreGuidelines span<T> for a T** interface?

165 Views Asked by At

In digital signal processing audio is commonly passed around as a 2D array of channels and samples i.e.

void use(float** buffer, int channels, int samples) { ... }

A lot of libraries I use expect this format.

In terms of my own code, for safer manipulation, is there a way I could use gsl::span<T> to set up views on these buffers?

(I understand 1D but I'm not sure how I would set up for a 2D float** array)

Thanks in advance.

0

There are 0 best solutions below