This will only be of interest to a very small minority, but for those of us who have used Core Audio and come across error -66632 in all its glorious undocumented-ness, this is a helpful note.
The error occurs when using AudioQueueEnqueueBuffer. It happens when one tries to enqueue a buffer when the queue in question is no longer running.
Wrap the AudioQueueEnqueueBuffer in a statement that checks to see if the queue is actually running, as in the SpeakHere/SpeakHear (depending on where you look) example. Something like:
if ( [track recording] ) {
// Re-enqueue this buffer
status = AudioQueueEnqueueBuffer (inAudioQueue,
inBuffer,
0,
NULL);
checkStatus(status);
}
..Should do the trick.
I just found myself in that very small minority, and this was a great find. Thanks for documenting this!