Re: HAL, AU or streams?
Re: HAL, AU or streams?
- Subject: Re: HAL, AU or streams?
- From: Michael Thornburgh <email@hidden>
- Date: Tue, 4 Nov 2003 18:03:26 -0800
if your application will be "record sound to buffers and play back
sound from buffers", then i believe the HAL is the appropriate API to
use. and if you're working in objective-c, then i believe MTCoreAudio
is right up your alley.
http://aldebaran.armory.com/~zenomt/macosx/MTCoreAudio/
the sample application (AudioMonitor) that comes with MTCoreAudio
copies audio from input devices to an output devices. the
MTConversionBuffer class in that example (which is built on the
AudioConverter for sample rate conversion when needed) could be
trivially subclassed to provide a larger buffer than the default, or
slightly reworked to provide a persistent buffer.
also check out /Developer/Examples/CoreAudio/HAL/AudioThru (assuming
you have panther and installed Xcode).
there was mention on this list that, as of panther, AudioOutputUnits
can now also provide audio input, but there don't yet appear to be any
examples of doing that.
audio devices are organized into zero or more audio streams per
direction. for your purposes, streams are only important in that they
determine the layout of the AudioBufferLists sent to you at IO callback
time. audio streams aren't a different API or abstraction for dealing
with audio data.
there's tons more stuff about CoreAudio, AudioUnits, and other stuff on
the wiki:
http://www.mat.ucsb.edu:8000/CoreAudio
-mike
On Nov 4, 2003, at 1:30 PM, Wade Williams wrote:
I've been reading up on CoreAudio, and I've got some confusion in my
head around what level of the API is appropriate for me to use.
I wish to record sound into buffers, and playback sound from buffers.
Almost always, the default input and output device will be used.
At some points in reading the documentation, I feel like it's best to
access the device at the device level. Other times it appears AU's
are the way to go. Finally, streams always seem interesting, but I'm
not sure exactly where they fit in.
Can someone give me some basic guidance?
Additionally, if someone knows of a simple example that records and
plays back sound, a pointer to it would be most appreciated.
Wade
_______________________________________________
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.