Blog

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,
                     inBuffer,
                     0,
                     NULL);
  checkStatus(status);
}

..Should do the trick.

Related posts

Tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

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!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Subscribe without commenting