input-block buffer channel count is 2 and
and getChannelCountOfBus(true,1) returns 0 in processBlock
if sidechain is on
input-block buffer channel count is 4 and
and getChannelCountOfBus(true,1) returns 2 in processBlock
so far so good, but
when I turn sidechain on (assign another output to the sidechain input in the bitwig-GUI) Bitwig doesn’t call prepareToPlay(), so I have no chance to prepare my buffers.
Shouldn’t prepareToPlay be called when the channel configuration has changed?
Could this be a bug in Bitwig or in the JUCE VST3-wrapper?
According to the VST3 spec, buses are only supposed to be enabled/disabled while the plugin is in a deactivated state. Normally, activating the plugin triggers the prepareToPlay call, so prepareToPlay will always be called after changing the bus configuration in a well-behaved host.
The last time I checked (Bitwig 4.1.6), the host was changing the bus configuration while the plugin was already activated, which is a misuse of the VST3 API. I reported the issue to Bitwig, so they’re aware of the problem.