Hello,
I have the following code for my isBusesLayoutSupported- essentially I want to enforce a first order ambisonic input, and allow for only certain sizes of output for the main output bus. I also have four aux buses that I am enforcing be stereo.
bool MV360AudioProcessor::isBusesLayoutSupported(const BusesLayout& layouts) const
{
const int mainOutputBusesChannelNum = layouts.getMainOutputChannels();
const int outputBusCount = static_cast<int>(layouts.outputBuses.size());
const auto& requestedMainIn = layouts.getMainInputChannelSet();
if (requestedMainIn.isDisabled() || requestedMainIn != juce::AudioChannelSet::ambisonic(1))
return false;
// Only allow main output widths 2, 6, 8, 10, or 12.
const bool isMainOutputSupported =
(mainOutputBusesChannelNum == 2
|| mainOutputBusesChannelNum == 6
|| mainOutputBusesChannelNum == 8
|| mainOutputBusesChannelNum == 10
|| mainOutputBusesChannelNum == 12);
if (!isMainOutputSupported)
return false;
// Hosts may temporarily disable aux buses during layout probing.
for (int outputBusIndex = 1; outputBusIndex < outputBusCount; ++outputBusIndex)
{
const auto& outputSet = layouts.getChannelSet(false, outputBusIndex);
if (!outputSet.isDisabled() && outputSet != juce::AudioChannelSet::stereo())
return false;
}
return true;
}
I have an issue however when trying to instance my plugin in Reaper, that it does enforce 4 channel input in, BUT does not allow for my main bus input to be anything larger than 2 channels wide. Even when I request in the routing matrix to increase bus size to 6/8/10 or 12. However, if I only limit my main output bus sizes to be 6/8/10/12, I do not have this problem, and I am able to resize my output bus to 6/8/10/12. I also find that if I allow all input sizes, not just four wide for first order ambisonic, I do not have this issue.
TLDR- Why does it seem like limiting input channel set enforces stereo output as my main bus, even when I allow for other valid sizes for my main bus?
