#include <juce_PluginBusUtilities.h>
Classes | |
struct | BusLayoutDetails |
class | ScopedBusRestorer |
Public Types | |
enum | { kDefaultMaxChannels = 64 } |
typedef Array< AudioProcessor::AudioProcessorBus > | AudioBusArray |
Public Member Functions | |
PluginBusUtilities (AudioProcessor &plugin, bool markDiscreteLayoutsAsSupported, int maxProbeChannels=kDefaultMaxChannels) | |
bool | busCanBeDisabled (bool inp, int bus) const noexcept |
bool | busIgnoresLayout (bool inp, int bus) const noexcept |
bool | checkBusFormatsAreNotDiscrete () const |
void | enableAllBuses () |
int | findMaxNumberOfChannelsForBus (bool isInput, int busNr, int upperlimit=std::numeric_limits< int >::max()) |
int | findTotalNumChannels (bool isInput, int busOffset=0) const noexcept |
int | getBusCount (bool inputBus) const noexcept |
int | getBusIdxForChannelIdx (bool isInput, int channelIdx, int &totalChannels, int startBusIdx) |
int | getBusIdxForChannelIdx (bool isInput, int channelIdx) |
AudioChannelSet | getChannelSet (bool inp, int bus) noexcept |
const AudioChannelSet & | getDefaultLayoutForBus (bool isInput, int busIdx) const noexcept |
AudioChannelSet | getDefaultLayoutForChannelNumAndBus (bool isInput, int busIdx, int channelNum) const noexcept |
AudioBusArray & | getFilterBus (bool inputBus) noexcept |
const AudioBusArray & | getFilterBus (bool inputBus) const noexcept |
int | getNumChannels (bool inp, int bus) const noexcept |
int | getNumEnabledBuses (bool inputBus) const noexcept |
bool | hasDynamicInBuses () const noexcept |
bool | hasDynamicOutBuses () const noexcept |
bool | hasInputs (int bus) const noexcept |
bool | hasOutputs (int bus) const noexcept |
void | init () |
bool | isBusEnabled (bool inputBus, int bus) const noexcept |
bool | isBusEnabledByDefault (bool inp, int bus) const noexcept |
void | restoreBusArrangement (const AudioProcessor::AudioBusArrangement &original) const |
Public Attributes | |
AudioProcessor & | processor |
Private Types | |
enum | { maxNumChannelsOfNonDiscreteLayouts = 8, pseudoChannelBitNum = 90, insaneNumberOfChannels = 512 } |
Private Member Functions | |
void | addLayoutDetails (bool isInput, int busNr) |
bool | busIgnoresLayoutForChannelNum (bool isInput, int busNr, int channelNum) |
bool | checkBusFormatsAreNotDiscrete (bool isInput) const |
void | clear (int inputCount, int outputCount) |
bool | doesPlugInHaveDynamicBuses (bool isInput) const |
BusLayoutDetails & | getBusLayoutDetails (bool isInput, int busNr) noexcept |
const BusLayoutDetails & | getBusLayoutDetails (bool isInput, int busNr) const noexcept |
Array< BusLayoutDetails > & | getLayoutDetails (bool isInput) noexcept |
const Array< BusLayoutDetails > & | getLayoutDetails (bool isInput) const noexcept |
void | populateLayoutDetails () |
void | updateDefaultLayout (bool isInput, int busIdx) |
Static Private Member Functions | |
static Array< AudioChannelSet > | layoutListCompatibleWithChannelCount (const int channelCount) noexcept |
Private Attributes | |
bool | dynamicInBuses |
bool | dynamicOutBuses |
Array< BusLayoutDetails > | inputLayouts |
int | maxChannelsToProbe |
Array< BusLayoutDetails > | outputLayouts |
bool | plugInFormatSupportsDiscreteLayouts |
Friends | |
class | ScopedBusRestorer |
|
private |
|
inline |
|
inlineprivate |
References PluginBusUtilities::BusLayoutDetails::busIgnoresLayout, busIgnoresLayoutForChannelNum(), PluginBusUtilities::BusLayoutDetails::canBeDisabled, getBusLayoutDetails(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), layoutListCompatibleWithChannelCount(), maxNumChannelsOfNonDiscreteLayouts, AudioProcessor::setPreferredBusArrangement(), and Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
Referenced by populateLayoutDetails().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprivate |
References pseudoChannelBitNum, and AudioProcessor::setPreferredBusArrangement().
Referenced by addLayoutDetails().
|
inline |
|
inlineprivate |
References AudioProcessor::busArrangement, AudioProcessor::AudioProcessorBus::channels, getBusCount(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), AudioProcessor::AudioBusArrangement::inputBuses, AudioChannelSet::isDiscreteLayout(), and AudioProcessor::AudioBusArrangement::outputBuses.
|
inlineprivate |
References PluginBusUtilities::BusLayoutDetails::canBeDisabled, getBusCount(), and getBusLayoutDetails().
Referenced by populateLayoutDetails().
|
inline |
|
inline |
References AudioChannelSet::discreteChannels(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), insaneNumberOfChannels, juce::jmax(), juce::jmin(), layoutListCompatibleWithChannelCount(), maxChannelsToProbe, maxNumChannelsOfNonDiscreteLayouts, plugInFormatSupportsDiscreteLayouts, processor, AudioProcessor::setPreferredBusArrangement(), and Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
Referenced by updateDefaultLayout().
|
inlinenoexcept |
References AudioProcessor::AudioProcessorBus::channels, getFilterBus(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), AudioChannelSet::size(), and Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
Referenced by AudioUnitHelpers::ChannelRemapper::initializeChannelMapArray().
|
inlinenoexcept |
References getFilterBus(), and Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
Referenced by checkBusFormatsAreNotDiscrete(), doesPlugInHaveDynamicBuses(), enableAllBuses(), getBusIdxForChannelIdx(), getChannelSet(), getDefaultLayoutForChannelNumAndBus(), getNumChannels(), getNumEnabledBuses(), populateLayoutDetails(), and restoreBusArrangement().
|
inline |
References getBusCount(), and getNumChannels().
Referenced by getBusIdxForChannelIdx().
References getBusIdxForChannelIdx().
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
References getLayoutDetails().
|
inlinenoexcept |
References AudioProcessor::AudioProcessorBus::channels, getBusCount(), getFilterBus(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), and juce::isPositiveAndBelow().
Referenced by enableAllBuses(), AudioUnitHelpers::ChannelRemapper::fillLayoutChannelMaps(), and populateLayoutDetails().
|
inlinenoexcept |
References PluginBusUtilities::BusLayoutDetails::defaultLayout, and getBusLayoutDetails().
Referenced by enableAllBuses().
|
inlinenoexcept |
References PluginBusUtilities::BusLayoutDetails::defaultLayout, AudioChannelSet::disabled(), AudioChannelSet::discreteChannels(), getBusCount(), getBusLayoutDetails(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), AudioChannelSet::isDiscreteLayout(), layoutListCompatibleWithChannelCount(), plugInFormatSupportsDiscreteLayouts, processor, AudioProcessor::setPreferredBusArrangement(), AudioChannelSet::size(), and Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size().
Referenced by AudioUnitHelpers::getAUChannelInfo(), and updateDefaultLayout().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineprivatenoexcept |
References inputLayouts, and outputLayouts.
Referenced by busCanBeDisabled(), busIgnoresLayout(), getBusLayoutDetails(), and isBusEnabledByDefault().
|
inlineprivatenoexcept |
References inputLayouts, and outputLayouts.
References AudioProcessor::AudioProcessorBus::channels, getBusCount(), getFilterBus(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), juce::isPositiveAndBelow(), and AudioChannelSet::size().
Referenced by AudioUnitHelpers::getAUChannelInfo(), getBusIdxForChannelIdx(), AudioUnitHelpers::ChannelRemapper::initializeChannelMapArray(), and isBusEnabled().
|
inlinenoexcept |
References getBusCount(), and isBusEnabled().
Referenced by AudioUnitHelpers::getAUChannelInfo().
|
inlinenoexcept |
References dynamicInBuses.
|
inlinenoexcept |
References dynamicOutBuses.
|
inlinenoexcept |
References isBusEnabled().
Referenced by updateDefaultLayout().
|
inlinenoexcept |
References isBusEnabled().
Referenced by updateDefaultLayout().
|
inline |
References populateLayoutDetails().
|
inlinenoexcept |
References getNumChannels().
Referenced by getNumEnabledBuses(), hasInputs(), and hasOutputs().
|
inlinenoexcept |
|
inlinestaticprivatenoexcept |
References Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::add(), AudioChannelSet::ambisonic(), AudioChannelSet::create5point0(), AudioChannelSet::create5point1(), AudioChannelSet::create6point0(), AudioChannelSet::create6point0Music(), AudioChannelSet::create6point1(), AudioChannelSet::create7point0(), AudioChannelSet::create7point1(), AudioChannelSet::create7point1AC3(), AudioChannelSet::createFront7point1(), AudioChannelSet::createLCR(), AudioChannelSet::createLCRS(), AudioChannelSet::createLRS(), AudioChannelSet::hexagonal(), jassert, JUCE_DECLARE_NON_COPYABLE, AudioChannelSet::mono(), AudioChannelSet::octagonal(), AudioChannelSet::pentagonal(), AudioChannelSet::quadraphonic(), and AudioChannelSet::stereo().
Referenced by addLayoutDetails(), findMaxNumberOfChannelsForBus(), getDefaultLayoutForChannelNumAndBus(), and updateDefaultLayout().
|
inlineprivate |
References addLayoutDetails(), clear(), PluginBusUtilities::BusLayoutDetails::defaultLayout, doesPlugInHaveDynamicBuses(), getBusCount(), getBusLayoutDetails(), getChannelSet(), and updateDefaultLayout().
Referenced by init().
|
inline |
|
inlineprivate |
References PluginBusUtilities::BusLayoutDetails::defaultLayout, AudioChannelSet::discreteChannels(), findMaxNumberOfChannelsForBus(), getBusLayoutDetails(), getDefaultLayoutForChannelNumAndBus(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getReference(), hasInputs(), hasOutputs(), AudioChannelSet::isDiscreteLayout(), PluginBusUtilities::BusLayoutDetails::isEnabledByDefault, jassert, jassertfalse, layoutListCompatibleWithChannelCount(), AudioProcessor::setPreferredBusArrangement(), AudioChannelSet::size(), Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::size(), and AudioChannelSet::stereo().
Referenced by populateLayoutDetails().
|
friend |
|
private |
Referenced by hasDynamicInBuses().
|
private |
Referenced by hasDynamicOutBuses().
|
private |
Referenced by getLayoutDetails().
|
private |
Referenced by findMaxNumberOfChannelsForBus().
|
private |
Referenced by getLayoutDetails().
|
private |
Referenced by findMaxNumberOfChannelsForBus(), and getDefaultLayoutForChannelNumAndBus().
AudioProcessor& PluginBusUtilities::processor |