• 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: NSSound needs a run loop cycle to repeat-play a sound?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSound needs a run loop cycle to repeat-play a sound?


  • Subject: Re: NSSound needs a run loop cycle to repeat-play a sound?
  • From: Michael Ash <email@hidden>
  • Date: Sat, 28 Mar 2009 23:10:24 -0400

On Sat, Mar 28, 2009 at 2:11 AM, Jerry Krinock <email@hidden> wrote:
> If I invoke NSSound to play the same sound more than once, without cycling
> through a run loop, it only plays the first time, and other times, fails
> "silently". [1]
>
> If I cycle through a run loop, then it works fine. [2]
>
> The documentation states that NSSounds play in a separate thread and I don't
> see any explanation for this in "Sound Programming Topics for Cocoa".  Is
> this a bug or is it too late for me to be trying to read?

I'd call it a documentation deficit. Probably worth filing a bug
reading, roughly, "Half of the APIs in Cocoa assume that the calling
thread has an active runloop, but aren't documented as having this
requirement." NSSound is far from alone in this respect.

Mike
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSSound needs a run loop cycle to repeat-play a sound? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: [Moderator] Re: MPMediaItem valueForKey broken?
  • Next by Date: Re: XMLParser
  • Previous by thread: NSSound needs a run loop cycle to repeat-play a sound?
  • Next by thread: re: Core Data: is fetching safe during validateForInsert:/validateForUpdate?
  • Index(es):
    • Date
    • Thread