Bus handling (hosting side)

I am working on the host side of the SDK, and I am curious how the host is supposed to manage the audio busses.

Let’s say I have an instrument that creates a k30Cine ( L + R + C) audio output (using addAudioOutput() in the setupProcessing callback).

Then there is an effect that is just stereo.

How does the host “connect” the instrument to the effect? From the API on the host side (IComponent::getBusInfo) it looks like you only get a “channelCount” and the notion of what is L vs R vs C is lost.

Also how does the host manage the various kinds of busses (main vs aux). In the examples I could find in the SDK (like in processdata.cpp) the BusInfo::busType is ignored.

And the final question would be about what that means for ProcessData which is the data that is being sent to the plugin to process the batch. I see only inputs/numInputs and outputs/numOutputs. So how is the plugin supposed to know what is what (main vs aux)?


The host can decide for its own how it want to handle this connection. But obviously for the one use case you describe I would connect the LRC Instrument to the LR Effect so that the L output of the instrument is passed to the L input of the effect and the R output of the instrument to the R input of the effect and passthrough C to the next effect in the chain.
The host gets the speaker arrangement by asking via IAudioEffect::getSpeakerArrangement. Please read it up here. There you also should find the answers to the rest of your questions.

Thank you for the clarification. What about RoutingInfo? I saw it at some point when I was browsing the code. I don’t think it is mentioned in the documentation so I am not sure when or how a host should use it.

See Complex Plug-in Structures / Multi-timbral Instruments - VST 3 Developer Portal