Re: ClassInfo & PresentPreset confusion
Re: ClassInfo & PresentPreset confusion
- Subject: Re: ClassInfo & PresentPreset confusion
- From: Pavol Markovic <email@hidden>
- Date: Tue, 11 Oct 2005 19:59:00 +0200
On Oct 11, 2005, at 6:55 PM, Muon Software Ltd - Dave wrote:
UInt32 AUSynth::SupportedNumChannels(const AUChannelInfo** outInfo)
{
static const AUChannelInfo asChannelInfo[] = { { 0, 2 } };
if ( outInfo )
*outInfo = asChannelInfo;
return 1;
}
Is that definately right for an AU with 4 stereo outputs (but
supporting
mono and a single stereo output by fudging the buffer pointers)?
With this code my AU doesn't show in the Mono or Multichannel menus in
Logic
6.3.3. It also hangs AU Lab when trying to add the AU.
If you want to support mono also, change it to:
UInt32 AUSynth::SupportedNumChannels(const AUChannelInfo** outInfo)
{
static const AUChannelInfo asChannelInfo[] = { { 0, 1 }, { 0, 2 } };
if ( outInfo )
*outInfo = asChannelInfo;
return 2;
}
But this will allow host to set mono channel configuration on all
buses, after reading your previous mail I see you need 4 pure stereo
outputs.
So I guess overriding ValidFormat() method and do additional checking,
something like:
bool AUSynth::ValidFormat(AudioUnitScope inScope, AudioUnitElement
inElement, const CAStreamBasicDescription & inNewFormat)
{
if ( FormatIsCanonical(inNewFormat) )
{
if (Outputs().GetNumberOfElements() == 1)
{
return ( (inElement == 0) && ((inNewFormat.mChannelsPerFrame ==
1) || (inNewFormat.mChannelsPerFrame == 2)) )
}
else
{
return (inNewFormat.mChannelsPerFrame == 2)
}
}
return false;
}
If you want to support multi-bus output in Logic Pre-7, then prepare
for long workaround story. I think it was already discussed many times
here. But I'd recommend becoming more familiar with standard way the
output handling works, first.
PM
_______________________________________________
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