Offline Rendering in TAAE >= 1.5
Hi,
I'm developing an app to mix multiple tracks and output to a file(via dropbox). I've noticed that AEAudioControllerRenderMainOutput(from lijon's branch) no longer works with TAAE versions 1.5 or greater when using the new low memory implementation of AEAudioFilePlayer. The resulting file will start ok, but then tracks will drop out. In my testing if I hack a sleep in my loop that writes to the file, the rendered file is ok, but this isn't a robust fix. Is there a way that I can assure that the samples have been prepared before calling AEAudioControllerRenderMainOutput()?
Has this already been addressed in a different fork?
The code AEAudioControllerRenderMainOutput() is fairly simple:
BOOL AEAudioControllerRenderMainOutput(AEAudioController audioController, AudioTimeStamp inTimeStamp, UInt32 inNumberFrames, AudioBufferList *ioData) {
channel_producer_arg_t arg = {
.channel = audioController->_topChannel,
.timeStamp = inTimeStamp,
.ioActionFlags = 0,
.nextFilterIndex = 0
};
OSStatus result = channelAudioProducer((void)&arg, ioData, &inNumberFrames);
handleCallbacksForChannel(arg.channel, &inTimeStamp, inNumberFrames, ioData);
return result;
}
thanks,
steve