Re: Does NSSound not work in a Unix tool?
Re: Does NSSound not work in a Unix tool?
- Subject: Re: Does NSSound not work in a Unix tool?
- From: Shawn Erickson <email@hidden>
- Date: Thu, 21 Mar 2002 06:51:09 -0800
On Thursday, March 21, 2002, at 06:20 AM, Uli Zappe wrote:
Am Donnerstag den, 21. Mdrz 2002, um 07:35, schrieb Andrew Pinski:
Because you are not waiting for the sound to finish playing.
You're right, that's it!
[[NSSound soundNamed:@"Submarine"] play];
sleep(3);
works. :-)
Only remaining question: Do you happen to know of a more elegant method
than sleep() to wait for the (actual) time when the sound is finished?
From NSSound online docs...
Methods Implemented By the Delegate
sound:didFinishPlaying:
- (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)aBool
This delegate method is called when sound playback has completed.
_______________________________________________
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.