• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioQueueEnqueueBuffer error !act after call interruption and pause/resume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueueEnqueueBuffer error !act after call interruption and pause/resume


  • Subject: AudioQueueEnqueueBuffer error !act after call interruption and pause/resume
  • From: David Lavo <email@hidden>
  • Date: Wed, 8 Apr 2009 23:08:20 -0700

So,

I've written an iPhone streaming audio player (based on Matt Gallagher's sample code at <http://cocoawithlove.com/2008/09/streaming-and-playing-live-mp3-stream.html> sample code and it's been working fine.  That is, until I added call-interruption processing, ala this Q&A doc: <http://developer.apple.com/iphone/library/qa/qa2008/qa1558.html>.

When a call comes in, I close the CFStream, call AudioQueueDispose(), and call AudioFileStreamClose().  After that my AudioStreamer() object is released.  If the call is dismissed, a new AudioStreamer is created as if the song was being loaded from scratch, with a new CFStream, AudioFileStream, and AudioQueue.  (Eventually I will try to restart the play from the interrupted position.)

This works until the user presses the pause button subsequent to the interruption, and then chooses to resume play: at the first AudioQueueEnqueueBuffer call (called from my PacketsProc) after resume I get the error !act.  The documentation for this error says that "the function cannot act on the audio queue because it is being asynchronously disposed of."  But after the interruption, this is an entirely new AQ from the one that was previously (and synchronously) dismissed.

One other note: if the pause/resume is very quick (<= 1s or 2s or so) the AudioQueueEnqueueBuffer error does not occur.  It only occurs if the AQ is paused for several seconds.  I am using AudioQueuePause and AudioQueueStart (w/o delay) to perform the pause and resume.

If anybody has any ideas on the cause of this error, I would much appreciate them.

Thanks,

David
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AudioQueueEnqueueBuffer error !act after call interruption and pause/resume
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: iPhone and DLS synth
  • Next by Date: Documentation missing
  • Previous by thread: Re: iPhone and DLS synth
  • Next by thread: Re: AudioQueueEnqueueBuffer error !act after call interruption and pause/resume
  • Index(es):
    • Date
    • Thread