Add initial bits for Qt6 support
[carla.git] / source / includes / vst3sdk / pluginterfaces / vst / vstspeaker.h
blob0daa490a0b155ef641e8fb9374071fdca68a6885
1 //------------------------------------------------------------------------
2 // Project : VST SDK
3 //
4 // Category : Interfaces
5 // Filename : pluginterfaces/vst/vstspeaker.h
6 // Created by : Steinberg, 01/2018
7 // Description : common defines
8 //
9 //-----------------------------------------------------------------------------
10 // This file is part of a Steinberg SDK. It is subject to the license terms
11 // in the LICENSE file found in the top-level directory of this distribution
12 // and at www.steinberg.net/sdklicenses.
13 // No part of the SDK, including this file, may be copied, modified, propagated,
14 // or distributed except according to the terms contained in the LICENSE file.
15 //-----------------------------------------------------------------------------
17 #pragma once
19 #include "pluginterfaces/vst/vsttypes.h"
21 //------------------------------------------------------------------------
22 namespace Steinberg {
23 namespace Vst {
24 //------------------------------------------------------------------------
25 /** \defgroup speakerArrangements Speaker Arrangements
26 \image html "vst3_speaker_types.jpg"
28 A SpeakerArrangement is a bitset combination of speakers. For example:
29 \code
30 const SpeakerArrangement kStereo = kSpeakerL | kSpeakerR; // => hex: 0x03 / binary: 0011.
31 \endcode
32 \see IAudioProcessor::getBusArrangement () and IAudioProcessor::setBusArrangements ()
34 //------------------------------------------------------------------------
36 //------------------------------------------------------------------------
37 /** Speaker Definitions.
38 \ingroup speakerArrangements */
39 //------------------------------------------------------------------------
40 /**@{*/
41 const Speaker kSpeakerL = 1 << 0; ///< Left (L)
42 const Speaker kSpeakerR = 1 << 1; ///< Right (R)
43 const Speaker kSpeakerC = 1 << 2; ///< Center (C)
44 const Speaker kSpeakerLfe = 1 << 3; ///< Subbass (Lfe)
45 const Speaker kSpeakerLs = 1 << 4; ///< Left Surround (Ls)
46 const Speaker kSpeakerRs = 1 << 5; ///< Right Surround (Rs)
47 const Speaker kSpeakerLc = 1 << 6; ///< Left of Center (Lc) - Front Left Center
48 const Speaker kSpeakerRc = 1 << 7; ///< Right of Center (Rc) - Front Right Center
49 const Speaker kSpeakerS = 1 << 8; ///< Surround (S)
50 const Speaker kSpeakerCs = kSpeakerS; ///< Center of Surround (Cs) - Back Center - Surround (S)
51 const Speaker kSpeakerSl = 1 << 9; ///< Side Left (Sl)
52 const Speaker kSpeakerSr = 1 << 10; ///< Side Right (Sr)
53 const Speaker kSpeakerTc = 1 << 11; ///< Top Center Over-head, Top Middle (Tc)
54 const Speaker kSpeakerTfl = 1 << 12; ///< Top Front Left (Tfl)
55 const Speaker kSpeakerTfc = 1 << 13; ///< Top Front Center (Tfc)
56 const Speaker kSpeakerTfr = 1 << 14; ///< Top Front Right (Tfr)
57 const Speaker kSpeakerTrl = 1 << 15; ///< Top Rear/Back Left (Trl)
58 const Speaker kSpeakerTrc = 1 << 16; ///< Top Rear/Back Center (Trc)
59 const Speaker kSpeakerTrr = 1 << 17; ///< Top Rear/Back Right (Trr)
60 const Speaker kSpeakerLfe2 = 1 << 18; ///< Subbass 2 (Lfe2)
61 const Speaker kSpeakerM = 1 << 19; ///< Mono (M)
63 const Speaker kSpeakerACN0 = (Speaker)1 << 20; ///< Ambisonic ACN 0
64 const Speaker kSpeakerACN1 = (Speaker)1 << 21; ///< Ambisonic ACN 1
65 const Speaker kSpeakerACN2 = (Speaker)1 << 22; ///< Ambisonic ACN 2
66 const Speaker kSpeakerACN3 = (Speaker)1 << 23; ///< Ambisonic ACN 3
67 const Speaker kSpeakerACN4 = (Speaker)1 << 38; ///< Ambisonic ACN 4
68 const Speaker kSpeakerACN5 = (Speaker)1 << 39; ///< Ambisonic ACN 5
69 const Speaker kSpeakerACN6 = (Speaker)1 << 40; ///< Ambisonic ACN 6
70 const Speaker kSpeakerACN7 = (Speaker)1 << 41; ///< Ambisonic ACN 7
71 const Speaker kSpeakerACN8 = (Speaker)1 << 42; ///< Ambisonic ACN 8
72 const Speaker kSpeakerACN9 = (Speaker)1 << 43; ///< Ambisonic ACN 9
73 const Speaker kSpeakerACN10 = (Speaker)1 << 44; ///< Ambisonic ACN 10
74 const Speaker kSpeakerACN11 = (Speaker)1 << 45; ///< Ambisonic ACN 11
75 const Speaker kSpeakerACN12 = (Speaker)1 << 46; ///< Ambisonic ACN 12
76 const Speaker kSpeakerACN13 = (Speaker)1 << 47; ///< Ambisonic ACN 13
77 const Speaker kSpeakerACN14 = (Speaker)1 << 48; ///< Ambisonic ACN 14
78 const Speaker kSpeakerACN15 = (Speaker)1 << 49; ///< Ambisonic ACN 15
80 const Speaker kSpeakerTsl = (Speaker)1 << 24; ///< Top Side Left (Tsl)
81 const Speaker kSpeakerTsr = (Speaker)1 << 25; ///< Top Side Right (Tsr)
82 const Speaker kSpeakerLcs = (Speaker)1 << 26; ///< Left of Center Surround (Lcs) - Back Left Center
83 const Speaker kSpeakerRcs = (Speaker)1 << 27; ///< Right of Center Surround (Rcs) - Back Right Center
85 const Speaker kSpeakerBfl = (Speaker)1 << 28; ///< Bottom Front Left (Bfl)
86 const Speaker kSpeakerBfc = (Speaker)1 << 29; ///< Bottom Front Center (Bfc)
87 const Speaker kSpeakerBfr = (Speaker)1 << 30; ///< Bottom Front Right (Bfr)
89 const Speaker kSpeakerPl = (Speaker)1 << 31; ///< Proximity Left (Pl)
90 const Speaker kSpeakerPr = (Speaker)1 << 32; ///< Proximity Right (Pr)
92 const Speaker kSpeakerBsl = (Speaker)1 << 33; ///< Bottom Side Left (Bsl)
93 const Speaker kSpeakerBsr = (Speaker)1 << 34; ///< Bottom Side Right (Bsr)
94 const Speaker kSpeakerBrl = (Speaker)1 << 35; ///< Bottom Rear Left (Brl)
95 const Speaker kSpeakerBrc = (Speaker)1 << 36; ///< Bottom Rear Center (Brc)
96 const Speaker kSpeakerBrr = (Speaker)1 << 37; ///< Bottom Rear Right (Brr)
97 //------------------------------------------------------------------------
98 /** @}*/
100 //------------------------------------------------------------------------
101 /** Speaker Arrangement Definitions (SpeakerArrangement) */
102 namespace SpeakerArr
104 //------------------------------------------------------------------------
105 /** Speaker Arrangement Definitions.
106 \ingroup speakerArrangements */
107 /*@{*/
108 const SpeakerArrangement kEmpty = 0; ///< empty arrangement
109 const SpeakerArrangement kMono = kSpeakerM; ///< M
110 const SpeakerArrangement kStereo = kSpeakerL | kSpeakerR; ///< L R
111 const SpeakerArrangement kStereoSurround = kSpeakerLs | kSpeakerRs; ///< Ls Rs
112 const SpeakerArrangement kStereoCenter = kSpeakerLc | kSpeakerRc; ///< Lc Rc
113 const SpeakerArrangement kStereoSide = kSpeakerSl | kSpeakerSr; ///< Sl Sr
114 const SpeakerArrangement kStereoCLfe = kSpeakerC | kSpeakerLfe; ///< C Lfe
115 const SpeakerArrangement kStereoTF = kSpeakerTfl | kSpeakerTfr; ///< Tfl Tfr
116 const SpeakerArrangement kStereoTS = kSpeakerTsl | kSpeakerTsr; ///< Tsl Tsr
117 const SpeakerArrangement kStereoTR = kSpeakerTrl | kSpeakerTrr; ///< Trl Trr
118 const SpeakerArrangement kStereoBF = kSpeakerBfl | kSpeakerBfr; ///< Bfl Bfr
119 const SpeakerArrangement kCineFront = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLc | kSpeakerRc; ///< L R C Lc Rc
121 /** L R C */
122 const SpeakerArrangement k30Cine = kSpeakerL | kSpeakerR | kSpeakerC;
123 /** L R C Lfe */
124 const SpeakerArrangement k31Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe;
125 /** L R S */
126 const SpeakerArrangement k30Music = kSpeakerL | kSpeakerR | kSpeakerCs;
127 /** L R Lfe S */
128 const SpeakerArrangement k31Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerCs;
129 /** L R C S (LCRS) */
130 const SpeakerArrangement k40Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerCs;
131 /** L R C Lfe S (LCRS+Lfe) */
132 const SpeakerArrangement k41Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerCs;
133 /** L R Ls Rs (Quadro) */
134 const SpeakerArrangement k40Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs;
135 /** L R Lfe Ls Rs (Quadro+Lfe) */
136 const SpeakerArrangement k41Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
137 /** L R C Ls Rs */
138 const SpeakerArrangement k50 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs;
139 /** L R C Lfe Ls Rs */
140 const SpeakerArrangement k51 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
141 /** L R C Ls Rs Cs */
142 const SpeakerArrangement k60Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs;
143 /** L R C Lfe Ls Rs Cs */
144 const SpeakerArrangement k61Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs;
145 /** L R Ls Rs Sl Sr */
146 const SpeakerArrangement k60Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
147 /** L R Lfe Ls Rs Sl Sr */
148 const SpeakerArrangement k61Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
149 /** L R C Ls Rs Lc Rc */
150 const SpeakerArrangement k70Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
151 /** L R C Lfe Ls Rs Lc Rc */
152 const SpeakerArrangement k71Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
153 const SpeakerArrangement k71CineFullFront = k71Cine;
154 /** L R C Ls Rs Sl Sr */
155 const SpeakerArrangement k70Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
156 /** L R C Lfe Ls Rs Sl Sr */
157 const SpeakerArrangement k71Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
159 /** L R C Lfe Ls Rs Lcs Rcs */
160 const SpeakerArrangement k71CineFullRear = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLcs | kSpeakerRcs;
161 const SpeakerArrangement k71CineSideFill = k71Music;
162 /** L R C Lfe Ls Rs Pl Pr */
163 const SpeakerArrangement k71Proximity = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerPl | kSpeakerPr;
165 /** L R C Ls Rs Lc Rc Cs */
166 const SpeakerArrangement k80Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
167 /** L R C Lfe Ls Rs Lc Rc Cs */
168 const SpeakerArrangement k81Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
169 /** L R C Ls Rs Cs Sl Sr */
170 const SpeakerArrangement k80Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
171 /** L R C Lfe Ls Rs Cs Sl Sr */
172 const SpeakerArrangement k81Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
173 /** L R C Ls Rs Lc Rc Sl Sr */
174 const SpeakerArrangement k90Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
175 kSpeakerSl | kSpeakerSr;
176 /** L R C Lfe Ls Rs Lc Rc Sl Sr */
177 const SpeakerArrangement k91Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
178 kSpeakerSl | kSpeakerSr;
179 /** L R C Ls Rs Lc Rc Cs Sl Sr */
180 const SpeakerArrangement k100Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs |
181 kSpeakerSl | kSpeakerSr;
182 /** L R C Lfe Ls Rs Lc Rc Cs Sl Sr */
183 const SpeakerArrangement k101Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs |
184 kSpeakerSl | kSpeakerSr;
186 /** First-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
187 const SpeakerArrangement kAmbi1stOrderACN = kSpeakerACN0 | kSpeakerACN1 | kSpeakerACN2 | kSpeakerACN3;
188 /** Second-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
189 const SpeakerArrangement kAmbi2cdOrderACN = kAmbi1stOrderACN | kSpeakerACN4 | kSpeakerACN5 | kSpeakerACN6 | kSpeakerACN7 | kSpeakerACN8;
190 /** Third-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
191 const SpeakerArrangement kAmbi3rdOrderACN = kAmbi2cdOrderACN | kSpeakerACN9 | kSpeakerACN10 | kSpeakerACN11 | kSpeakerACN12 | kSpeakerACN13 | kSpeakerACN14 | kSpeakerACN15;
194 /*-----------*/
195 /* 3D formats */
196 /*-----------*/
197 /** L R Ls Rs Tfl Tfr Trl Trr */ // 4.0.4
198 const SpeakerArrangement k80Cube = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerTfl| kSpeakerTfr| kSpeakerTrl | kSpeakerTrr;
199 /** L R C Lfe Ls Rs Cs Tc */ // 6.1.1
200 const SpeakerArrangement k71CineTopCenter = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerTc;
201 /** L R C Lfe Ls Rs Cs Tfc */ // 6.1.1
202 const SpeakerArrangement k71CineCenterHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerTfc;
203 /** L R C Lfe Ls Rs Tfl Tfr */ // 5.1.2
204 const SpeakerArrangement k71CineFrontHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTfl | kSpeakerTfr;
205 const SpeakerArrangement k71MPEG3D = k71CineFrontHigh;
206 /** L R C Lfe Ls Rs Tsl Tsr */ // 5.1.2
207 const SpeakerArrangement k71CineSideHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTsl | kSpeakerTsr;
209 /** L R Lfe Ls Rs Tfl Tfc Tfr Bfc */ // 4.1.4
210 const SpeakerArrangement k81MPEG3D = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
211 kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerBfc;
213 /** L R C Ls Rs Tfl Tfr Trl Trr */ // 5.0.4
214 const SpeakerArrangement k90 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
215 kSpeakerTfl| kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
216 const SpeakerArrangement k50_4 = k90;
217 /** L R C Lfe Ls Rs Tfl Tfr Trl Trr */ // 5.1.4
218 const SpeakerArrangement k91 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
219 kSpeakerTfl| kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
220 const SpeakerArrangement k51_4 = k91;
222 /** L R C Ls Rs Sl Sr Tsl Tsr */ // 7.0.2
223 const SpeakerArrangement k70_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
224 kSpeakerSl | kSpeakerSr | kSpeakerTsl | kSpeakerTsr;
226 /** L R C Lfe Ls Rs Sl Sr Tsl Tsr */ // 7.1.2
227 const SpeakerArrangement k71_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
228 kSpeakerSl | kSpeakerSr | kSpeakerTsl | kSpeakerTsr;
229 const SpeakerArrangement k91Atmos = k71_2; // 9.1 Dolby Atmos (3D)
231 /** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr */ // 7.0.4
232 const SpeakerArrangement k70_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
233 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
235 /** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr */ // 7.1.4
236 const SpeakerArrangement k71_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
237 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
238 const SpeakerArrangement k111MPEG3D = k71_4;
240 /** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 7.0.6
241 const SpeakerArrangement k70_6 = kSpeakerL | kSpeakerR | kSpeakerC |
242 kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
243 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
245 /** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 7.1.6
246 const SpeakerArrangement k71_6 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
247 kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
248 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
250 /** L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr */ // 9.0.4
251 const SpeakerArrangement k90_4 = kSpeakerL | kSpeakerR | kSpeakerC |
252 kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
253 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
255 /** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr */ // 9.1.4
256 const SpeakerArrangement k91_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
257 kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
258 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
260 /** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 9.0.6
261 const SpeakerArrangement k90_6 = kSpeakerL | kSpeakerR | kSpeakerC |
262 kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
263 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
265 /** L R C Lfe Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr */ // 9.1.6
266 const SpeakerArrangement k91_6 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe |
267 kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerSl | kSpeakerSr |
268 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr;
270 /** L R C Ls Rs Tc Tfl Tfr Trl Trr */ // 5.0.5
271 const SpeakerArrangement k100 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
272 kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
273 /** L R C Lfe Ls Rs Tc Tfl Tfr Trl Trr */ // 5.1.5
274 const SpeakerArrangement k101 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
275 kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
276 const SpeakerArrangement k101MPEG3D = k101;
278 /** L R C Lfe Ls Rs Tfl Tfc Tfr Trl Trr Lfe2 */ // 5.2.5
279 const SpeakerArrangement k102 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
280 kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
282 /** L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.0.6
283 const SpeakerArrangement k110 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
284 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
285 /** L R C Lfe Ls Rs Tc Tfl Tfc Tfr Trl Trr */ // 5.1.6
286 const SpeakerArrangement k111 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
287 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
289 /** L R C Lfe Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr Lfe2 */ // 7.2.5
290 const SpeakerArrangement k122 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
291 kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
292 /** L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.0.6
293 const SpeakerArrangement k130 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
294 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
295 /** L R C Lfe Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */ // 7.1.6
296 const SpeakerArrangement k131 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
297 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
299 /** L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr */ // 6.0.4.4
300 const SpeakerArrangement k140 = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
301 kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
302 kSpeakerBfl | kSpeakerBfr | kSpeakerBrl | kSpeakerBrr;
304 /** L R C Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Tsl Tsr Bfl Bfc Bfr */ // 10.0.9.3
305 const SpeakerArrangement k220 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs | kSpeakerSl | kSpeakerSr |
306 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrc | kSpeakerTrr | kSpeakerTsl | kSpeakerTsr |
307 kSpeakerBfl| kSpeakerBfc | kSpeakerBfr;
309 /** L R C Lfe Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Lfe2 Tsl Tsr Bfl Bfc Bfr */ // 10.2.9.3
310 const SpeakerArrangement k222 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs | kSpeakerSl | kSpeakerSr |
311 kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrc | kSpeakerTrr | kSpeakerLfe2 | kSpeakerTsl | kSpeakerTsr |
312 kSpeakerBfl| kSpeakerBfc | kSpeakerBfr;
314 //------------------------------------------------------------------------
315 /** Speaker Arrangement String Representation.
316 \ingroup speakerArrangements */
317 /*@{*/
318 const CString kStringEmpty = "";
319 const CString kStringMono = "Mono";
320 const CString kStringStereo = "Stereo";
321 const CString kStringStereoR = "Stereo (Ls Rs)";
322 const CString kStringStereoC = "Stereo (Lc Rc)";
323 const CString kStringStereoSide = "Stereo (Sl Sr)";
324 const CString kStringStereoCLfe = "Stereo (C LFE)";
325 const CString kStringStereoTF = "Stereo (Tfl Tfr)";
326 const CString kStringStereoTS = "Stereo (Tsl Tsr)";
327 const CString kStringStereoTR = "Stereo (Trl Trr)";
328 const CString kStringStereoBF = "Stereo (Bfl Bfr)";
329 const CString kStringCineFront = "Cine Front";
331 const CString kString30Cine = "LRC";
332 const CString kString30Music = "LRS";
333 const CString kString31Cine = "LRC+LFE";
334 const CString kString31Music = "LRS+LFE";
335 const CString kString40Cine = "LRCS";
336 const CString kString40Music = "Quadro";
337 const CString kString41Cine = "LRCS+LFE";
338 const CString kString41Music = "Quadro+LFE";
339 const CString kString50 = "5.0";
340 const CString kString51 = "5.1";
341 const CString kString60Cine = "6.0 Cine";
342 const CString kString60Music = "6.0 Music";
343 const CString kString61Cine = "6.1 Cine";
344 const CString kString61Music = "6.1 Music";
345 const CString kString70Cine = "7.0 SDDS";
346 const CString kString70CineOld = "7.0 Cine (SDDS)";
347 const CString kString70Music = "7.0";
348 const CString kString70MusicOld = "7.0 Music (Dolby)";
349 const CString kString71Cine = "7.1 SDDS";
350 const CString kString71CineOld = "7.1 Cine (SDDS)";
351 const CString kString71Music = "7.1";
352 const CString kString71MusicOld = "7.1 Music (Dolby)";
353 const CString kString71CineTopCenter = "7.1 Cine Top Center";
354 const CString kString71CineCenterHigh = "7.1 Cine Center High";
355 const CString kString71CineFrontHigh = "7.1 Cine Front High";
356 const CString kString71CineSideHigh = "7.1 Cine Side High";
357 const CString kString71CineFullRear = "7.1 Cine Full Rear";
358 const CString kString71Proximity = "7.1 Proximity";
359 const CString kString80Cine = "8.0 Cine";
360 const CString kString80Music = "8.0 Music";
361 const CString kString80Cube = "8.0 Cube";
362 const CString kString81Cine = "8.1 Cine";
363 const CString kString81Music = "8.1 Music";
364 const CString kString90Cine = "9.0 Cine";
365 const CString kString91Cine = "9.1 Cine";
366 const CString kString100Cine = "10.0 Cine";
367 const CString kString101Cine = "10.1 Cine";
368 const CString kString102 = "10.2 Experimental";
369 const CString kString122 = "12.2";
370 const CString kString50_4 = "5.0.4";
371 const CString kString51_4 = "5.1.4";
372 const CString kString70_2 = "7.0.2";
373 const CString kString71_2 = "7.1.2";
374 const CString kString70_4 = "7.0.4";
375 const CString kString71_4 = "7.1.4";
376 const CString kString70_6 = "7.0.6";
377 const CString kString71_6 = "7.1.6";
378 const CString kString90_4 = "9.0.4";
379 const CString kString91_4 = "9.1.4";
380 const CString kString90_6 = "9.0.6";
381 const CString kString91_6 = "9.1.6";
382 const CString kString100 = "10.0 Auro-3D";
383 const CString kString101 = "10.1 Auro-3D";
384 const CString kString110 = "11.0 Auro-3D";
385 const CString kString111 = "11.1 Auro-3D";
386 const CString kString130 = "13.0 Auro-3D";
387 const CString kString131 = "13.1 Auro-3D";
388 const CString kString81MPEG = "8.1 MPEG";
389 const CString kString140 = "14.0";
390 const CString kString222 = "22.2";
391 const CString kString220 = "22.0";
392 const CString kStringAmbi1stOrder = "1st Order Ambisonics";
393 const CString kStringAmbi2cdOrder = "2nd Order Ambisonics";
394 const CString kStringAmbi3rdOrder = "3rd Order Ambisonics";
396 /*@}*/
398 //------------------------------------------------------------------------
399 /** Speaker Arrangement String Representation with Speakers Name.
400 \ingroup speakerArrangements */
401 /*@{*/
402 const CString kStringMonoS = "M";
403 const CString kStringStereoS = "L R";
404 const CString kStringStereoRS = "Ls Rs";
405 const CString kStringStereoCS = "Lc Rc";
406 const CString kStringStereoSS = "Sl Sr";
407 const CString kStringStereoCLfeS= "C LFE";
408 const CString kStringStereoTFS = "Tfl Tfr";
409 const CString kStringStereoTSS = "Tsl Tsr";
410 const CString kStringStereoTRS = "Trl Trr";
411 const CString kStringStereoBFS = "Bfl Bfr";
412 const CString kStringCineFrontS = "L R C Lc Rc";
413 const CString kString30CineS = "L R C";
414 const CString kString30MusicS = "L R S";
415 const CString kString31CineS = "L R C LFE";
416 const CString kString31MusicS = "L R LFE S";
417 const CString kString40CineS = "L R C S";
418 const CString kString40MusicS = "L R Ls Rs";
419 const CString kString41CineS = "L R C LFE S";
420 const CString kString41MusicS = "L R LFE Ls Rs";
421 const CString kString50S = "L R C Ls Rs";
422 const CString kString51S = "L R C LFE Ls Rs";
423 const CString kString60CineS = "L R C Ls Rs Cs";
424 const CString kString60MusicS = "L R Ls Rs Sl Sr";
425 const CString kString61CineS = "L R C LFE Ls Rs Cs";
426 const CString kString61MusicS = "L R LFE Ls Rs Sl Sr";
427 const CString kString70CineS = "L R C Ls Rs Lc Rc";
428 const CString kString70MusicS = "L R C Ls Rs Sl Sr";
429 const CString kString71CineS = "L R C LFE Ls Rs Lc Rc";
430 const CString kString71MusicS = "L R C LFE Ls Rs Sl Sr";
431 const CString kString80CineS = "L R C Ls Rs Lc Rc Cs";
432 const CString kString80MusicS = "L R C Ls Rs Cs Sl Sr";
433 const CString kString81CineS = "L R C LFE Ls Rs Lc Rc Cs";
434 const CString kString81MusicS = "L R C LFE Ls Rs Cs Sl Sr";
435 const CString kString80CubeS = "L R Ls Rs Tfl Tfr Trl Trr";
436 const CString kString71CineTopCenterS = "L R C LFE Ls Rs Cs Tc";
437 const CString kString71CineCenterHighS = "L R C LFE Ls Rs Cs Tfc";
438 const CString kString71CineFrontHighS = "L R C LFE Ls Rs Tfl Tfl";
439 const CString kString71CineSideHighS = "L R C LFE Ls Rs Tsl Tsl";
440 const CString kString71CineFullRearS = "L R C LFE Ls Rs Lcs Rcs";
441 const CString kString71ProximityS = "L R C LFE Ls Rs Pl Pr";
442 const CString kString90CineS = "L R C Ls Rs Lc Rc Sl Sr";
443 const CString kString91CineS = "L R C Lfe Ls Rs Lc Rc Sl Sr";
444 const CString kString100CineS = "L R C Ls Rs Lc Rc Cs Sl Sr";
445 const CString kString101CineS = "L R C Lfe Ls Rs Lc Rc Cs Sl Sr";
446 const CString kString50_4S = "L R C Ls Rs Tfl Tfr Trl Trr";
447 const CString kString51_4S = "L R C LFE Ls Rs Tfl Tfr Trl Trr";
448 const CString kString70_2S = "L R C Ls Rs Sl Sr Tsl Tsr";
449 const CString kString71_2S = "L R C LFE Ls Rs Sl Sr Tsl Tsr";
450 const CString kString70_4S = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr";
451 const CString kString71_4S = "L R C LFE Ls Rs Sl Sr Tfl Tfr Trl Trr";
452 const CString kString70_6S = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
453 const CString kString71_6S = "L R C LFE Ls Rs Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
454 const CString kString90_4S = "L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr";
455 const CString kString91_4S = "L R C LFE Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr";
456 const CString kString90_6S = "L R C Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
457 const CString kString91_6S = "L R C LFE Ls Rs Lc Rc Sl Sr Tfl Tfr Trl Trr Tsl Tsr";
458 const CString kString100S = "L R C Ls Rs Tc Tfl Tfr Trl Trr";
459 const CString kString101S = "L R C LFE Ls Rs Tc Tfl Tfr Trl Trr";
460 const CString kString110S = "L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr";
461 const CString kString111S = "L R C LFE Ls Rs Tc Tfl Tfc Tfr Trl Trr";
462 const CString kString130S = "L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
463 const CString kString131S = "L R C LFE Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
464 const CString kString102S = "L R C LFE Ls Rs Tfl Tfc Tfr Trl Trr LFE2";
465 const CString kString122S = "L R C LFE Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr LFE2";
466 const CString kString81MPEGS = "L R LFE Ls Rs Tfl Tfc Tfr Bfc";
467 const CString kString140S = "L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
468 const CString kString222S = "L R C LFE Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr LFE2 Tsl Tsr Bfl Bfc Bfr";
469 const CString kString220S = "L R C Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Tsl Tsr Bfl Bfc Bfr";
471 const CString kStringAmbi1stOrderS = "0 1 2 3";
472 const CString kStringAmbi2cdOrderS = "0 1 2 3 4 5 6 7 8";
473 const CString kStringAmbi3rdOrderS = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
474 /*@}*/
476 //------------------------------------------------------------------------
477 /** Returns number of channels used in speaker arrangement.
478 \ingroup speakerArrangements */
479 /*@{*/
480 inline int32 getChannelCount (SpeakerArrangement arr)
482 int32 count = 0;
483 while (arr)
485 if (arr & (SpeakerArrangement)1)
486 ++count;
487 arr >>= 1;
489 return count;
492 //------------------------------------------------------------------------
493 /** Returns the index of a given speaker in a speaker arrangement (-1 if speaker is not part of the
494 * arrangement). */
495 inline int32 getSpeakerIndex (Speaker speaker, SpeakerArrangement arrangement)
497 // check if speaker is present in arrangement
498 if ((arrangement & speaker) == 0)
499 return -1;
501 int32 result = 0;
502 Speaker i = 1;
503 while (i < speaker)
505 if (arrangement & i)
506 result++;
507 i <<= 1;
510 return result;
513 //------------------------------------------------------------------------
514 /** Returns the speaker for a given index in a speaker arrangement (return 0 when out of range). */
515 inline Speaker getSpeaker (const SpeakerArrangement& arr, int32 index)
517 SpeakerArrangement arrTmp = arr;
519 int32 index2 = -1;
520 int32 pos = -1;
521 while (arrTmp)
523 if (arrTmp & 0x1)
524 index2++;
525 pos++;
526 if (index2 == index)
527 return (Speaker)1 << pos;
529 arrTmp = arrTmp >> 1;
531 return 0;
534 //------------------------------------------------------------------------
535 /** Returns true if arrSubSet is a subset speaker of arr (means each speaker of arrSubSet is
536 * included in arr). */
537 inline bool isSubsetOf (const SpeakerArrangement& arrSubSet, const SpeakerArrangement& arr)
539 return (arrSubSet == (arrSubSet & arr));
542 //------------------------------------------------------------------------
543 /** Returns true if arrangement is a Auro configuration. */
544 inline bool isAuro (const SpeakerArrangement& arr)
546 if (arr == k90 || arr == k91 || arr == k100 || arr == k101 || arr == k110 || arr == k111 ||
547 arr == k130 || arr == k131)
549 return true;
551 return false;
554 //------------------------------------------------------------------------
555 /** Returns true if arrangement contains top (upper layer) speakers */
556 inline bool hasTopSpeakers (const SpeakerArrangement& arr)
558 if (arr & kSpeakerTc || arr & kSpeakerTfl || arr & kSpeakerTfc || arr & kSpeakerTfr ||
559 arr & kSpeakerTrl || arr & kSpeakerTrc || arr & kSpeakerTrr || arr & kSpeakerTsl ||
560 arr & kSpeakerTsr)
561 return true;
562 return false;
565 //------------------------------------------------------------------------
566 /** Returns true if arrangement contains bottom (lower layer) speakers */
567 inline bool hasBottomSpeakers (const SpeakerArrangement& arr)
569 if (arr & kSpeakerBfl || arr & kSpeakerBfc || arr & kSpeakerBfl || arr & kSpeakerBfc ||
570 arr & kSpeakerBfr)
571 return true;
572 return false;
575 //------------------------------------------------------------------------
576 /** Returns true if arrangement contains middle layer (at ears level) speakers */
577 inline bool hasMiddleSpeakers (const SpeakerArrangement& arr)
579 if (arr & kSpeakerL || arr & kSpeakerR || arr & kSpeakerC || arr & kSpeakerLs ||
580 arr & kSpeakerRs || arr & kSpeakerLc || arr & kSpeakerRc || arr & kSpeakerCs ||
581 arr & kSpeakerSl || arr & kSpeakerSr || arr & kSpeakerM || arr & kSpeakerPl ||
582 arr & kSpeakerPr || arr & kSpeakerLcs || arr & kSpeakerRcs)
583 return true;
584 return false;
587 //------------------------------------------------------------------------
588 /** Returns true if arrangement contains LFE speakers */
589 inline bool hasLfe (const SpeakerArrangement& arr)
591 if (arr & kSpeakerLfe || arr & kSpeakerLfe2)
592 return true;
593 return false;
596 //------------------------------------------------------------------------
597 /** Returns true if arrangement is a 3D configuration ((top or bottom) and middle) */
598 inline bool is3D (const SpeakerArrangement& arr)
600 bool top = hasTopSpeakers (arr);
601 bool bottom = hasBottomSpeakers (arr);
602 bool middle = hasMiddleSpeakers (arr);
604 if (((top || bottom) && middle) || (top && bottom))
605 return true;
606 return false;
609 //------------------------------------------------------------------------
610 /** Returns true if arrangement is a Auro configuration. */
611 inline bool isAmbisonics (const SpeakerArrangement& arr)
613 if (arr == kAmbi1stOrderACN || arr == kAmbi2cdOrderACN || arr == kAmbi3rdOrderACN)
615 return true;
617 return false;
620 //------------------------------------------------------------------------
621 /** Returns the speaker arrangement associated to a string representation.
622 Returns kEmpty if no associated arrangement is known. */
623 inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
625 if (!strcmp8 (arrStr, kStringMono))
626 return kMono;
627 if (!strcmp8 (arrStr, kStringStereo))
628 return kStereo;
629 if (!strcmp8 (arrStr, kStringStereoR))
630 return kStereoSurround;
631 if (!strcmp8 (arrStr, kStringStereoC))
632 return kStereoCenter;
633 if (!strcmp8 (arrStr, kStringStereoSide))
634 return kStereoSide;
635 if (!strcmp8 (arrStr, kStringStereoCLfe))
636 return kStereoCLfe;
637 if (!strcmp8 (arrStr, kStringStereoTF))
638 return kStereoTF;
639 if (!strcmp8 (arrStr, kStringStereoTS))
640 return kStereoTS;
641 if (!strcmp8 (arrStr, kStringStereoTR))
642 return kStereoTR;
643 if (!strcmp8 (arrStr, kStringStereoBF))
644 return kStereoBF;
645 if (!strcmp8 (arrStr, kStringCineFront))
646 return kCineFront;
647 if (!strcmp8 (arrStr, kString30Cine))
648 return k30Cine;
649 if (!strcmp8 (arrStr, kString30Music))
650 return k30Music;
651 if (!strcmp8 (arrStr, kString31Cine))
652 return k31Cine;
653 if (!strcmp8 (arrStr, kString31Music))
654 return k31Music;
655 if (!strcmp8 (arrStr, kString40Cine))
656 return k40Cine;
657 if (!strcmp8 (arrStr, kString40Music))
658 return k40Music;
659 if (!strcmp8 (arrStr, kString41Cine))
660 return k41Cine;
661 if (!strcmp8 (arrStr, kString41Music))
662 return k41Music;
663 if (!strcmp8 (arrStr, kString50))
664 return k50;
665 if (!strcmp8 (arrStr, kString51))
666 return k51;
667 if (!strcmp8 (arrStr, kString60Cine))
668 return k60Cine;
669 if (!strcmp8 (arrStr, kString60Music))
670 return k60Music;
671 if (!strcmp8 (arrStr, kString61Cine))
672 return k61Cine;
673 if (!strcmp8 (arrStr, kString61Music))
674 return k61Music;
675 if (!strcmp8 (arrStr, kString70Cine) || !strcmp8 (arrStr, kString70CineOld))
676 return k70Cine;
677 if (!strcmp8 (arrStr, kString70Music) || !strcmp8 (arrStr, kString70MusicOld))
678 return k70Music;
679 if (!strcmp8 (arrStr, kString71Cine) || !strcmp8 (arrStr, kString71CineOld))
680 return k71Cine;
681 if (!strcmp8 (arrStr, kString71Music) || !strcmp8 (arrStr, kString71MusicOld))
682 return k71Music;
683 if (!strcmp8 (arrStr, kString71Proximity))
684 return k71Proximity;
685 if (!strcmp8 (arrStr, kString80Cine))
686 return k80Cine;
687 if (!strcmp8 (arrStr, kString80Music))
688 return k80Music;
689 if (!strcmp8 (arrStr, kString81Cine))
690 return k81Cine;
691 if (!strcmp8 (arrStr, kString81Music))
692 return k81Music;
693 if (!strcmp8 (arrStr, kString102))
694 return k102;
695 if (!strcmp8 (arrStr, kString122))
696 return k122;
697 if (!strcmp8 (arrStr, kString80Cube))
698 return k80Cube;
699 if (!strcmp8 (arrStr, kString71CineTopCenter))
700 return k71CineTopCenter;
701 if (!strcmp8 (arrStr, kString71CineCenterHigh))
702 return k71CineCenterHigh;
703 if (!strcmp8 (arrStr, kString71CineFrontHigh))
704 return k71CineFrontHigh;
705 if (!strcmp8 (arrStr, kString71CineSideHigh))
706 return k71CineSideHigh;
707 if (!strcmp8 (arrStr, kString71CineFullRear))
708 return k71CineFullRear;
709 if (!strcmp8 (arrStr, kString90Cine))
710 return k90Cine;
711 if (!strcmp8 (arrStr, kString91Cine))
712 return k91Cine;
713 if (!strcmp8 (arrStr, kString100Cine))
714 return k100Cine;
715 if (!strcmp8 (arrStr, kString101Cine))
716 return k101Cine;
717 if (!strcmp8 (arrStr, kString50_4))
718 return k50_4;
719 if (!strcmp8 (arrStr, kString51_4))
720 return k51_4;
721 if (!strcmp8 (arrStr, kString81MPEG))
722 return k81MPEG3D;
723 if (!strcmp8 (arrStr, kString70_2))
724 return k70_2;
725 if (!strcmp8 (arrStr, kString71_2))
726 return k71_2;
727 if (!strcmp8 (arrStr, kString70_4))
728 return k70_4;
729 if (!strcmp8 (arrStr, kString71_4))
730 return k71_4;
731 if (!strcmp8 (arrStr, kString70_6))
732 return k70_6;
733 if (!strcmp8 (arrStr, kString71_6))
734 return k71_6;
735 if (!strcmp8 (arrStr, kString90_4))
736 return k90_4;
737 if (!strcmp8 (arrStr, kString91_4))
738 return k91_4;
739 if (!strcmp8 (arrStr, kString90_6))
740 return k90_6;
741 if (!strcmp8 (arrStr, kString91_6))
742 return k91_6;
743 if (!strcmp8 (arrStr, kString100))
744 return k100;
745 if (!strcmp8 (arrStr, kString101))
746 return k101;
747 if (!strcmp8 (arrStr, kString110))
748 return k110;
749 if (!strcmp8 (arrStr, kString111))
750 return k111;
751 if (!strcmp8 (arrStr, kString130))
752 return k130;
753 if (!strcmp8 (arrStr, kString131))
754 return k131;
755 if (!strcmp8 (arrStr, kString140))
756 return k140;
757 if (!strcmp8 (arrStr, kString222))
758 return k222;
759 if (!strcmp8 (arrStr, kString220))
760 return k220;
761 if (!strcmp8 (arrStr, kStringAmbi1stOrder))
762 return kAmbi1stOrderACN;
763 if (!strcmp8 (arrStr, kStringAmbi2cdOrder))
764 return kAmbi2cdOrderACN;
765 if (!strcmp8 (arrStr, kStringAmbi3rdOrder))
766 return kAmbi3rdOrderACN;
767 return kEmpty;
770 //------------------------------------------------------------------------
771 /** Returns the string representation of a given speaker arrangement.
772 Returns kStringEmpty if arr is unknown. */
773 inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpeakersName)
775 switch (arr)
777 case kMono: return withSpeakersName ? kStringMonoS : kStringMono;
778 case kStereo: return withSpeakersName ? kStringStereoS : kStringStereo;
779 case kStereoSurround: return withSpeakersName ? kStringStereoRS : kStringStereoR;
780 case kStereoCenter: return withSpeakersName ? kStringStereoCS : kStringStereoC;
781 case kStereoSide: return withSpeakersName ? kStringStereoSS : kStringStereoSide;
782 case kStereoCLfe: return withSpeakersName ? kStringStereoCLfeS: kStringStereoCLfe;
783 case kStereoTF: return withSpeakersName ? kStringStereoTFS : kStringStereoTF;
784 case kStereoTS: return withSpeakersName ? kStringStereoTSS : kStringStereoTS;
785 case kStereoTR: return withSpeakersName ? kStringStereoTRS : kStringStereoTR;
786 case kStereoBF: return withSpeakersName ? kStringStereoBFS : kStringStereoBF;
787 case kCineFront: return withSpeakersName ? kStringCineFrontS : kStringCineFront;
788 case k30Cine: return withSpeakersName ? kString30CineS : kString30Cine;
789 case k30Music: return withSpeakersName ? kString30MusicS : kString30Music;
790 case k31Cine: return withSpeakersName ? kString31CineS : kString31Cine;
791 case k31Music: return withSpeakersName ? kString31MusicS : kString31Music;
792 case k40Cine: return withSpeakersName ? kString40CineS : kString40Cine;
793 case k40Music: return withSpeakersName ? kString40MusicS : kString40Music;
794 case k41Cine: return withSpeakersName ? kString41CineS : kString41Cine;
795 case k41Music: return withSpeakersName ? kString41MusicS : kString41Music;
796 case k50: return withSpeakersName ? kString50S : kString50;
797 case k51: return withSpeakersName ? kString51S : kString51;
798 case k60Cine: return withSpeakersName ? kString60CineS : kString60Cine;
799 case k60Music: return withSpeakersName ? kString60MusicS : kString60Music;
800 case k61Cine: return withSpeakersName ? kString61CineS : kString61Cine;
801 case k61Music: return withSpeakersName ? kString61MusicS : kString61Music;
802 case k70Cine: return withSpeakersName ? kString70CineS : kString70Cine;
803 case k70Music: return withSpeakersName ? kString70MusicS : kString70Music;
804 case k71Cine: return withSpeakersName ? kString71CineS : kString71Cine;
805 case k71Music: return withSpeakersName ? kString71MusicS : kString71Music;
806 case k71Proximity: return withSpeakersName ? kString71ProximityS : kString71Proximity;
807 case k80Cine: return withSpeakersName ? kString80CineS : kString80Cine;
808 case k80Music: return withSpeakersName ? kString80MusicS : kString80Music;
809 case k81Cine: return withSpeakersName ? kString81CineS : kString81Cine;
810 case k81Music: return withSpeakersName ? kString81MusicS : kString81Music;
811 case k81MPEG3D: return withSpeakersName ? kString81MPEGS : kString81MPEG;
812 case k102: return withSpeakersName ? kString102S : kString102;
813 case k122: return withSpeakersName ? kString122S : kString122;
814 case k80Cube: return withSpeakersName ? kString80CubeS : kString80Cube;
815 case k71CineTopCenter: return withSpeakersName ? kString71CineTopCenterS : kString71CineTopCenter;
816 case k71CineCenterHigh: return withSpeakersName ? kString71CineCenterHighS : kString71CineCenterHigh;
817 case k71CineFrontHigh: return withSpeakersName ? kString71CineFrontHighS : kString71CineFrontHigh;
818 case k71CineSideHigh: return withSpeakersName ? kString71CineSideHighS : kString71CineSideHigh;
819 case k71CineFullRear: return withSpeakersName ? kString71CineFullRearS : kString71CineFullRear;
820 case k90Cine: return withSpeakersName ? kString90CineS : kString90Cine;
821 case k91Cine: return withSpeakersName ? kString91CineS : kString91Cine;
822 case k100Cine: return withSpeakersName ? kString100CineS : kString100Cine;
823 case k101Cine: return withSpeakersName ? kString101CineS : kString101Cine;
824 case k100: return withSpeakersName ? kString100S : kString100;
825 case k101: return withSpeakersName ? kString101S : kString101;
826 case k110: return withSpeakersName ? kString110S : kString110;
827 case k111: return withSpeakersName ? kString111S : kString111;
829 case k50_4: return withSpeakersName ? kString50_4S : kString50_4;
830 case k51_4: return withSpeakersName ? kString51_4S : kString51_4;
831 case k70_2: return withSpeakersName ? kString70_2S : kString70_2;
832 case k71_2: return withSpeakersName ? kString71_2S : kString71_2;
833 case k70_4: return withSpeakersName ? kString70_4S : kString70_4;
834 case k71_4: return withSpeakersName ? kString71_4S : kString71_4;
835 case k70_6: return withSpeakersName ? kString70_6S : kString70_6;
836 case k71_6: return withSpeakersName ? kString71_6S : kString71_6;
837 case k90_4: return withSpeakersName ? kString90_4S : kString90_4;
838 case k91_4: return withSpeakersName ? kString91_4S : kString91_4;
839 case k90_6: return withSpeakersName ? kString90_6S : kString90_6;
840 case k91_6: return withSpeakersName ? kString91_6S : kString91_6;
841 case k130: return withSpeakersName ? kString130S : kString130;
842 case k131: return withSpeakersName ? kString131S : kString131;
843 case k140: return withSpeakersName ? kString140S : kString140;
844 case k222: return withSpeakersName ? kString222S : kString222;
845 case k220: return withSpeakersName ? kString220S : kString220;
846 break;
849 if (arr == kAmbi1stOrderACN)
850 return withSpeakersName ? kStringAmbi1stOrderS : kStringAmbi1stOrder;
851 if (arr == kAmbi2cdOrderACN)
852 return withSpeakersName ? kStringAmbi2cdOrderS : kStringAmbi2cdOrder;
853 if (arr == kAmbi3rdOrderACN)
854 return withSpeakersName ? kStringAmbi3rdOrderS : kStringAmbi3rdOrder;
856 return kStringEmpty;
859 //------------------------------------------------------------------------
860 /** Returns a CString representation of a given speaker in a given arrangement */
861 inline CString getSpeakerShortName (const SpeakerArrangement& arr, int32 index)
863 SpeakerArrangement arrTmp = arr;
865 bool found = false;
866 int32 index2 = -1;
867 int32 pos = -1;
868 while (arrTmp)
870 if (arrTmp & 0x1)
871 index2++;
872 pos++;
873 if (index2 == index)
875 found = true;
876 break;
878 arrTmp = arrTmp >> 1;
881 if (!found)
882 return "";
884 Speaker speaker = (Speaker)1 << pos;
885 if (speaker == kSpeakerL)
886 return "L";
887 if (speaker == kSpeakerR)
888 return "R";
889 if (speaker == kSpeakerC)
890 return "C";
891 if (speaker == kSpeakerLfe)
892 return "LFE";
893 if (speaker == kSpeakerLs)
894 return "Ls";
895 if (speaker == kSpeakerRs)
896 return "Rs";
897 if (speaker == kSpeakerLc)
898 return "Lc";
899 if (speaker == kSpeakerRc)
900 return "Rc";
901 if (speaker == kSpeakerCs)
902 return "S";
903 if (speaker == kSpeakerSl)
904 return "Sl";
905 if (speaker == kSpeakerSr)
906 return "Sr";
907 if (speaker == kSpeakerTc)
908 return "Tc";
909 if (speaker == kSpeakerTfl)
910 return "Tfl";
911 if (speaker == kSpeakerTfc)
912 return "Tfc";
913 if (speaker == kSpeakerTfr)
914 return "Tfr";
915 if (speaker == kSpeakerTrl)
916 return "Trl";
917 if (speaker == kSpeakerTrc)
918 return "Trc";
919 if (speaker == kSpeakerTrr)
920 return "Trr";
921 if (speaker == kSpeakerLfe2)
922 return "LFE2";
923 if (speaker == kSpeakerM)
924 return "M";
926 if (speaker == kSpeakerACN0)
927 return "0";
928 if (speaker == kSpeakerACN1)
929 return "1";
930 if (speaker == kSpeakerACN2)
931 return "2";
932 if (speaker == kSpeakerACN3)
933 return "3";
934 if (speaker == kSpeakerACN4)
935 return "4";
936 if (speaker == kSpeakerACN5)
937 return "5";
938 if (speaker == kSpeakerACN6)
939 return "6";
940 if (speaker == kSpeakerACN7)
941 return "7";
942 if (speaker == kSpeakerACN8)
943 return "8";
944 if (speaker == kSpeakerACN9)
945 return "9";
946 if (speaker == kSpeakerACN10)
947 return "10";
948 if (speaker == kSpeakerACN11)
949 return "11";
950 if (speaker == kSpeakerACN12)
951 return "12";
952 if (speaker == kSpeakerACN13)
953 return "13";
954 if (speaker == kSpeakerACN14)
955 return "14";
956 if (speaker == kSpeakerACN15)
957 return "15";
959 if (speaker == kSpeakerTsl)
960 return "Tsl";
961 if (speaker == kSpeakerTsr)
962 return "Tsr";
963 if (speaker == kSpeakerLcs)
964 return "Lcs";
965 if (speaker == kSpeakerRcs)
966 return "Rcs";
968 if (speaker == kSpeakerBfl)
969 return "Bfl";
970 if (speaker == kSpeakerBfc)
971 return "Bfc";
972 if (speaker == kSpeakerBfr)
973 return "Bfr";
974 if (speaker == kSpeakerPl)
975 return "Pl";
976 if (speaker == kSpeakerPr)
977 return "Pr";
978 if (speaker == kSpeakerBsl)
979 return "Bsl";
980 if (speaker == kSpeakerBsr)
981 return "Bsr";
982 if (speaker == kSpeakerBrl)
983 return "Brl";
984 if (speaker == kSpeakerBrc)
985 return "Brc";
986 if (speaker == kSpeakerBrr)
987 return "Brr";
989 return "";
992 /*@}*/
994 //------------------------------------------------------------------------
995 } // namespace SpeakerArr
996 } // namespace Vst
997 } // namespace Steinberg