Re: Default Audio Output Stream Format - 32 bit float only?
Re: Default Audio Output Stream Format - 32 bit float only?
- Subject: Re: Default Audio Output Stream Format - 32 bit float only?
- From: Bill Stewart <email@hidden>
- Date: Thu, 06 Jun 2002 16:39:13 -0700
on 6/6/02 2:40 PM, Tracy Lakin wrote:
>
Hi,
>
>
The Default Output Unit seems to be buggy about supported stream formats.
>
>
The Default Output Unit has a default stream format of 32 bit float / 44100Hz.
>
If I set it (SetProperty kAudioUnitPpoperty_StreamFormat) to 16 bit int /
>
44100Hz, it does not complain. No error. But if I immediately then get the
>
stream format, it is still at the original 32 bit float format.
There are some problems with format negotiations, etc, in 10.1 that have
since been fixed, so you're probably seeing that.
>
Also, if I create a connection between the Default Output Unit and another
>
audio unit, where the other unit has a default stream format of 16 bit int /
>
44100Hz, the output unit does not complain or return any error. I can verify
>
that the stream format of the audio unit is fetched by the output unit. Yet
>
fetching the Default Output Unit's stream format after the sucessful
>
connection still gives back the original 32 bit float / 44100Hz format.
The default output unit provides support for non-float data because it
contains an AudioConverter and will do that conversion work for you. In
Jaguar, we've further split this by also providing an AUConverter unit that
will do this in any arbitrary place in the chain...
That said (and flame away!), but at this stage, particularly on a PowerPC
and even more so with Velocity Engine, doing audio processing of *any* kind
in anything but floats seems to me an unneeded optimisation.
>
Assuming that the Default Output Unit and the Audio Unit SDK have at least the
>
basic code in common, it appears that it would have returned a
>
kAudioUnitErr_FormatNotSupported error, had the format not been supported.
They do, except that the audio units in 10.1 are based now on code that is
far older, and far less correct in this area than the current SDK
>
In playing sound, it definitely sounds like the conversion is not happening
>
from 16 bit int to 32 bit float. Should it be converted in this set up?
In 10.1, this conversion does work (the DVD Player for instance, feeds this
output unit 48K ints and the necessary SRC, etc is done). Have a look at the
AudioConverter example in the DefaultOutput code in
/Developer/Examples/CoreAudio - that code is working with the default output
unit....
>
So - do I have to feed the Default Output Unit 32 bit float data? That is, do
>
I have to use an Audio Converter in my Audio Unit to always put out 32 bit
>
float?
No, you shouldn't...
Bill
>
(Mac OS X 10.1.4)
>
>
Thanks,
>
Tracy
>
_______________________________________________
>
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.
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Thousands of years ago, cats were worshipped as gods. We have never
forgotten this."
__________________________________________________________________________
_______________________________________________
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.