audio unit panners and channel map
audio unit panners and channel map
- Subject: audio unit panners and channel map
- From: Christophe Tournery <email@hidden>
- Date: Tue, 31 Mar 2009 17:03:48 +0200
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