I've got a callback from which I am attempting to capture audio from a remote I/O unit in an audio graph. Inside of my callback I have an AudioBufferList
in an AudioUnitRender
function that I need to store non-interleaved data from two channels.
Here's a code snippet for context:
//audiounit render function inside of a callback
OSStatus status;
status = AudioUnitRender(THIS.ioUnit,
ioActionFlags,
inTimeStamp,
0,
inNumberFrames,
&bufferList);
//want to initialize and configure bufferList to store non-interleaved data from both channels
...
//write audio data to disk
OSStatus result;
if (*ioActionFlags == kAudioUnitRenderAction_PostRender) {
result = ExtAudioFileWriteAsync(THIS.extAudioFileRef, inNumberFrames, &bufferList);
if(result) printf("ExtAudioFileWriteAsync %ld \n", result);}
return noErr;
Does anyone know how to do this?
Thanks.