So I create a 7.1.2 track in Pro Tools and in prepareToPlay() I do some checking using:
AudioChannelSet channelSet = m_LastLayout.getMainOutputChannelSet();
int iNumChannels = getTotalNumOutputChannels();
for (int i = 0; i < iNumChannels; ++i)
DBG (juce::AudioChannelSet::getChannelTypeName (channelSet.getTypeOfChannel (i)));
if (iNumChannels > 2)
{
const auto iIndex = channelSet.getChannelIndexForType (juce::AudioChannelSet::centre);
const auto channelIndex = getChannelIndexInProcessBlockBuffer (false, 0, iIndex);
DBG ("centre Index: " << channelIndex);
}
prints out:
Left
Right
Centre
LFE
Left Surround Side
Right Surround Side
Left Surround Rear
Right Surround Rear
Top Side Left
Top Side Right
centre Index: 2
which is incorrect for
AAX_eStemFormat_7_1_2, {
AudioChannelSet::left,
AudioChannelSet::centre,
AudioChannelSet::right,
AudioChannelSet::leftSurroundSide,
AudioChannelSet::rightSurroundSide,
AudioChannelSet::leftSurroundRear,
AudioChannelSet::rightSurroundRear,
AudioChannelSet::LFE,
AudioChannelSet::topSideLeft,
AudioChannelSet::topSideRight }
Centre index should be 1
I see in the wrapper that rebuildChannelMapArrays() should remap the channels… but it doesn’t seem to be working.
Also if I use
AudioChannelSet set = layout.getMainOutputChannelSet();
StringArray szSpeakerArray = StringArray::fromTokens (set.getSpeakerArrangementAsString(), false);
The order is also wrong and reports L, R, C, …
Rail