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: Uli Zappe <email@hidden>
- Date: Thu, 21 Mar 2002 15:20:39 +0100
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?
Am Donnerstag den, 21. Mdrz 2002, um 07:04, schrieb Ricardo Parada:
I would say that you take a look at the main() generated in a
standard cocoa
application to see how it differs from yours.
In the openstep days I remember that in order to write a tool that used
appkit objects we had to instantiate an NSApplication or something
like that
to establish a connection with the window server and make our code
work.
While that's true in general, it would have made no sense to assume
that NS*Sound* is dependent on the Window Server, even though it's
in the AppKit.
Am Donnerstag den, 21. Mdrz 2002, um 07:11, schrieb Isaac Sherman:
I have no real idea, but isn't the sound named Submarine.aiff?
That's true, but +soundNamed: doesn't take a file or path name as
the argument, but just the sound name. Whether that's an .aiff,
.snd or .wav file, whether it's located in /Library/Sounds,
/System/Library/Sounds or ~/Library/Sounds - all that is taken care
of by this method automatically. One of the beauties of Cocoa :-)
Thanks to all who answered!
Bye
Uli
________________________________________________________
Uli Zappe email@hidden
Lorscher Stra_e 5
http://www.ritual.org
D-60489 Frankfurt Fon: +49-700-ULIZAPPE
Germany Fax: +49-700-ZAPPEFAX
________________________________________________________
_______________________________________________
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.