OpenShot Audio Library | OpenShotAudio 0.4.0
|
#include <juce_AudioChannelSet.h>
Public Member Functions | |
AudioChannelSet ()=default | |
int | getAmbisonicOrder () const |
void | addChannel (ChannelType newChannelType) |
void | removeChannel (ChannelType newChannelType) |
int | size () const noexcept |
bool | isDisabled () const noexcept |
Array< ChannelType > | getChannelTypes () const |
ChannelType | getTypeOfChannel (int channelIndex) const noexcept |
int | getChannelIndexForType (ChannelType type) const noexcept |
String | getSpeakerArrangementAsString () const |
String | getDescription () const |
bool | isDiscreteLayout () const noexcept |
void | intersect (const AudioChannelSet &other) |
int32 | getWaveChannelMask () const noexcept |
bool | operator== (const AudioChannelSet &) const noexcept |
bool | operator!= (const AudioChannelSet &) const noexcept |
bool | operator< (const AudioChannelSet &) const noexcept |
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.
The documentation below lists which AudioChannelSet corresponds to which native layouts used by AAX, VST2/VST3 and CoreAudio/AU. The layout tags in CoreAudio are particularly confusing. For example, the layout which is labeled as "7.1 SDDS" in Logic Pro, corresponds to CoreAudio/AU's kAudioChannelLayoutTag_DTS_7_0 tag, whereas AAX's DTS 7.1 Layout corresponds to CoreAudio/AU's kAudioChannelLayoutTag_MPEG_7_1_A format, etc. Please do not use the CoreAudio tag as an indication to the actual layout of the speakers.
Definition at line 46 of file juce_AudioChannelSet.h.
anonymous enum |
Definition at line 506 of file juce_AudioChannelSet.h.
Represents different audio channel types.
Definition at line 352 of file juce_AudioChannelSet.h.
|
default |
Creates an empty channel set. You can call addChannel to add channels to the set.
void juce::AudioChannelSet::addChannel | ( | ChannelType | newChannelType | ) |
Adds a channel to the set.
Definition at line 523 of file juce_AudioChannelSet.cpp.
Referenced by channelSetWithChannels(), and fromAbbreviatedString().
|
static |
Creates a set for ACN, SN3D normalised ambisonic surround setups with a given order.
Is equivalent to: kAmbiXXXOrderACN (VST), AAX_eStemFormat_Ambi_XXX_ACN (AAX), kAudioChannelLayoutTag_HOA_ACN_SN3D (CoreAudio)
Definition at line 572 of file juce_AudioChannelSet.cpp.
|
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.
Definition at line 616 of file juce_AudioChannelSet.cpp.
Referenced by juce::AudioFormatReader::getChannelLayout().
|
static |
Return an array of channel sets which have a given number of channels
Definition at line 644 of file juce_AudioChannelSet.cpp.
|
static |
Creates a channel set for a list of channel types. This function will assert if you supply a duplicate channel.
Note that this method ignores the order in which the channels are given, i.e. two arrays with the same elements but in a different order will still result in the same channel set.
Definition at line 710 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.0 surround setup (left, right, centre, leftSurround, rightSurround).
Is equivalent to: k50 (VST), AAX_eStemFormat_5_0 (AAX), kAudioChannelLayoutTag_MPEG_5_0_A (CoreAudio)
This format is referred to as "5.0" in Cubase. This format is referred to as "5.0" in Pro Tools.
Definition at line 543 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.0.2 surround setup (left, right, centre, leftSurround, rightSurround, topSideLeft, topSideRight).
Is equivalent to: AAX_eStemFormat_5_0_2 (AAX).
Definition at line 557 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.0.4 surround setup (left, right, centre, leftSurround, rightSurround, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: AAX_eStemFormat_5_0_4 (AAX).
Definition at line 559 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.1 surround setup (left, right, centre, leftSurround, rightSurround, LFE).
Is equivalent to: k51 (VST), AAX_eStemFormat_5_1 (AAX), kAudioChannelLayoutTag_MPEG_5_1_A (CoreAudio)
This format is referred to as "5.1 (ITU 775)" in Logic Pro. This format is referred to as "5.1" in Cubase. This format is referred to as "5.1" in Pro Tools.
Definition at line 544 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.1.2 surround setup (left, right, centre, LFE, leftSurround, rightSurround, topSideLeft, topSideRight).
Is equivalent to: kAudioChannelLayoutTag_Atmos_5_1_2 (CoreAudio).
Definition at line 558 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 5.1.4 surround setup (left, right, centre, LFE, leftSurround, rightSurround, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: kAudioChannelLayoutTag_Atmos_5_1_4 (CoreAudio).
Definition at line 560 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 6.0 Cine surround setup (left, right, centre, leftSurround, rightSurround, centreSurround).
Is equivalent to: k60Cine (VST), AAX_eStemFormat_6_0 (AAX), kAudioChannelLayoutTag_AudioUnit_6_0 (CoreAudio)
Logic Pro incorrectly uses this for the surround format labeled "6.1 (ES/EX)". This format is referred to as "6.0 Cine" in Cubase. This format is referred to as "6.0" in Pro Tools.
Definition at line 545 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 6.0 Music surround setup (left, right, leftSurround, rightSurround, leftSurroundSide, rightSurroundSide).
Is equivalent to: k60Music (VST), n/a (AAX), kAudioChannelLayoutTag_DTS_6_0_A (CoreAudio)
This format is referred to as "6.0 Music" in Cubase.
Definition at line 547 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 6.1 Cine surround setup (left, right, centre, leftSurround, rightSurround, centreSurround, LFE).
Is equivalent to: k61Cine (VST), AAX_eStemFormat_6_1 (AAX), kAudioChannelLayoutTag_MPEG_6_1_A (CoreAudio)
This format is referred to as "6.1" in Pro Tools.
Definition at line 546 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 6.0 Music surround setup (left, right, leftSurround, rightSurround, leftSurroundSide, rightSurroundSide, LFE).
Is equivalent to: k61Music (VST), n/a (AAX), kAudioChannelLayoutTag_DTS_6_1_A (CoreAudio)
Definition at line 548 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a DTS 7.0 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear).
Is equivalent to: k70Music (VST), AAX_eStemFormat_7_0_DTS (AAX), kAudioChannelLayoutTag_AudioUnit_7_0 (CoreAudio)
This format is referred to as "7.0" in Pro Tools.
Definition at line 549 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for Dolby Atmos 7.0.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topSideLeft, topSideRight).
Is equivalent to: n/a (VST), AAX_eStemFormat_7_0_2 (AAX), n/a (CoreAudio)
Definition at line 561 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for Dolby Atmos 7.0.4 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: n/a (VST), n/a (AAX), n/a (CoreAudio)
Definition at line 563 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for 7.0.6 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight).
Is equivalent to: AAX_eStemFormat_7_0_6 (AAX).
Definition at line 565 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a SDDS 7.0 surround setup (left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre).
Is equivalent to: k70Cine (VST), AAX_eStemFormat_7_0_SDDS (AAX), kAudioChannelLayoutTag_AudioUnit_7_0_Front (CoreAudio)
This format is referred to as "7.0 SDDS" in Pro Tools.
Definition at line 550 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a DTS 7.1 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE).
Is equivalent to: k71CineSideFill (VST), AAX_eStemFormat_7_1_DTS (AAX), kAudioChannelLayoutTag_MPEG_7_1_C/kAudioChannelLayoutTag_ITU_3_4_1 (CoreAudio)
This format is referred to as "7.1 (3/4.1)" in Logic Pro. This format is referred to as "7.1" in Pro Tools.
Definition at line 551 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for Dolby Atmos 7.1.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topSideLeft, topSideRight).
Is equivalent to: k71_2 (VST), AAX_eStemFormat_7_1_2 (AAX), kAudioChannelLayoutTag_Atmos_7_1_2 (CoreAudio)
Definition at line 562 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for Dolby Atmos 7.1.4 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: k71_4 (VST), n/a (AAX), kAudioChannelLayoutTag_Atmos_7_1_4 (CoreAudio)
Definition at line 564 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for Dolby Atmos 7.1.6 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight).
Is equivalent to: k71_6 (VST), n/a (AAX), n/a (CoreAudio)
Definition at line 566 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 7.1 surround setup (left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, LFE).
Is equivalent to: k71Cine (VST), AAX_eStemFormat_7_1_SDDS (AAX), kAudioChannelLayoutTag_MPEG_7_1_A (CoreAudio)
This format is referred to as "7.1 (SDDS)" in Logic Pro. This format is referred to as "7.1 SDDS" in Pro Tools.
Definition at line 552 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 9.0.4 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: k90_4 (VST3), AAX_eStemFormat_9_0_4 (AAX).
Definition at line 567 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 9.0.6 surround setup (left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight).
Is equivalent to: k90_6 (VST3), AAX_eStemFormat_9_0_6 (AAX).
Definition at line 569 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 9.1.4 surround setup (left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topRearLeft, topRearRight).
Is equivalent to: k91_4 (VST3), AAX_eStemFormat_9_1_4 (AAX).
Definition at line 568 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for a 9.1.6 surround setup (left, right, centre, LFE, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, wideLeft, wideRight, topFrontLeft, topFrontRight, topSideLeft, topSideRight, topRearLeft, topRearRight).
Note that the VST3 layout arranges the front speakers "L Lc C Rc R", but the JUCE layout uses the arrangement "wideLeft left centre right wideRight". To maintain the relative positions of the speakers, the channels will be remapped accordingly. This means that the VST3 host's "L" channel will be received on a JUCE plugin's "wideLeft" channel, the "Lc" channel will be received on a JUCE plugin's "left" channel, and so on.
Is equivalent to: k91_6 (VST3), kAudioChannelLayoutTag_Atmos_9_1_6 (CoreAudio).
Definition at line 570 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set containing an LCR set (left, right, centre).
Is equivalent to: k30Cine (VST), AAX_eStemFormat_LCR (AAX), kAudioChannelLayoutTag_MPEG_3_0_A (CoreAudio)
This format is referred to as "LRC" in Cubase. This format is referred to as "LCR" in Pro Tools.
Definition at line 540 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set containing an LCRS set (left, right, centre, surround).
Is equivalent to: k40Cine (VST), AAX_eStemFormat_LCRS (AAX), kAudioChannelLayoutTag_MPEG_4_0_A (CoreAudio)
This format is referred to as "LCRS (Pro Logic)" in Logic Pro. This format is referred to as "LRCS" in Cubase. This format is referred to as "LCRS" in Pro Tools.
Definition at line 542 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set containing an LRS set (left, right, surround).
Is equivalent to: k30Music (VST), n/a (AAX), kAudioChannelLayoutTag_ITU_2_1 (CoreAudio)
This format is referred to as "LRS" in Cubase.
Definition at line 541 of file juce_AudioChannelSet.cpp.
|
static |
Creates a zero-channel set which can be used to indicate that a bus is disabled.
Definition at line 537 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set of untyped discrete channels.
Definition at line 609 of file juce_AudioChannelSet.cpp.
|
static |
Returns an AudioChannelSet from a string returned by getSpeakerArrangementAsString
Definition at line 395 of file juce_AudioChannelSet.cpp.
|
static |
Create an AudioChannelSet from a WAVEFORMATEXTENSIBLE channelMask (typically used in .wav files).
Definition at line 725 of file juce_AudioChannelSet.cpp.
|
static |
Returns the abbreviated name of a channel type. For example, this method may return "Ls".
Definition at line 156 of file juce_AudioChannelSet.cpp.
int juce::AudioChannelSet::getAmbisonicOrder | ( | ) | const |
Returns the order of the ambisonic layout represented by this AudioChannelSet. If the AudioChannelSet is not an ambisonic layout, then this method will return -1.
Definition at line 599 of file juce_AudioChannelSet.cpp.
|
static |
Returns the ambisonic order that includes exactly numChannels, or -1 if no supported ambisonic order contains exactly numChannels.
Definition at line 739 of file juce_AudioChannelSet.cpp.
|
noexcept |
Returns the index for a particular channel-type. Will return -1 if the this set does not contain a channel of this type.
Definition at line 498 of file juce_AudioChannelSet.cpp.
|
static |
Returns the channel type from an abbreviated name.
Definition at line 270 of file juce_AudioChannelSet.cpp.
|
static |
Returns the name of a given channel type. For example, this method may return "Surround Left".
Definition at line 42 of file juce_AudioChannelSet.cpp.
Array< AudioChannelSet::ChannelType > juce::AudioChannelSet::getChannelTypes | ( | ) | const |
Returns an array of all the types in this channel set.
Definition at line 513 of file juce_AudioChannelSet.cpp.
Referenced by juce::WavAudioFormat::isChannelLayoutSupported().
String juce::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.
Definition at line 410 of file juce_AudioChannelSet.cpp.
String juce::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.
Definition at line 380 of file juce_AudioChannelSet.cpp.
|
noexcept |
Returns the type of one of the channels in the set, by index.
Definition at line 488 of file juce_AudioChannelSet.cpp.
|
noexcept |
Returns a WAVEFORMATEXTENSIBLE channelMask representation (typically used in .wav files) of the receiver.
Returns -1 if the receiver cannot be represented in a WAVEFORMATEXTENSIBLE channelMask representation.
Definition at line 730 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for hexagonal surround setup (left, right, leftSurroundRear, rightSurroundRear, centre, surroundCentre).
Is equivalent to: n/a (VST), n/a (AAX), kAudioChannelLayoutTag_Hexagonal (CoreAudio)
Definition at line 555 of file juce_AudioChannelSet.cpp.
|
inline |
Intersect two channel layouts.
Definition at line 552 of file juce_AudioChannelSet.h.
|
inlinenoexcept |
Returns true if there are no channels in the set.
Definition at line 521 of file juce_AudioChannelSet.h.
|
noexcept |
Returns if this is a channel layout made-up of discrete channels.
Definition at line 474 of file juce_AudioChannelSet.cpp.
Referenced by juce::WavAudioFormat::isChannelLayoutSupported().
|
static |
Creates a one-channel mono set (centre).
Is equivalent to: kMonoAAX (VST), AAX_eStemFormat_Mono (AAX), kAudioChannelLayoutTag_Mono (CoreAudio)
Definition at line 538 of file juce_AudioChannelSet.cpp.
Referenced by juce::AudioFormat::isChannelLayoutSupported().
|
static |
Create a channel set for a given number of channels which is non-discrete. If numChannels is larger than the number of channels of the surround format with the maximum amount of channels (currently 7.1 Surround), then this function returns an empty set.
Definition at line 630 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for octagonal surround setup (left, right, leftSurround, rightSurround, centre, centreSurround, wideLeft, wideRight).
Is equivalent to: n/a (VST), n/a (AAX), kAudioChannelLayoutTag_Octagonal (CoreAudio)
Definition at line 556 of file juce_AudioChannelSet.cpp.
|
noexcept |
Definition at line 39 of file juce_AudioChannelSet.cpp.
|
noexcept |
Definition at line 40 of file juce_AudioChannelSet.cpp.
|
noexcept |
Definition at line 38 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for pentagonal surround setup (left, right, centre, leftSurroundRear, rightSurroundRear).
Is equivalent to: n/a (VST), n/a (AAX), kAudioChannelLayoutTag_Pentagonal (CoreAudio)
Definition at line 554 of file juce_AudioChannelSet.cpp.
|
static |
Creates a set for quadraphonic surround setup (left, right, leftSurround, rightSurround)
Is equivalent to: k40Music (VST), AAX_eStemFormat_Quad (AAX), kAudioChannelLayoutTag_Quadraphonic (CoreAudio)
This format is referred to as "Quadraphonic" in Logic Pro. This format is referred to as "Quadro" in Cubase. This format is referred to as "Quad" in Pro Tools.
Definition at line 553 of file juce_AudioChannelSet.cpp.
void juce::AudioChannelSet::removeChannel | ( | ChannelType | newChannelType | ) |
Removes a channel from the set.
Definition at line 530 of file juce_AudioChannelSet.cpp.
|
noexcept |
Returns the number of channels in the set.
Definition at line 483 of file juce_AudioChannelSet.cpp.
Referenced by juce::AudioFormat::createWriterFor().
|
static |
Creates a set containing a stereo set (left, right).
Is equivalent to: kStereo (VST), AAX_eStemFormat_Stereo (AAX), kAudioChannelLayoutTag_Stereo (CoreAudio)
Definition at line 539 of file juce_AudioChannelSet.cpp.
Referenced by juce::AudioFormat::isChannelLayoutSupported().