I'd like to make an AudioBufferList with 2 buffers. I've been using the following code, but I'm sure this isn't the right way to do it, as I can't be allocating the memory for the 2nd buffer.
Can someone give me a better method ?
splitterABL.mNumberBuffers = 2; splitterABL.mBuffers[0] = bufferLeft; splitterABL.mBuffers[1] = bufferRight;
for (uint i = 0; i < 2; i++) { splitterABL.mBuffers[i].mNumberChannels = 1; splitterABL.mBuffers[i].mDataByteSize = 0; //samplesPerBuffer * sizeof (Float32); splitterABL.mBuffers[i].mData = NULL; }
cheers RD |