JUCE
|
Represents a set of audio channel types. More...
Public Types | |
enum | ChannelType { unknown = 0, left = 1, right = 2, centre = 3, subbass = 4, leftSurround = 5, rightSurround = 6, leftCentre = 7, rightCentre = 8, surround = 9, leftSurroundDirect = 10, rightSurroundDirect = 11, topMiddle = 12, topFrontLeft = 13, topFrontCentre = 14, topFrontRight = 15, topRearLeft = 16, topRearCentre = 17, topRearRight = 18, subbass2 = 19, leftRearSurround = 20, rightRearSurround = 21, wideLeft = 22, wideRight = 23, ambisonicW = 24, ambisonicX = 25, ambisonicY = 26, ambisonicZ = 27, discreteChannel0 = 64 } |
Represents different audio channel types. More... | |
Public Member Functions | |
AudioChannelSet () noexcept | |
Creates an empty channel set. More... | |
void | addChannel (ChannelType newChannelType) |
Adds a channel to the set. More... | |
int | size () const noexcept |
Returns the number of channels in the set. More... | |
bool | isDisabled () const noexcept |
Returns the number of channels in the set. More... | |
Array< ChannelType > | getChannelTypes () const |
Returns an array of all the types in this channel set. More... | |
ChannelType | getTypeOfChannel (int channelIndex) const noexcept |
Returns the type of one of the channels in the set, by index. More... | |
int | getChannelIndexForType (ChannelType type) const noexcept |
Returns the index for a particular channel-type. More... | |
String | getSpeakerArrangementAsString () const |
Returns a string containing a whitespace-separated list of speaker types corresponding to each channel. More... | |
String | getDescription () const |
Returns the description of the current layout. More... | |
bool | isDiscreteLayout () const noexcept |
Returns if this is a channel layout made-up of discrete channels. More... | |
bool | operator== (const AudioChannelSet &) const noexcept |
bool | operator!= (const AudioChannelSet &) const noexcept |
bool | operator< (const AudioChannelSet &) const noexcept |
Static Public Member Functions | |
static AudioChannelSet | disabled () |
Creates a zero-channel set which can be used to indicate that a bus is disabled. More... | |
static AudioChannelSet | mono () |
Creates a one-channel mono set. More... | |
static AudioChannelSet | stereo () |
Creates a set containing a left and right channel. More... | |
static AudioChannelSet | createLCR () |
Creates a set containing a left, right and centre channels. More... | |
static AudioChannelSet | createLRS () |
Creates a set containing a left, right and centre channels. More... | |
static AudioChannelSet | createLCRS () |
Creates a set containing a left, right, centre and surround channels. More... | |
static AudioChannelSet | quadraphonic () |
Creates a set for quadraphonic surround setup. More... | |
static AudioChannelSet | pentagonal () |
Creates a set for pentagonal surround setup. More... | |
static AudioChannelSet | hexagonal () |
Creates a set for hexagonal surround setup. More... | |
static AudioChannelSet | octagonal () |
Creates a set for octagonal surround setup. More... | |
static AudioChannelSet | ambisonic () |
Creates a set for ambisonic surround setups. More... | |
static AudioChannelSet | create5point0 () |
Creates a set for a 5.0 surround setup. More... | |
static AudioChannelSet | create5point1 () |
Creates a set for a 5.1 surround setup. More... | |
static AudioChannelSet | create6point0 () |
Creates a set for a 6.0 Cine surround setup. More... | |
static AudioChannelSet | create6point0Music () |
Creates a set for a 6.0 Music surround setup. More... | |
static AudioChannelSet | create6point1 () |
Creates a set for a 6.1 surround setup. More... | |
static AudioChannelSet | create7point0 () |
Creates a set for a 7.0 surround setup. More... | |
static AudioChannelSet | create7point1 () |
Creates a set for a 7.1 surround setup. More... | |
static AudioChannelSet | create7point1AC3 () |
Creates a set for a 7.1 AC3 C surround setup. More... | |
static AudioChannelSet | createFront7point0 () |
Creates a set for a 7.0 surround setup (with side instead of rear speakers). More... | |
static AudioChannelSet | createFront7point1 () |
Creates a set for a 7.1 surround setup (with side instead of rear speakers). More... | |
static AudioChannelSet | discreteChannels (int numChannels) |
Creates a set of untyped discrete channels. More... | |
static AudioChannelSet | canonicalChannelSet (int numChannels) |
Create a canonical channel set for a given number of channels. More... | |
static String | getChannelTypeName (ChannelType) |
Returns the name of a given channel type. More... | |
static String | getAbbreviatedChannelTypeName (ChannelType) |
Returns the abbreviated name of a channel type. More... | |
Represents a set of audio channel types.
For example, you might have a set of left + right channels, which is a stereo channel set. It is a collection of values from the AudioChannelSet::ChannelType enum, where each type may only occur once within the set.
Represents different audio channel types.
|
noexcept |
Creates an empty channel set.
You can call addChannel to add channels to the set.
|
static |
Creates a zero-channel set which can be used to indicate that a bus is disabled.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), AudioUnitHelpers::ChannelSetToCALayoutTag(), StandalonePluginHolder::createPlugin(), PluginBusUtilities::enableAllBuses(), and PluginBusUtilities::getDefaultLayoutForChannelNumAndBus().
|
static |
Creates a one-channel mono set.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), AudioUnitHelpers::ChannelSetToCALayoutTag(), and toString().
|
static |
Creates a set containing a left and right channel.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set containing a left, right and centre channels.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set containing a left, right and centre channels.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set containing a left, right, centre and surround channels.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for quadraphonic surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for pentagonal surround setup.
Referenced by AudioUnitHelpers::auChannelIndexToJuce(), AudioUnitHelpers::CALayoutTagToChannelSet(), AudioUnitHelpers::ChannelSetToCALayoutTag(), and AudioUnitHelpers::juceChannelIndexToAu().
|
static |
Creates a set for hexagonal surround setup.
Referenced by AudioUnitHelpers::auChannelIndexToJuce(), AudioUnitHelpers::CALayoutTagToChannelSet(), AudioUnitHelpers::ChannelSetToCALayoutTag(), and AudioUnitHelpers::juceChannelIndexToAu().
|
static |
Creates a set for octagonal surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for ambisonic surround setups.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 5.0 surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 5.1 surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 6.0 Cine surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 6.0 Music surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 6.1 surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 7.0 surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 7.1 surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 7.1 AC3 C surround setup.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 7.0 surround setup (with side instead of rear speakers).
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set for a 7.1 surround setup (with side instead of rear speakers).
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), and AudioUnitHelpers::ChannelSetToCALayoutTag().
|
static |
Creates a set of untyped discrete channels.
Referenced by AudioUnitHelpers::CALayoutTagToChannelSet(), PluginBusUtilities::findMaxNumberOfChannelsForBus(), and PluginBusUtilities::getDefaultLayoutForChannelNumAndBus().
|
static |
Create a canonical channel set for a given number of channels.
For example, numChannels = 1 will return mono, numChannels = 2 will return stereo, etc.
|
static |
Returns the name of a given channel type.
For example, this method may return "Surround Left".
|
static |
Returns the abbreviated name of a channel type.
For example, this method may return "Ls".
void AudioChannelSet::addChannel | ( | ChannelType | newChannelType | ) |
Adds a channel to the set.
Referenced by AudioUnitHelpers::CoreAudioChannelBitmapToJuceType(), and toString().
|
noexcept |
Returns the number of channels in the set.
Referenced by PluginBusUtilities::findTotalNumChannels(), AudioUnitHelpers::ChannelRemapper::get(), PluginBusUtilities::getDefaultLayoutForChannelNumAndBus(), and PluginBusUtilities::getNumChannels().
|
noexcept |
Returns the number of channels in the set.
References operator!=(), operator<(), and operator==().
Referenced by AudioUnitHelpers::getAUChannelInfo().
Array<ChannelType> AudioChannelSet::getChannelTypes | ( | ) | const |
Returns an array of all the types in this channel set.
Referenced by AudioUnitHelpers::auChannelIndexToJuce(), and toString().
|
noexcept |
Returns the type of one of the channels in the set, by index.
Referenced by AudioUnitHelpers::juceChannelIndexToAu().
|
noexcept |
Returns the index for a particular channel-type.
Will return -1 if the this set does not contain a channel of this type.
String AudioChannelSet::getSpeakerArrangementAsString | ( | ) | const |
Returns a string containing a whitespace-separated list of speaker types corresponding to each channel.
For example in a 5.1 arrangement, the string may be "L R C Lfe Ls Rs". If the speaker arrangement is unknown, the returned string will be empty.
String AudioChannelSet::getDescription | ( | ) | const |
Returns the description of the current layout.
For example, this method may return "Quadraphonic". Note that the returned string may not be unique.
|
noexcept |
Returns if this is a channel layout made-up of discrete channels.
Referenced by PluginBusUtilities::getDefaultLayoutForChannelNumAndBus().
|
noexcept |
|
noexcept |
|
noexcept |