Audacity 3.2.0
Functions
anonymous_namespace{VST3Instance.cpp} Namespace Reference

Functions

unsigned CountChannels (Steinberg::Vst::IComponent *component, const Steinberg::Vst::MediaTypes mediaType, const Steinberg::Vst::BusDirection busDirection, const Steinberg::Vst::BusType busType)
 

Function Documentation

◆ CountChannels()

unsigned anonymous_namespace{VST3Instance.cpp}::CountChannels ( Steinberg::Vst::IComponent *  component,
const Steinberg::Vst::MediaTypes  mediaType,
const Steinberg::Vst::BusDirection  busDirection,
const Steinberg::Vst::BusType  busType 
)

Definition at line 12 of file VST3Instance.cpp.

16 {
17 using namespace Steinberg;
18
19 unsigned channelsCount{0};
20
21 const auto busCount = component->getBusCount(mediaType, busDirection);
22 for(auto i = 0; i < busCount; ++i)
23 {
24 Vst::BusInfo busInfo;
25 if(component->getBusInfo(mediaType, busDirection, i, busInfo) == kResultOk)
26 {
27 if(busInfo.busType == busType)
28 channelsCount += busInfo.channelCount;
29 }
30 }
31 return channelsCount;
32 }

Referenced by VST3Instance::GetAudioInCount(), and VST3Instance::GetAudioOutCount().

Here is the caller graph for this function: