JUCE
|
Represents a set of audio channel types. More...
Public Types | |
enum | ChannelType { unknown = 0, left = 1, right = 2, centre = 3, subbass = 4, surroundLeft = 5, surroundRight = 6, centreLeft = 7, centreRight = 8, surround = 9, sideLeft = 10, sideRight = 11, topMiddle = 12, topFrontLeft = 13, topFrontCentre = 14, topFrontRight = 15, topRearLeft = 16, topRearCentre = 17, topRearRight = 18, wideLeft = 19, wideRight = 20, subbass2 = 21, ambisonicW = 22, ambisonicX = 23, ambisonicY = 24, ambisonicZ = 25, 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... | |
String | getSpeakerArrangementAsString () const |
Returns a string containing a whitespace-separated list of speaker types corresponding to each channel. 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 | 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 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 | 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 const char * | getChannelTypeName (ChannelType) noexcept |
Returns the name of a given channel type. More... | |
static const char * | getAbbreviatedChannelTypeName (ChannelType) noexcept |
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 PluginBusUtilities::enableAllBuses().
|
static |
Creates a one-channel mono set.
|
static |
Creates a set containing a left and right channel.
|
static |
Creates a set containing a left, right and centre channels.
|
static |
Creates a set containing a left, right, centre and surround channels.
|
static |
Creates a set for quadraphonic surround setup.
|
static |
Creates a set for pentagonal surround setup.
|
static |
Creates a set for hexagonal surround setup.
|
static |
Creates a set for octagonal surround setup.
|
static |
Creates a set for ambisonic surround setups.
|
static |
Creates a set for a 5.0 surround setup.
|
static |
Creates a set for a 5.1 surround setup.
|
static |
Creates a set for a 6.0 surround setup.
|
static |
Creates a set for a 6.1 surround setup.
|
static |
Creates a set for a 7.0 surround setup.
|
static |
Creates a set for a 7.1 surround setup.
|
static |
Creates a set for a 7.0 surround setup (with side instead of rear speakers).
|
static |
Creates a set for a 7.1 surround setup (with side instead of rear speakers).
|
static |
Creates a set of untyped discrete channels.
|
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.
Referenced by PluginBusUtilities::getDefaultLayoutForChannelNumAndBus().
|
staticnoexcept |
Returns the name of a given channel type.
For example, this method may return "Surround Left".
|
staticnoexcept |
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 toString().
|
noexcept |
Returns the number of channels in the set.
Referenced by PluginBusUtilities::findTotalNumChannels(), PluginBusUtilities::SupportedBusLayouts::getDefaultLayoutForChannelNum(), and PluginBusUtilities::getNumChannels().
|
noexcept |
Returns the number of channels in the set.
References operator!=(), operator<(), and operator==().
Array<ChannelType> AudioChannelSet::getChannelTypes | ( | ) | const |
Returns an array of all the types in this channel set.
Referenced by toString().
|
noexcept |
Returns the type of one of the channels in the set, by index.
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.
|
noexcept |
|
noexcept |
|
noexcept |