• 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
Re: AudioQueueDispose vs. AudioQueueStop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioQueueDispose vs. AudioQueueStop


  • Subject: Re: AudioQueueDispose vs. AudioQueueStop
  • From: Craig Hopson <email@hidden>
  • Date: Mon, 22 Sep 2008 12:18:04 -0600

John,

It sounds like you are using the "immediate" param backwards. When the URL loading has finished, the queue still may have (probably has) stuff in it. So, in this normal completion case, set immediate = false to allow the queue to empty on its own. Don't dispose until your kAudioQueueProperty_IsRunning callback fires and you know the queue has finished.

-Craig

On Sep 22, 2008, at 12:01 PM, John Zorko wrote:


Craig,


You are calling: AudioQueueStop(myData.audioQueue, false); And then immediately disposing of the queue (buffers). This is bad. Please read the documentation re: AudioQueueStop.

Whether you tell the audio queue to stop immediately or not, you are better off (I think) adding a property listener to the queue for the kAudioQueueProperty_IsRunning property and only dispose of the queue when it signals that it actually has stopped.

Ooooh, this makes sense, then ... because I occasionally have a crash when running this (bus error), and it very well might be the audio queue trying to dereference something that I errantly disposed of by calling AudioQueueDispose so soon. Many thanks!


BTW, is there a way I can tell if the audio queue is idle i.e. there are no buffers left to decode / play? Another problem i'm having is that once the NSURLConnection tells me it finished loading the URL, I stop the audio queue (with true), but quite often the last part of the music is cut off. Is there a property I can query for that?

Regards,

John, working on some other code now, but will re-read the Core Audio documentation this evening ...

Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com












_______________________________________________ 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
References: 
 >AudioQueueDispose vs. AudioQueueStop (From: John Zorko <email@hidden>)
 >Re: AudioQueueDispose vs. AudioQueueStop (From: Craig Hopson <email@hidden>)
 >Re: AudioQueueDispose vs. AudioQueueStop (From: John Zorko <email@hidden>)

  • Prev by Date: Re: AudioQueueDispose vs. AudioQueueStop
  • Next by Date: Re: easiest way to process realtime audio
  • Previous by thread: Re: AudioQueueDispose vs. AudioQueueStop
  • Next by thread: RE: Coreaudio-api Digest, Vol 5, Issue 297
  • Index(es):
    • Date
    • Thread