Re: Playing sounds without QT
Re: Playing sounds without QT
- Subject: Re: Playing sounds without QT
- From: Lieven Dekeyser <email@hidden>
- Date: Tue, 13 Nov 2001 17:40:38 +0100 (CET)
>
Hi there.
>
>
I was wondering wether there is a way to make OS X.1 play some .aiff
>
samples I load.
>
After having loaded the file with an NSOpenPanel call, I do this kinda thing
>
>
file = [NSFileHandle fileHandleForReadingAtPath:filename];
>
>
Now, is there a way using NSSound (not Quicktime) or similar to play the
>
sound in memory just giving as arguments the poiter to it (file, in this
>
case) ?
>
>
Thank you in advance.
you might wanna take a look at CoreAudio.
Brian Barnes has made a nice example which plays aiff files. It's carbon,
but you can copy most of it to your cocoa app if you want to.
You can find it @
http://www.idevgames.com/fileshow.php3?showid=225
greetz,
--Lieven