Hi all,
I ran into a reproducible issue with AudioUnits when combining:
-
multichannel main bus (e.g. 5.1 / 6 channels)
-
and a second input bus used as external sidechain
This works perfectly as VST3, but breaks in AU.
To isolate the problem I created a minimal test plugin (“BusCheck”) that does almost nothing:
it simply applies a gain of 0.5 to all main output channels and optionally reads the sidechain input for metering.
No DSP complexity, no routing, no latency — just bus configuration.
Observed behaviour
VST3:
Works correctly in all tested configurations.
AudioUnit:
When loading the plugin as a multichannel instance (e.g. 5.1):
-
Logic Pro:
-
UI does not open for the multichannel version
-
instead produces a strange multi-channel hum/noise
-
multi-mono version works
-
-
Studio One / Fender Studio:
-
plugin instance goes silent
-
render error in debugger:
-
ioData.mNumberBuffers=2,
ASBD::NumberChannelStreams(output.GetStreamFormat())=6;
kAudio_ParamError
render err: -50
Key observation
If I remove the sidechain bus from the constructor:
.withInput ("Sidechain", juce::AudioChannelSet::stereo(), false)
then multichannel AU works perfectly again.
So the failure only occurs when:
-
main bus = multichannel
-
AND second input bus exists
Minimal bus setup used
AudioProcessor (BusesProperties()
.withInput ("Input", juce::AudioChannelSet::stereo(), true)
.withOutput ("Output", juce::AudioChannelSet::stereo(), true)
.withInput ("Sidechain", juce::AudioChannelSet::stereo(), false)
)
isBusesLayoutSupported() allows matching multichannel layouts for main in/out and stereo sidechain.
The plugin itself just applies gain to all main channels.
Additional notes
The plugin UI correctly reports:
-
Main In: 6 channels
-
Main Out: 6 channels
-
Sidechain: 2 channels
So the layout negotiation appears to succeed.
However during AU rendering there is a mismatch between:
-
number of channel streams expected by ASBD
-
number of buffers provided by host
This results in:
kAudio_ParamError (-50)
Repro project
Minimal repro project (JUCE 8.0.12):
Questions
Is this a known limitation or bug in the AU wrapper when combining:
-
multichannel main bus
-
additional input bus?
Or is there a required configuration step I’m missing for AU specifically?
Any guidance appreciated.
Thanks!
