Auval failes due to channel discrepancy between my plugin and a plugin I load inside

I have a Juce AU plugin that loads another Juce plugin of mine, a VST plugin.

When I try to perform an Auval test for my AU plugin, it fails during the first render test (1 channel).

Both the AU and the VST are configured to {1,1}, {2, 2}.

When debugging it, it seems like the test fails because the inner plugin, the VST one, thinks there should be two channels being tested, where there is only one.

It seems like the problem is related to Juce_VST_Wrapper, here's the initialization from the CTor:

         numInChans (JucePlugin_MaxNumInputChannels),
         numOutChans (JucePlugin_MaxNumOutputChannels),

It says in the comments that these should hold the maximal number of channels, and they do receive this value (2), but when I try to hardcode it to 1, it works.

Also, when I try to set my inner VST plugin to {1,1}, it also works.

I also tried to use setPlayConfigDetails to set the number of channels. but it only changes the AudioPluginInstance, and not the Juce_VST_Wrapper thus not helping.

Can someone help me understand what is wrong here?

A more intensive search in the forums and I found this post:


It seems like the author was going through the exact same thing. I'll see how this can help me.