Core Audio and freakin’ error -66632

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,

..Should do the trick.

, , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

One Comment

  1. Posted May 3, 2009 at 7:36 am | Permalink

    I just found myself in that very small minority, and this was a great find. Thanks for documenting this!