Re: StreamFormat vs NumChannels
Re: StreamFormat vs NumChannels
- Subject: Re: StreamFormat vs NumChannels
- From: Marc Poirier <email@hidden>
- Date: Sat, 28 Sep 2002 18:23:46 +0200 (CEST)
>
Should an AudioUnit indicate the number of supported channels in
>
response to both
>
kAudioUnitProperty_SupportedNumChannels (in AUChannelInfo)
>
--and--
>
kAudioUnitProperty_StreamFormat (in the mChannelsPerFrame member of
>
AudioStreamBasicDescription)?
If you look at the property dispatcher in AUBase, you'll see that
_StreamFormat triggers either GetStreamFormat (for GetProperty) or
SetStreamFormat (for SetProperty). GetStreamFormat just returns what the
current format is (you needn't worry about overriding that, I would
think), but SetStreamFormat is a place where you can accept or reject
formats. So yeah, I guess there is a little redundancy here because
SupportedNumChannels is one way to say what you can do and rejecting an
i/o configuration during SetStreamFormat (or during ValidFormat) is
another way. But I guess SupportedNumChannels is a way to tell the host
"don't even try anything aside from these" so hopefully you could assume
that overriding SetStreamFormat to reject other configs would not be
necessary (please correct me if I'm wrong, those of you who know all).
Perhaps the AUBase implementation of SetStreamFormat should call
SupportedNumChannels and reject non-compliant i/o configs? I don't know,
maybe it's not necessary unless dealing with a dumb host...
>
I'm not clear on this... AudioUnitHosting and Logic both seem to give
>
precedence to the SupportedNumChannels property if it's there, which
>
jives with how I interpret the docs, but it's a little ambiguous. (I'm
>
thinking maybe I don't grok the whole StreamFormat negotiation since
>
I'm a spoiled VST Dev :))
Spoiled?!? Feh, this is one of the things I really hate about VST, that
it can't really do basically any i/o configuration. I really love this
aspect of AU. :)
Marc
_______________________________________________
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.