• 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: Why Doesn't This Work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSound: Why Doesn't This Work?


  • Subject: Re: NSSound: Why Doesn't This Work?
  • From: "Ben Kennedy" <email@hidden>
  • Date: Sat, 2 Nov 2002 18:55:41 -0500
  • Organization: Zygoat Creative Technical Services

On 02,11,02 at 6:44 pm -0500, Michael Urban wrote:

>Why does the following program never terminate? I could swear it used
>to in 10.0 or thereabouts....

From the appkit release notes:

>NSSound now uses QuickTime to play most sound files/URLs, including
>streaming non-file URLs from the Internet. Since QuickTime requires the
>run loop to be run for sound (or movies) to continue playing, NSSound now
>requires this as well. The delegate -sound:didFinishPlaying: will also
>not be called unless the run loop is run. By "run loop", what is meant is
>the run loop on the thread which starts the sound playing. For Cocoa
>applications, this is not a big deal for sounds played by the main
>thread, as Cocoa apps normally let the AppKit handle running the run loop
>on the main thread. But in other situations you will need to be aware of
>this requirement.

So I gather that NSSound never has the opportunity to update its
'playing' status, since the run loop never goes through an iteration (you
effectively sleep(2) ad infinitum).

-b


--
Ben Kennedy, chief magician
zygoat creative technical services
613-228-3392 | 1-866-466-4628
http://www.zygoat.ca
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >NSSound: Why Doesn't This Work? (From: Michael Urban <email@hidden>)

  • Prev by Date: Re: Getting hitTest of Subview
  • Next by Date: Locking multiple views at the same time in a single window?
  • Previous by thread: NSSound: Why Doesn't This Work?
  • Next by thread: Locking multiple views at the same time in a single window?
  • Index(es):
    • Date
    • Thread