Re: NSSound broken in 10.2?
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.