34 for (
auto channel : c)
38 bool AudioChannelSet::operator== (
const AudioChannelSet& other)
const noexcept {
return channels == other.channels; }
39 bool AudioChannelSet::operator!= (
const AudioChannelSet& other)
const noexcept {
return channels != other.channels; }
40 bool AudioChannelSet::operator< (
const AudioChannelSet& other)
const noexcept {
return channels < other.channels; }
44 if (type >= discreteChannel0)
45 return "Discrete " +
String (type - discreteChannel0 + 1);
49 case left:
return NEEDS_TRANS(
"Left");
50 case right:
return NEEDS_TRANS(
"Right");
51 case centre:
return NEEDS_TRANS(
"Centre");
52 case LFE:
return NEEDS_TRANS(
"LFE");
53 case leftSurround:
return NEEDS_TRANS(
"Left Surround");
54 case rightSurround:
return NEEDS_TRANS(
"Right Surround");
55 case leftCentre:
return NEEDS_TRANS(
"Left Centre");
56 case rightCentre:
return NEEDS_TRANS(
"Right Centre");
57 case centreSurround:
return NEEDS_TRANS(
"Centre Surround");
58 case leftSurroundRear:
return NEEDS_TRANS(
"Left Surround Rear");
59 case rightSurroundRear:
return NEEDS_TRANS(
"Right Surround Rear");
60 case topMiddle:
return NEEDS_TRANS(
"Top Middle");
61 case topFrontLeft:
return NEEDS_TRANS(
"Top Front Left");
62 case topFrontCentre:
return NEEDS_TRANS(
"Top Front Centre");
63 case topFrontRight:
return NEEDS_TRANS(
"Top Front Right");
64 case topRearLeft:
return NEEDS_TRANS(
"Top Rear Left");
65 case topRearCentre:
return NEEDS_TRANS(
"Top Rear Centre");
66 case topRearRight:
return NEEDS_TRANS(
"Top Rear Right");
67 case wideLeft:
return NEEDS_TRANS(
"Wide Left");
68 case wideRight:
return NEEDS_TRANS(
"Wide Right");
69 case LFE2:
return NEEDS_TRANS(
"LFE 2");
70 case leftSurroundSide:
return NEEDS_TRANS(
"Left Surround Side");
71 case rightSurroundSide:
return NEEDS_TRANS(
"Right Surround Side");
72 case ambisonicW:
return NEEDS_TRANS(
"Ambisonic W");
73 case ambisonicX:
return NEEDS_TRANS(
"Ambisonic X");
74 case ambisonicY:
return NEEDS_TRANS(
"Ambisonic Y");
75 case ambisonicZ:
return NEEDS_TRANS(
"Ambisonic Z");
76 case topSideLeft:
return NEEDS_TRANS(
"Top Side Left");
77 case topSideRight:
return NEEDS_TRANS(
"Top Side Right");
78 case ambisonicACN4:
return NEEDS_TRANS(
"Ambisonic 4");
79 case ambisonicACN5:
return NEEDS_TRANS(
"Ambisonic 5");
80 case ambisonicACN6:
return NEEDS_TRANS(
"Ambisonic 6");
81 case ambisonicACN7:
return NEEDS_TRANS(
"Ambisonic 7");
82 case ambisonicACN8:
return NEEDS_TRANS(
"Ambisonic 8");
83 case ambisonicACN9:
return NEEDS_TRANS(
"Ambisonic 9");
84 case ambisonicACN10:
return NEEDS_TRANS(
"Ambisonic 10");
85 case ambisonicACN11:
return NEEDS_TRANS(
"Ambisonic 11");
86 case ambisonicACN12:
return NEEDS_TRANS(
"Ambisonic 12");
87 case ambisonicACN13:
return NEEDS_TRANS(
"Ambisonic 13");
88 case ambisonicACN14:
return NEEDS_TRANS(
"Ambisonic 14");
89 case ambisonicACN15:
return NEEDS_TRANS(
"Ambisonic 15");
90 case bottomFrontLeft:
return NEEDS_TRANS(
"Bottom Front Left");
91 case bottomFrontCentre:
return NEEDS_TRANS(
"Bottom Front Centre");
92 case bottomFrontRight:
return NEEDS_TRANS(
"Bottom Front Right");
93 case bottomSideLeft:
return NEEDS_TRANS(
"Bottom Side Left");
94 case bottomSideRight:
return NEEDS_TRANS(
"Bottom Side Right");
95 case bottomRearLeft:
return NEEDS_TRANS(
"Bottom Rear Left");
96 case bottomRearCentre:
return NEEDS_TRANS(
"Bottom Rear Centre");
97 case bottomRearRight:
return NEEDS_TRANS(
"Bottom Rear Right");
98 case discreteChannel0:
return NEEDS_TRANS(
"Discrete channel");
107 if (type >= discreteChannel0)
108 return String (type - discreteChannel0 + 1);
112 case left:
return "L";
113 case right:
return "R";
114 case centre:
return "C";
115 case LFE:
return "Lfe";
116 case leftSurround:
return "Ls";
117 case rightSurround:
return "Rs";
118 case leftCentre:
return "Lc";
119 case rightCentre:
return "Rc";
120 case centreSurround:
return "Cs";
121 case leftSurroundRear:
return "Lrs";
122 case rightSurroundRear:
return "Rrs";
123 case topMiddle:
return "Tm";
124 case topFrontLeft:
return "Tfl";
125 case topFrontCentre:
return "Tfc";
126 case topFrontRight:
return "Tfr";
127 case topRearLeft:
return "Trl";
128 case topRearCentre:
return "Trc";
129 case topRearRight:
return "Trr";
130 case wideLeft:
return "Wl";
131 case wideRight:
return "Wr";
132 case LFE2:
return "Lfe2";
133 case leftSurroundSide:
return "Lss";
134 case rightSurroundSide:
return "Rss";
135 case ambisonicACN0:
return "ACN0";
136 case ambisonicACN1:
return "ACN1";
137 case ambisonicACN2:
return "ACN2";
138 case ambisonicACN3:
return "ACN3";
139 case ambisonicACN4:
return "ACN4";
140 case ambisonicACN5:
return "ACN5";
141 case ambisonicACN6:
return "ACN6";
142 case ambisonicACN7:
return "ACN7";
143 case ambisonicACN8:
return "ACN8";
144 case ambisonicACN9:
return "ACN9";
145 case ambisonicACN10:
return "ACN10";
146 case ambisonicACN11:
return "ACN11";
147 case ambisonicACN12:
return "ACN12";
148 case ambisonicACN13:
return "ACN13";
149 case ambisonicACN14:
return "ACN14";
150 case ambisonicACN15:
return "ACN15";
151 case topSideLeft:
return "Tsl";
152 case topSideRight:
return "Tsr";
153 case bottomFrontLeft:
return "Bfl";
154 case bottomFrontCentre:
return "Bfc";
155 case bottomFrontRight:
return "Bfr";
156 case bottomSideLeft:
return "Bsl";
157 case bottomSideRight:
return "Bsr";
158 case bottomRearLeft:
return "Brl";
159 case bottomRearCentre:
return "Brc";
160 case bottomRearRight:
return "Brr";
164 if (type >= ambisonicACN4 && type <= ambisonicACN35)
165 return "ACN" +
String (type - ambisonicACN4 + 4);
172 if (abbr.
length() > 0 && (abbr[0] >=
'0' && abbr[0] <=
'9'))
176 if (abbr ==
"L")
return left;
177 if (abbr ==
"R")
return right;
178 if (abbr ==
"C")
return centre;
179 if (abbr ==
"Lfe")
return LFE;
180 if (abbr ==
"Ls")
return leftSurround;
181 if (abbr ==
"Rs")
return rightSurround;
182 if (abbr ==
"Lc")
return leftCentre;
183 if (abbr ==
"Rc")
return rightCentre;
184 if (abbr ==
"Cs")
return centreSurround;
185 if (abbr ==
"Lrs")
return leftSurroundRear;
186 if (abbr ==
"Rrs")
return rightSurroundRear;
187 if (abbr ==
"Tm")
return topMiddle;
188 if (abbr ==
"Tfl")
return topFrontLeft;
189 if (abbr ==
"Tfc")
return topFrontCentre;
190 if (abbr ==
"Tfr")
return topFrontRight;
191 if (abbr ==
"Trl")
return topRearLeft;
192 if (abbr ==
"Trc")
return topRearCentre;
193 if (abbr ==
"Trr")
return topRearRight;
194 if (abbr ==
"Wl")
return wideLeft;
195 if (abbr ==
"Wr")
return wideRight;
196 if (abbr ==
"Lfe2")
return LFE2;
197 if (abbr ==
"Lss")
return leftSurroundSide;
198 if (abbr ==
"Rss")
return rightSurroundSide;
199 if (abbr ==
"W")
return ambisonicW;
200 if (abbr ==
"X")
return ambisonicX;
201 if (abbr ==
"Y")
return ambisonicY;
202 if (abbr ==
"Z")
return ambisonicZ;
203 if (abbr ==
"ACN0")
return ambisonicACN0;
204 if (abbr ==
"ACN1")
return ambisonicACN1;
205 if (abbr ==
"ACN2")
return ambisonicACN2;
206 if (abbr ==
"ACN3")
return ambisonicACN3;
207 if (abbr ==
"ACN4")
return ambisonicACN4;
208 if (abbr ==
"ACN5")
return ambisonicACN5;
209 if (abbr ==
"ACN6")
return ambisonicACN6;
210 if (abbr ==
"ACN7")
return ambisonicACN7;
211 if (abbr ==
"ACN8")
return ambisonicACN8;
212 if (abbr ==
"ACN9")
return ambisonicACN9;
213 if (abbr ==
"ACN10")
return ambisonicACN10;
214 if (abbr ==
"ACN11")
return ambisonicACN11;
215 if (abbr ==
"ACN12")
return ambisonicACN12;
216 if (abbr ==
"ACN13")
return ambisonicACN13;
217 if (abbr ==
"ACN14")
return ambisonicACN14;
218 if (abbr ==
"ACN15")
return ambisonicACN15;
219 if (abbr ==
"Tsl")
return topSideLeft;
220 if (abbr ==
"Tsr")
return topSideRight;
221 if (abbr ==
"Bfl")
return bottomFrontLeft;
222 if (abbr ==
"Bfc")
return bottomFrontCentre;
223 if (abbr ==
"Bfr")
return bottomFrontRight;
224 if (abbr ==
"Bsl")
return bottomSideLeft;
225 if (abbr ==
"Bsr")
return bottomSideRight;
226 if (abbr ==
"Brl")
return bottomRearLeft;
227 if (abbr ==
"Brc")
return bottomRearCentre;
228 if (abbr ==
"Brr")
return bottomRearRight;
236 for (
auto& speaker : getChannelTypes())
238 auto name = getAbbreviatedChannelTypeName (speaker);
240 if (name.isNotEmpty())
241 speakerTypes.
add (name);
253 auto type = getChannelTypeFromAbbreviation (abbr);
256 set.addChannel (type);
264 if (isDiscreteLayout())
return "Discrete #" +
String (size());
265 if (*
this == disabled())
return "Disabled";
266 if (*
this == mono())
return "Mono";
267 if (*
this == stereo())
return "Stereo";
269 if (*
this == createLCR())
return "LCR";
270 if (*
this == createLRS())
return "LRS";
271 if (*
this == createLCRS())
return "LCRS";
273 if (*
this == create5point0())
return "5.0 Surround";
274 if (*
this == create5point1())
return "5.1 Surround";
275 if (*
this == create6point0())
return "6.0 Surround";
276 if (*
this == create6point1())
return "6.1 Surround";
277 if (*
this == create6point0Music())
return "6.0 (Music) Surround";
278 if (*
this == create6point1Music())
return "6.1 (Music) Surround";
279 if (*
this == create7point0())
return "7.0 Surround";
280 if (*
this == create7point1())
return "7.1 Surround";
281 if (*
this == create7point0SDDS())
return "7.0 Surround SDDS";
282 if (*
this == create7point1SDDS())
return "7.1 Surround SDDS";
283 if (*
this == create7point0point2())
return "7.0.2 Surround";
284 if (*
this == create7point1point2())
return "7.1.2 Surround";
286 if (*
this == quadraphonic())
return "Quadraphonic";
287 if (*
this == pentagonal())
return "Pentagonal";
288 if (*
this == hexagonal())
return "Hexagonal";
289 if (*
this == octagonal())
return "Octagonal";
293 auto order = getAmbisonicOrder();
301 case 1: suffix =
"st";
break;
302 case 2: suffix =
"nd";
break;
303 case 3: suffix =
"rd";
break;
304 default: suffix =
"th";
break;
307 return String (order) + suffix +
" Order Ambisonics";
316 for (
auto& speaker : getChannelTypes())
317 if (speaker <= ambisonicACN35)
325 return channels.countNumberOfSetBits();
330 int bit = channels.findNextSetBit(0);
332 for (
int i = 0; i < index && bit >= 0; ++i)
333 bit = channels.findNextSetBit (bit + 1);
342 for (
int bit = channels.findNextSetBit (0); bit >= 0; bit = channels.findNextSetBit (bit + 1))
344 if (static_cast<ChannelType> (bit) == type)
357 for (
int bit = channels.findNextSetBit(0); bit >= 0; bit = channels.findNextSetBit (bit + 1))
358 result.
add (static_cast<ChannelType> (bit));
365 const int bit =
static_cast<int> (newChannel);
366 jassert (bit >= 0 && bit < 1024);
367 channels.setBit (bit);
372 const int bit =
static_cast<int> (newChannel);
373 jassert (bit >= 0 && bit < 1024);
374 channels.clearBit (bit);
402 jassert (isPositiveAndBelow (order, 6));
407 AudioChannelSet set ((1u << ambisonicACN0) | (1u << ambisonicACN1) | (1u << ambisonicACN2) | (1u << ambisonicACN3));
409 auto numAmbisonicChannels = (order + 1) * (order + 1);
410 set.channels.
setRange (ambisonicACN4, numAmbisonicChannels - 4,
true);
417 auto ambisonicOrder = getAmbisonicOrderForNumChannels (size());
419 if (ambisonicOrder >= 0)
420 return (*
this == ambisonic (ambisonicOrder) ? ambisonicOrder : -1);
428 s.channels.
setRange (discreteChannel0, numChannels,
true);
443 return discreteChannels (numChannels);
464 if (numChannels != 0)
468 if (numChannels == 1)
472 else if (numChannels == 2)
476 else if (numChannels == 3)
481 else if (numChannels == 4)
486 else if (numChannels == 5)
491 else if (numChannels == 6)
498 else if (numChannels == 7)
505 else if (numChannels == 8)
512 auto order = getAmbisonicOrderForNumChannels (numChannels);
524 for (
auto ch : channelArray)
526 jassert (!
set.channels[static_cast<int> (ch)]);
537 return AudioChannelSet (static_cast<uint32> ((dwChannelMask & ((1 << 18) - 1)) << 1));
542 if (channels.getHighestBit() > topRearRight)
545 return (channels.toInteger() >> 1);
549 int JUCE_CALLTYPE AudioChannelSet::getAmbisonicOrderForNumChannels (
int numChannels)
551 auto sqrtMinusOne = std::sqrt (static_cast<float> (numChannels)) - 1.0f;
552 auto ambisonicOrder = jmax (0, static_cast<int> (std::floor (sqrtMinusOne)));
554 if (ambisonicOrder > 5)
557 return (static_cast<float> (ambisonicOrder) == sqrtMinusOne ? ambisonicOrder : -1);
565 class AudioChannelSetUnitTest :
public UnitTest 568 AudioChannelSetUnitTest()
569 :
UnitTest (
"AudioChannelSetUnitTest", UnitTestCategories::audio)
574 auto max = AudioChannelSet::maxChannelsOfNamedLayout;
576 beginTest (
"maxChannelsOfNamedLayout is non-discrete");
579 beginTest (
"channelSetsWithNumberOfChannels returns correct speaker count");
581 for (
auto ch = 1; ch <= max; ++ch)
585 for (
auto set : channelSets)
586 expect (
set.size() == ch);
595 checkAmbisonic (mask, 0,
"0th Order Ambisonics");
598 checkAmbisonic (mask, 1,
"1st Order Ambisonics");
602 checkAmbisonic (mask, 2,
"2nd Order Ambisonics");
607 checkAmbisonic (mask, 3,
"3rd Order Ambisonics");
612 checkAmbisonic (mask, 4,
"4th Order Ambisonics");
618 checkAmbisonic (mask, 5,
"5th Order Ambisonics");
623 void checkAmbisonic (uint64 mask,
int order,
const char* layoutName)
626 auto numChannels = expected.size();
629 expect (channelSetFromMask (mask) == expected);
631 expect (order == expected.getAmbisonicOrder());
632 expect (expected.getDescription() == layoutName);
635 expect (layouts.contains (expected));
637 for (
auto layout : layouts)
638 expect (layout.getAmbisonicOrder() == (layout == expected ? order : -1));
644 for (
int bit = 0; bit <= 62; ++bit)
645 if ((mask & (1ull << bit)) != 0)
646 channels.
add (static_cast<AudioChannelSet::ChannelType> (bit));
652 static AudioChannelSetUnitTest audioChannelSetUnitTest;
First-order ambisonic channel number 3.
static AudioChannelSet JUCE_CALLTYPE create6point1()
Creates a set for a 6.1 Cine surround setup (left, right, centre, leftSurround, rightSurround, centreSurround, LFE).
Represents a set of audio channel types.
int getChannelIndexForType(ChannelType type) const noexcept
Returns the index for a particular channel-type.
static AudioChannelSet JUCE_CALLTYPE create6point1Music()
Creates a set for a 6.0 Music surround setup (left, right, leftSurround, rightSurround, leftSurroundSide, rightSurroundSide, LFE).
static Array< AudioChannelSet > JUCE_CALLTYPE channelSetsWithNumberOfChannels(int numChannels)
Return an array of channel sets which have a given number of channels.
static AudioChannelSet JUCE_CALLTYPE pentagonal()
Creates a set for pentagonal surround setup (left, right, centre, leftSurroundRear, rightSurroundRear).
Second-order ambisonic channel number 4.
Fifth-order ambisonic channel number 27.
Fourth-order ambisonic channel number 23.
static AudioChannelSet JUCE_CALLTYPE disabled()
Creates a zero-channel set which can be used to indicate that a bus is disabled.
void removeChannel(ChannelType newChannelType)
Removes a channel from the set.
static AudioChannelSet JUCE_CALLTYPE create6point0Music()
Creates a set for a 6.0 Music surround setup (left, right, leftSurround, rightSurround, leftSurroundSide, rightSurroundSide).
First-order ambisonic channel number 1.
Fourth-order ambisonic channel number 24.
static AudioChannelSet JUCE_CALLTYPE create7point1SDDS()
Creates a set for a 7.1 surround setup (left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre, LFE).
void add(const ElementType &newElement)
Appends a new element at the end of the array.
static AudioChannelSet JUCE_CALLTYPE namedChannelSet(int numChannels)
Create a channel set for a given number of channels which is non-discrete.
Fifth-order ambisonic channel number 33.
UnitTest(const String &name, const String &category=String())
Creates a test with the given name and optionally places it in a category.
ChannelType
Represents different audio channel types.
int size() const noexcept
Returns the number of channels in the set.
Fifth-order ambisonic channel number 25.
Fourth-order ambisonic channel number 18.
static AudioChannelSet JUCE_CALLTYPE channelSetWithChannels(const Array< ChannelType > &)
Creates a channel set for a list of channel types.
Fifth-order ambisonic channel number 30.
ChannelType getTypeOfChannel(int channelIndex) const noexcept
Returns the type of one of the channels in the set, by index.
Array< ChannelType > getChannelTypes() const
Returns an array of all the types in this channel set.
A special array for holding a list of strings.
Fourth-order ambisonic channel number 19.
void addChannel(ChannelType newChannelType)
Adds a channel to the set.
Third-order ambisonic channel number 12.
Fourth-order ambisonic channel number 22.
static AudioChannelSet JUCE_CALLTYPE createLCRS()
Creates a set containing an LCRS set (left, right, centre, surround).
An arbitrarily large integer class.
static AudioChannelSet JUCE_CALLTYPE ambisonic(int order=1)
Creates a set for ACN, SN3D normalised ambisonic surround setups with a given order.
This is a base class for classes that perform a unit test.
static AudioChannelSet JUCE_CALLTYPE mono()
Creates a one-channel mono set (centre).
void runTest() override
Implement this method in your subclass to actually run your tests.
static String JUCE_CALLTYPE getChannelTypeName(ChannelType)
Returns the name of a given channel type.
static AudioChannelSet JUCE_CALLTYPE create7point0SDDS()
Creates a set for a SDDS 7.0 surround setup (left, right, centre, leftSurround, rightSurround, leftCentre, rightCentre).
Fourth-order ambisonic channel number 16.
static AudioChannelSet fromAbbreviatedString(const String &set)
Returns an AudioChannelSet from a string returned by getSpeakerArrangementAsString.
First-order ambisonic channel number 2.
bool isDiscreteLayout() const noexcept
Returns if this is a channel layout made-up of discrete channels.
void beginTest(const String &testName)
Tells the system that a new subsection of tests is beginning.
int32 getWaveChannelMask() const noexcept
Returns a WAVEFORMATEXTENSIBLE channelMask representation (typically used in .wav files) of the recei...
Fifth-order ambisonic channel number 35.
static ChannelType JUCE_CALLTYPE getChannelTypeFromAbbreviation(const String &abbreviation)
Returns the channel type from an abbreviated name.
static AudioChannelSet JUCE_CALLTYPE create7point0point2()
Creates a set for Dolby Atmos 7.0.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, topSideLeft, topSideRight).
Fourth-order ambisonic channel number 20.
Zero-th ambisonic channel number 0.
static AudioChannelSet JUCE_CALLTYPE create5point1()
Creates a set for a 5.1 surround setup (left, right, centre, leftSurround, rightSurround, LFE).
static AudioChannelSet JUCE_CALLTYPE create5point0()
Creates a set for a 5.0 surround setup (left, right, centre, leftSurround, rightSurround).
Third-order ambisonic channel number 14.
Fourth-order ambisonic channel number 21.
static StringArray fromTokens(StringRef stringToTokenise, bool preserveQuotedStrings)
Returns an array containing the tokens in a given string.
Holds a resizable array of primitive or copy-by-value objects.
static AudioChannelSet JUCE_CALLTYPE create7point1()
Creates a set for a DTS 7.1 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE).
Third-order ambisonic channel number 9.
Fifth-order ambisonic channel number 31.
static AudioChannelSet JUCE_CALLTYPE canonicalChannelSet(int numChannels)
Create a canonical channel set for a given number of channels.
Fifth-order ambisonic channel number 28.
static AudioChannelSet JUCE_CALLTYPE createLRS()
Creates a set containing an LRS set (left, right, surround).
String joinIntoString(StringRef separatorString, int startIndex=0, int numberOfElements=-1) const
Joins the strings in the array together into one string.
static AudioChannelSet JUCE_CALLTYPE createLCR()
Creates a set containing an LCR set (left, right, centre).
Third-order ambisonic channel number 11.
void expect(bool testResult, const String &failureMessage=String())
Checks that the result of a test is true, and logs this result.
AudioChannelSet()=default
Creates an empty channel set.
static AudioChannelSet JUCE_CALLTYPE create6point0()
Creates a set for a 6.0 Cine surround setup (left, right, centre, leftSurround, rightSurround, centreSurround).
Second-order ambisonic channel number 7.
Third-order ambisonic channel number 10.
static AudioChannelSet JUCE_CALLTYPE stereo()
Creates a set containing a stereo set (left, right).
Third-order ambisonic channel number 15.
static AudioChannelSet JUCE_CALLTYPE octagonal()
Creates a set for octagonal surround setup (left, right, leftSurround, rightSurround, centre, centreSurround, wideLeft, wideRight).
static String JUCE_CALLTYPE getAbbreviatedChannelTypeName(ChannelType)
Returns the abbreviated name of a channel type.
int getIntValue() const noexcept
Reads the value of the string as a decimal number (up to 32 bits in size).
static AudioChannelSet JUCE_CALLTYPE discreteChannels(int numChannels)
Creates a set of untyped discrete channels.
Fifth-order ambisonic channel number 32.
Third-order ambisonic channel number 13.
String getDescription() const
Returns the description of the current layout.
Second-order ambisonic channel number 6.
String getSpeakerArrangementAsString() const
Returns a string containing a whitespace-separated list of speaker types corresponding to each channe...
static AudioChannelSet JUCE_CALLTYPE create7point1point2()
Creates a set for Dolby Atmos 7.1.2 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear, LFE, topSideLeft, topSideRight).
static AudioChannelSet JUCE_CALLTYPE create7point0()
Creates a set for a DTS 7.0 surround setup (left, right, centre, leftSurroundSide, rightSurroundSide, leftSurroundRear, rightSurroundRear).
static AudioChannelSet JUCE_CALLTYPE fromWaveChannelMask(int32 dwChannelMask)
Create an AudioChannelSet from a WAVEFORMATEXTENSIBLE channelMask (typically used in ...
Fourth-order ambisonic channel number 17.
Fifth-order ambisonic channel number 29.
Fifth-order ambisonic channel number 26.
static AudioChannelSet JUCE_CALLTYPE hexagonal()
Creates a set for hexagonal surround setup (left, right, leftSurroundRear, rightSurroundRear, centre, surroundCentre).
Second-order ambisonic channel number 8.
static AudioChannelSet JUCE_CALLTYPE quadraphonic()
Creates a set for quadraphonic surround setup (left, right, leftSurround, rightSurround) ...
Fifth-order ambisonic channel number 34.
int length() const noexcept
Returns the number of characters in the string.
Second-order ambisonic channel number 5.
int getAmbisonicOrder() const
Returns the order of the ambisonic layout represented by this AudioChannelSet.
void add(String stringToAdd)
Appends a string at the end of the array.
void setRange(int startBit, int numBits, bool shouldBeSet)
Sets a range of bits to be either on or off.