Phenomenon with juce based AU plugins in juce based hosts (like tracktion)

In juce based hosts, juce based AU plugins,  the first call to prepareToPlay, is always with input and output channels == 1 , then after setStateInformation(), the i/o channels will be corrected to the right number.

 

this happens only when the hosts loads a previously saved project 

 

Yes, this is common behaviour from plugin hosts. You should design your plugin with this in mind :)

I would say its very specific to Tracktion ;-) (and other Juce hosts)

Live and Logic do it better.

I think also it is not intended the way the wrapper/plugin-format was programmed (i think its a bug)

 

in addition:

some plugins (spatial processors) work different in mono/stereo/surround (and have different settings for every setup)

But the stereo-version/surround has also option, so it can work in mono, so this needs to be a reliable  information

So when the plugin is opened (again) as mono (but in the saved project file it was stereo) , internal changes will be done (channel setup), so that the plugin can work in mono.

When its  turned to stereo again, redundant changes in the channel-config will be lost.

> You should design your plugin with this in mind :)

Yes currently 90% of my developing time is care about all the different host-behavior, 10% developing the plugin itself (no joke, and i don't do weird things), i hope that juce can help to change the ratio, to have more time for developing the plugin-algorithm