Re: Starting with coreaudio API (beginner)
Re: Starting with coreaudio API (beginner)
- Subject: Re: Starting with coreaudio API (beginner)
- From: William Stewart <email@hidden>
- Date: Mon, 17 Oct 2005 10:12:01 -0700
We distribute an SDK of example code and documentation. It is
installed in:
/Developer/Examples/CoreAudio
and we have updates available at: http://developer.apple.com/audio
The AUFilePlayer that Jens describes below can be seen in action in
this SDK - there's a new directory we added recently of Simple
examples to get people started - one of these is a PlayFile example
Bill
On 15/10/2005, at 11:11 PM, Jens Alfke wrote:
On 15 Oct '05, at 8:22 AM, Jacob Ashcroft wrote:
All I've done so far is use sysbeep. I would like to use some wav
files I've got, I've skimmed throught the documentation on the
Core Audio API though don't really know where to start.
If you just want to play some short sounds, you can do that easily
with the NSSound class:
NSSound *sound = [[NSSound alloc] initWithContentsOfFile: @"/Path/
To/File.wav"
byReference: YES];
[sound play];
[sound release];
If you want to do more, download the CA SDK. The "PublicUtility"
folder contains a bunch of useful utility classes / sample code
that you can build and tinker with. In particular, the
CAAudioFilePlayer class will play arbitrarily long sound files of
most any format, using a secondary thread for buffering. This was
really helpful to me.
In Tiger there's also a new AUAudioFilePlayer audio unit. It looks
very powerful, but I haven't tried it out yet. The only
documentation seems to be a large block comment at the bottom of
AudioUnitProperties.h.
--Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden