Confused on DefaultOutputUnit and conversions
Confused on DefaultOutputUnit and conversions
- Subject: Confused on DefaultOutputUnit and conversions
- From: Wade Williams <email@hidden>
- Date: Thu, 1 Apr 2004 13:09:52 -0600
I'm a little confused on what conversions the default output unit will
do for you. Please note I'm still a newbie with CoreAudio. :)
In looking at the PlayAudioFileLite sample code, it uses the default
output unit, yet uses an AudioConverter to make the supplied data
format match the input format of the AudioUnit.
Is that required? If so, what's the point of using the default output
unit than just using the HAL for output? It would seem to me the only
difference would be that you provide data in a render callback instead
of the IOProc. According to the documentation, using the default
output unit is supposed to make life easier, but if both methods
require an AudioConverter, I don't see a big difference.
I certainly could see a difference where you wanted to link in other
audio units and do some fancier effects. But for just straight
playback, am I missing something?
My audio data is just 16-bit, mono, PCM samples, which will have a
sample rate of 8K. Can I just hand those to the default output unit
without explicitly setting up all of its output/input parameters and
setting up an AudioConverter to make sure the data matches? Under what
conditions will the default output unit do conversions for me?
Any thoughts or instruction 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.