Re: stopping sound
Re: stopping sound
- Subject: Re: stopping sound
- From: Jens Alfke <email@hidden>
- Date: Fri, 4 Apr 2008 21:56:22 -0700
On 4 Apr '08, at 6:52 PM, Roland Silver wrote:
... in fact, while the 440 "A" is being played, nothing responds to
a user action, e.g. clicking a menu in the menu bar doesn't drop
down a list of choices.
Sounds like your main thread is busy. I would imagine the code you're
using runs synchronously, not returning to the event loop until the
sound is finished. You need to change it so it's asynchronous, and
your event loop continues to run, so it can detect the press of the
Stop button.
(If you're not sure what the main thread is doing, try running your
app in the debugger and interrupting it (pressing Pause in Xcode)
while it's playing the sound. Then look at the stack of the main
thread.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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