Re: multichannel output AU support
Re: multichannel output AU support
- Subject: Re: multichannel output AU support
- From: Malcolm Haylock <email@hidden>
- Date: Sun, 7 Dec 2008 19:15:41 +0100
Yes I tried it with Leopard AULab and could successfully create 2 or
8 channel instances. Still no luck in Logic 8.
I tried starting from scratch and adapting the SinSynth example to
enable multichannel output without success.
Here's what I did:
* Subclass AUOutputElement to add the following functions:
static AudioChannelLayoutTag layoutTags[] =
{kAudioChannelLayoutTag_Stereo, kAudioChannelLayoutTag_AudioUnit_8};
UInt32 VSAUOutputElement::GetChannelLayoutTags (AudioChannelLayoutTag
*outLayoutTagsPtr){
if(outLayoutTagsPtr)
memcpy(outLayoutTagsPtr, layoutTags, sizeof(layoutTags));
return sizeof(layoutTags)/sizeof(AudioChannelLayoutTag);
}
UInt32 VSAUOutputElement::GetAudioChannelLayout (AudioChannelLayout
*outMapPtr, Boolean &outWritable){
if(NumberChannels()==2)
layout.mChannelLayoutTag=kAudioChannelLayoutTag_Stereo;
else
layout.mChannelLayoutTag=kAudioChannelLayoutTag_AudioUnit_8;
layout.mChannelBitmap=0;
layout.mNumberChannelDescriptions=0;
if(outMapPtr)*outMapPtr=layout;
outWritable=false;
return sizeof(layout);
}
* Overide CreateElement() in SinSynth to create the above subclassed
output element:
AUElement* SinSynth::CreateElement(AudioUnitScope scope,
AudioUnitElement element){
if (scope == kAudioUnitScope_Output && element == 0)
return new VSAUOutputElement (this);
else
return AUMonotimbralInstrumentBase::CreateElement (scope, element);
}
* Overide SupportedNumChannels() in SinSynth:
UInt32 SinSynth::SupportedNumChannels(const AUChannelInfo** ppArray)
{
static const AUChannelInfo asChannelInfo[]={ {0,2},{ 0, 8 } };
if (ppArray) *ppArray=asChannelInfo;
return 2;
}
There's obviously something I'm still missing to enable multichannel
output in Logic 8 but I have no idea what. Any help would be greatly
appreciated.
Thanks,
Malcolm Haylock
On 06/12/2008, at 12:40 AM, William Stewart wrote:
Did you try this with AULab as I suggested?
On Dec 5, 2008, at 2:30 PM, Malcolm Haylock wrote:
Thanks Bill,
I'm building with Xcode 2.4.1 under 10.4.11. I'd rather not
upgrade to all the Leopard AU code, if possible, as there is quite
a bit of legacy code in my project.
The Leopard auval gives a more complete picture, but still it
won't appear as a multi channel AU in Logic 8. I've tried
rescanning the plugin.
--------------------------------------------------
FORMAT TESTS:
Reported Channel Capabilities (explicit):
[0, 2] [0, 8]
No Input, Output Chans:
0-1 0-2 0-4 0-5 0-6 0-7 0-8
X X
# # AudioChannelLayouts (2), Output Scope:
ChannelLayout is Writable: F
The Unit publishes the following Channel Layouts:
0x650002, 0x6F0008,
Is Audio Channel Layout Available:
Mono Stereo Binau. AU_4 Ambi. AU_5 AU_5_0 AU_6
AU_6_0 AU_7_0 AU_7_0F AU_8 AU_5_1 AU_6_1 AU_7_1 AU_7_1F
X
X
* * PASS
--------------------------------------------------
Anything else I might be missing?
Malcolm Haylock
On 05/12/2008, at 9:51 PM, William Stewart wrote:
if you aren't seeing a full list of 0-2... 0-8 print out, then
you aren't on the most recent auval - it should be printing this
unconditionally (whether the au does this or not):
No Input, Output Chans:
0-1 0-2 0-4 0-5 0-6 0-7 0-8
X
So, are you on Leopard or Tiger? You will need to be on Leopard.
You should also try your AU using AULab - make a document which
has an 8 channel output bus, so AULab will show your AU's
multichannel capabilities
Bill
On Dec 5, 2008, at 12:44 PM, Malcolm Haylock wrote:
Dear All,
I've read many previous posts but am still having trouble
getting my music device AU to show as a multi-channel output AU
in Logic 8 (Logic 7 was fine).
Here's what I've done:
- subclass AUOutputElement to support GetChannelLayoutTags() and
GetAudioChannelLayout()
- overide CreateElement() in my AU to create my subclassed output
Here's part of the output of auval:
--------------------------------------------------
FORMAT TESTS:
Reported Channel Capabilities (explicit):
[0, 2] [0, 8]
No Input, Output Chans:
0-2
X
# # AudioChannelLayouts (2), Output Scope:
ChannelLayout is Writable: F
The Unit publishes the following Channel Layouts:
0x650002, 0x6F0008,
Is Audio Channel Layout Available:
Mono Stereo Binau. AU_4 Ambi. AU_5 AU_5_0 AU_6
AU_6_0 AU_7_0 AU_7_0F AU_8 AU_5_1 AU_6_1 AU_7_1 AU_7_1F
X
X
* * PASS
--------------------------------------------------
It looks like the channel layouts are being correctly reported
by my subclassed output element.
But despite SupportedNumChannels() correctly reporting 0-2 and
0-8 channels, auval is still only reporting 0-2 channels.
What am I missing?
Thanks,
Malcolm Haylock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
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