• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: HAL, AU or streams?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HAL, AU or streams?


  • Subject: Re: HAL, AU or streams?
  • From: Daniel Todd Currie <email@hidden>
  • Date: Wed, 5 Nov 2003 02:16:37 -0800

I found this page particularly useful, though it only covers audio input...

http://www.mat.ucsb.edu:8000/CoreAudio/13

I only know objective-c, yet I found many of the objective-c options (MTCoreAudio, PortAudio, SndKit) to be difficult (buggy?) to use. Straight CoreAudio is not that difficult, once you get past the initial confusion. And I agree with Michael; it sounds to me like HAL is the way to go.


On 2003 Nov 04, at 18:03, Michael Thornburgh wrote:

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.
_______________________________________________
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.

References: 
 >HAL, AU or streams? (From: Wade Williams <email@hidden>)
 >Re: HAL, AU or streams? (From: Michael Thornburgh <email@hidden>)

  • Prev by Date: Re: Setting buffer size?
  • Next by Date: HAL Device question
  • Previous by thread: Re: HAL, AU or streams?
  • Next by thread: MusicEventIteratorGetEventInfo solved, I think?
  • Index(es):
    • Date
    • Thread