• 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 broken in 10.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSound broken in 10.2?


  • Subject: Re: NSSound broken in 10.2?
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 30 Dec 2002 11:20:30 +0100

On samedi, dicembre 28, 2002, at 09:51 PM, Michael McCulloch wrote:

I'm running 10.2.3 with the Dec 2002 dev tools release.

The following code does not work:

- (void) playMySound
{
currentSound = [NSSound soundNamed:@"MySound"];
[currentSound play];
while([currentSound isPlaying]);
}

The -isPlaying method does not return and the entire app hangs. I cannot get the delegate method sound:didFinishPlaying: to work either. The delegate method is never called.

As long as I don't check for the sound to have finished playing, it plays ok -- so the sound itself is not corrupted.

The above code works in 10.1.x. Any help appreciated.

I don't know whether it's a bug or not but why don't you use the notification sent to the delegate to be told when the sound is finished playing?

It would avoid polling and overheating the CPU.
_______________________________________________
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.

  • Prev by Date: straight-C DNS lookup with timeout?
  • Next by Date: Re: straight-C DNS lookup with timeout?
  • Previous by thread: Re: straight-C DNS lookup with timeout?
  • Next by thread: Dynamically resizing NSView
  • Index(es):
    • Date
    • Thread