Re: Asynchronous Audio Again
Re: Asynchronous Audio Again
- Subject: Re: Asynchronous Audio Again
- From: Luke Bellandi <email@hidden>
- Date: Mon, 5 Apr 2004 10:02:02 -0700
NSSound *only* works asynchronously: no need to create separate threads
in your app. It's also smart enough to retain itself until it's done
playing, so you can initialize an NSSound object, start it playing, and
release it before it's done playing and it does the right thing (i.e.,
you won't crash your app by deallocating the memory used for playback.)
Clients can find out when the sound is done playing by setting a
delegate and implementing - sound:didFinishPlaying: in that delegate.
- Luke
On Apr 1, 2004, at 7:03 PM, Roger Eastman wrote:
I tried NSSound. It did not used to do sound channels like SndPlay et
al. I received an e-mail saying that NSSound has been updated to do
asynchronous sound, though. I will check it out. Thanks.
Roger Eastman
On Apr 1, 2004, at 12:00 AM, Markus Hitter wrote:
Am 01.04.2004 um 03:37 schrieb Roger Eastman:
I was hoping that there would be a simple function similar to the
old SndPlay function in MacOS 9.x with a flag to turn on
asynchronous sound.
What's about NSSound? Should be a matter of one or two lines to get
your sound playing.
The NSSound class provides a simple interface for loading and
playing AIFF, WAV, and NeXT .snd files. NSSound supports 16-bit,
mono and stereo, 44.1KHz and 22.05KHz data.
Didn't test wether it allows to play asynchonously. If not, put it in
its own thread. One additional line of code.
For even more functionality, there is NSMovieView which basically
supports everything QuickTime does.
Cheers,
Markus
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.