Re: audio unit panners and channel map
Re: audio unit panners and channel map
- Subject: Re: audio unit panners and channel map
- From: William Stewart <email@hidden>
- Date: Tue, 31 Mar 2009 13:00:40 -0700
You can leave the AUBase implementation as it is and implement this in
your element subclass, or you can over-ride the AUBase implementation
completely.
The reason the implementation is in the element is that input and
outputs can have different channel layouts, and just like the format,
they describe the channel ordering for a particular element
Bill
On Mar 31, 2009, at 8:03 AM, Christophe Tournery wrote:
Hi all,
I am working on an audio unit panner for rendering stereo to N
channels. The unit is currently working, but I don't support channel
maps yet, i.e. the output map is what my algorithm uses internally.
Question:
What is the best way to support output channels maps?
Let's focus on 5.1 output here.
The problem I see right now is that the output format of my
algorithm follows kAudioChannelLayoutTag_MPEG_5_1_A (L R C LFE Ls
Rs). When loading my unit in AU Lab, the default channel map shown
in the GUI is: Ls L C Rs R LFE. And the audio output is (not
surprisingly) the one I use internally, i.e. MPGEG_5_1_A.
Since I derive from AUBase, I also override GetChannelLayoutTags()
to return the MPEG_5_1_A tag as the only one supported. Everything
seems to work, until AUBase::SetAudioChannelLayout() gets called,
which at the very end calls:
return ioEl->SetAudioChannelLayout(*inLayout);
However this function does nothing and only returns
kAudioUnitErr_InvalidProperty;
Does that mean I have to subclass AUOutputElement and override
SetAudioChannelLayout()? I don't quite see how to do that and this
seems overly complicated for my task.
Ideally I would support a few layout tags, advertise those with
GetChannelLayoutTags(), let the host decide on which tag to use, and
once the host tells the unit which one we can agree on, set my
internal algorithm to output that format.
Any suggestion?
Thanks a lot in advance,
Christophe Tournery
_______________________________________________
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
_______________________________________________
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