I've been trying to create a simple multitrack recording / mixing program and the issue I've run into is at least on my device it takes the AERecorder about 6,660 samples in time to start writing to the file but playback starts immediately (with a call to add various channels to the audio controller directly after starting the aerecorder. So later during playback of individual tracks with the original music, the newly recorded tracks start playing at the same time but are 6,660 samples ahead of the music.
I tried delaying playback during recording using AEBlockScheduler but I keep getting this error before the music actually begins to play:
TAAE: Timed out while performing message exchange.
Any thoughts / help would be greatly appreciated. Thanks!