Re: AudioQueueDispose vs. AudioQueueStop
Re: AudioQueueDispose vs. AudioQueueStop
- Subject: Re: AudioQueueDispose vs. AudioQueueStop
- From: John Zorko <email@hidden>
- Date: Mon, 22 Sep 2008 11:01:52 -0700
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
|
_______________________________________________
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