Re: SupportedNumChannels
Re: SupportedNumChannels
- Subject: Re: SupportedNumChannels
- From: "Sophia Poirier [dfx]" <email@hidden>
- Date: Thu, 7 Sep 2006 12:22:35 -0400
On Sep 7, 2006, at 12:09 PM, Christian Luther wrote:
Hi!
As a beginning in developing AU Plugins I wrote a litte PlugIn that
lets you pan the two channels of a Stereo signal individually, like
Protools channel strips do. After lots of trouble writing a
modified version of the AUEffectBase class it works quite fine for
the moment. But I have a problem telling the host or auval, that
this Plugin only works with exactly 2 inputs and exactly two
outputs. auval says it supports 1-1, 2-2, 4-4, 5-5, 6-6 and 8-8.
According to the AudioUnit Programming guide, the
kAudioUnitProperty_SupportedNumChannels tells the host, which
channel configurations are supported. So I integrated this one in
the GetProperty Method:
case kAudioUnitProperty_SupportedNumChannels:
((AUChannelInfo*)outData)->inChannels = 2;
((AUChannelInfo*)outData)->outChannels = 2;
return noErr;
This should be telling the host, that my plugin supports exactly
two inputs and exactly two outputs. Well, auval still shows the
above configurations and Logic also offers my plugin as a mono-
>mono effect.
So what is the right way to make clear, that this is a 2-2 effect?
IS there something wrong with my handling of the property request?
Yes. Because AUBase::DispatchGetProperty() intercepts and handles
that property before it gets propagated to any GetProperty() method
(s). You want to override AUBase's SupportedNumChannels() method.
Something like this:
UInt32 YourEffect::SupportedNumChannels(const AUChannelInfo **
outChannelInfo)
{
static AUChannelInfo plugChannelInfo = {2, 2};
if (outChannelInfo != NULL)
*outChannelInfo = &plugChannelInfo;
return 1;
}
Sophia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden