I’m trying allow mono-to-stereo in my AAX builds, but when I do, ProTools only shows the mono-to-stereo version. I just don’t get why it doesn’t show both as options. Is this a ProTools thing? A JUCE thing? Or just me? Here is my code from isBusesLayoutSupported():
if (layouts.getMainOutputChannelSet() == AudioChannelSet::mono())
{
if (layouts.getMainInputChannelSet() == AudioChannelSet::mono())
return true;
}
else if (layouts.getMainOutputChannelSet() == AudioChannelSet::stereo())
{
if (wrapperType == wrapperType_AAX)
{
if (layouts.getMainInputChannelSet() == AudioChannelSet::stereo())
return true;
}
else
{
if ((layouts.getMainInputChannelSet() == AudioChannelSet::mono()) ||
layouts.getMainInputChannelSet() == AudioChannelSet::stereo())
return true;
}
}
return false;
Oops. Wrong code. That’s where I disabled the mono-stereo in AAX. Here is my code attempting to allow it:
if (layouts.getMainOutputChannelSet() == AudioChannelSet::mono())
{
if (layouts.getMainInputChannelSet() == AudioChannelSet::mono())
return true;
}
else if (layouts.getMainOutputChannelSet() == AudioChannelSet::stereo())
{
if ((layouts.getMainInputChannelSet() == AudioChannelSet::mono()) ||
layouts.getMainInputChannelSet() == AudioChannelSet::stereo())
return true;
}
//
return false;
Found the fix. I forgot about the AAX page tables. I had to add the mono-stereo as a new ID, and update getAAXPluginIDForMainBusConfig() to return that ID for mono-stereo.
Can you help me to understand better your approach? @HowardAntares thanks in advance.
Sure. In the XML file, I have this (for example):
<PageTableLayouts>
<Plugin manID='MyCo' prodID='MyPl' plugID='MSNa'>
<Desc>MyPlugin Mono-Stereo Native</Desc>
<Layout>AAX</Layout>
</Plugin><!--manID='MyCo' prodID='MyPl' plugID='MSNa'-->
<Plugin manID='MyCo' prodID='MyPl' plugID='StAS'>
<Desc>MyPlugin Stereo AudioSuite</Desc>
<Layout>AAX</Layout>
</Plugin><!--manID='MyCo' prodID='MyPl' plugID='StAS'-->
<Plugin manID='MyCo' prodID='MyPl' plugID='StNa'>
<Desc>MyPlugin Stereo Native</Desc>
<Layout>AAX</Layout>
</Plugin><!--manID='MyCo' prodID='MyPl' plugID='StNa'-->
<Plugin manID='MyCo' prodID='MyPl' plugID='MoAs'>
<Desc>MyPlugin Mono AudioSuite</Desc>
<Layout>AAX</Layout>
</Plugin><!--manID='MyCo' prodID='MyPl' plugID='MoAS'-->
<Plugin manID='MyCo' prodID='MyPl' plugID='MoNa'>
<Desc>MyPlugin Mono Native</Desc>
<Layout>AAX</Layout>
</Plugin><!--manID='MyCo' prodID='MyPl' plugID='MoNa'-->
And in code I have this (also for example):
int32 MyPluginAudioProcessor::getAAXPluginIDForMainBusConfig (const AudioChannelSet& mainInputLayout,
const AudioChannelSet& mainOutputLayout,
bool idForAudioSuite) const
{
if (mainInputLayout == AudioChannelSet::mono())
if (mainOutputLayout == AudioChannelSet::stereo())
return 'MSNa'; // new mono-to-stereo ID
else
return idForAudioSuite ? 'MoAS' : 'MoNa';
else // if (mainInputLayout == AudioChannelSet::stereo())
return idForAudioSuite ? 'StAS' : 'StNa';
}
Also, I had to add the code shown earlier in this thread for isBusesLayoutSupported().
Does that help?
2 Likes