• 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: How can I get an audio queue to stop playing immediately?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I get an audio queue to stop playing immediately?


  • Subject: Re: How can I get an audio queue to stop playing immediately?
  • From: Neil Mix <email@hidden>
  • Date: Fri, 3 Oct 2008 10:56:45 -0500

I think I know what's happening: if you pass NULL as the inCallbackRunLoop to AudioQueueNewOutput you get the behavior John describes. (on the iPhone, can't say for OSX.) CFRunLoopGetCurrent() is likely what he wants to pass in there.

Along those lines, is there any documentation that provides details of AudioQueue WRT threading?  I'm getting slight audio glitches on the new iPod Touches, I *think* it has something to do with AudioQueue callbacks being delayed slightly, and it appears that the next buffer won't play until the previous buffer's callback has been executed. Wondering if I need to start worrying about threads and run loops to solve this, but my intuition is saying there's a red herring somewhere in my logic.

On Oct 1, 2008, at 5:03 PM, William Stewart wrote:

Hi John

I don't really know how to respond. We don't see the problem that you are detailing below.

Could you perhaps try taking one of our example apps (aqplay for instance) and just modifying the call to Stop to verify for yourself that the call is basically operational? 

Alternatively, if we can get some code to run here, we can certainly look at it - to do this you would file a bug report: http:bugreporter.apple.com

Thanks

Bill

(ps - oh and closing the file will have absolutely no affect on whether and audio queue is running or not)

On Oct 1, 2008, at 12:52 PM, John Zorko wrote:


Jason,

Thanks for the response.  I'm playing a stream from a server, not a file, but I tried calling AudioFileStreamClose() before AudioQueueStop() -- the problem remains, no matter if I set the immediate param to true or false (I wait for _IsRunning to be set to false either way).  AudioQueueStop() just takes its' time stopping the queue -- anywhere from 5-20 seconds, sometimes 2-3 minutes or more if those decode errors happen.  Is there any sort of way to make it stop playing / processing / etc. right away?




On Oct 1, 2008, at 6:16 AM, Jason Slater wrote:

Have you tried calling AudioFileClose() before AudioQueueStop()?

Look for a sample called "SpeakHere" - I've used this for learning how to play/record audio and it works very well.

Jason

2008/9/30 John Zorko <email@hidden>

Hello, all ...

My experience has been that, no matter if I call AudioQueueStop() with true or false (waiting for IsRunning to be set to false before continuing either way), the audio queue doesn't stop immediately ... it takes 5-20 seconds, occasionally longer.  I would like the user to experience an instant stop of one stream and a very speedy start of the next when they choose a different stream, but AudioQueueStop() never seems to stop the playing audio right away.

I've tried calling AudioQueuePause() before I call AudioQueueStop(), to no avail.  Is there a way to make the audio queue stop playing immediately, as in, within perhaps 100ms after I call the function?

Regards,

John

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: 
 >Re: How can I get an audio queue to stop playing immediately? (From: "Jason Slater" <email@hidden>)
 >Re: How can I get an audio queue to stop playing immediately? (From: John Zorko <email@hidden>)
 >Re: How can I get an audio queue to stop playing immediately? (From: William Stewart <email@hidden>)

  • Prev by Date: Re: REMOTE IO Audio Unit
  • Next by Date: Reseting an AudioQueue
  • Previous by thread: Re: How can I get an audio queue to stop playing immediately?
  • Next by thread: Re: Failure of MIDIDeviceCreate
  • Index(es):
    • Date
    • Thread