AAX wrapper: maxAuxBuses limited to 16?

Hello all. I’m working on multi-bus support for our upcoming plugin, and I’ve been asked for it to have 32 stereo output buses. Some hosts struggle with this, but my current focus is Pro Tools and it seems that it should be possible since Kontakt exposes 32 stereo outputs without a problem (see attached image).

However, my test plugin only exposes 16 outputs. After a bit of searching, this seems to be due to a hardcoded limit in the JUCE AAX wrapper. Is there any reason for this? Is there any chance the limit could be lifted?

The limit seems to date back to the initial multibus commit, but there doesn’t seem to be a specific reason given for that number. According to the docs for IComponentDescriptor, Pro Tools only supports up to a total of 256 output channels, so perhaps it would be better to sum the channel counts across all buses, and to disable any bus that would attempt to add a 257th output channel.

That sounds like it would be the right approach if it conforms to the spec! Do let us know if this might make it into the roadmap.

Note: we made a prototype where we raised the limit to 32 and it worked. However, we found that there’s a second magic number that needs to be changed.

On line 2539 there’s a magic number 15 which appears to just be 16 - 1, so it had to be raised to 31. Of course, the best way to do this is to extract a variable const int maxAuxBusesLimit = 32 and to use this in both locations.