AudioSampleBuffer and regular buffers


I may need to copy chunks of data back and forth between JUCE audiosamplebuffers and plain malloc:ed memory. So I’m wondering how those buffers are laid out.

Simply put, can the pointer returned by getSampleData be used like a regular buffer pointer? I.E if I go

float * myPtr = input.getSampleData(0,i);

will myPtr[1] or myPtr++ return the next sample consistently?



thats the way to do it unless you want to call getSampleData on each sample!




the audiosamplebuffer is just a sort of harness for a regler buffer. i think.

nice wee helper methods. but raw pointer when y need it.