Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

vstspeaker.h 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  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. //-----------------------------------------------------------------------------
  16. #pragma once
  17. #include "vsttypes.h"
  18. //#include "pluginterfaces/base/ftype.h"
  19. //------------------------------------------------------------------------
  20. namespace Steinberg {
  21. namespace Vst {
  22. //------------------------------------------------------------------------
  23. /** \defgroup speakerArrangements Speaker Arrangements
  24. \image html "vst3_speaker_types.jpg"
  25. \n
  26. A SpeakerArrangement is a bitset combination of speakers. For example:
  27. \code
  28. const SpeakerArrangement kStereo = kSpeakerL | kSpeakerR; // => hex: 0x03 / binary: 0011.
  29. \endcode*/
  30. //------------------------------------------------------------------------
  31. //------------------------------------------------------------------------
  32. /** Speaker Definitions.
  33. \ingroup speakerArrangements */
  34. //------------------------------------------------------------------------
  35. /**@{*/
  36. const Speaker kSpeakerL = 1 << 0; ///< Left (L)
  37. const Speaker kSpeakerR = 1 << 1; ///< Right (R)
  38. const Speaker kSpeakerC = 1 << 2; ///< Center (C)
  39. const Speaker kSpeakerLfe = 1 << 3; ///< Subbass (Lfe)
  40. const Speaker kSpeakerLs = 1 << 4; ///< Left Surround (Ls)
  41. const Speaker kSpeakerRs = 1 << 5; ///< Right Surround (Rs)
  42. const Speaker kSpeakerLc = 1 << 6; ///< Left of Center (Lc) - Front Left Center
  43. const Speaker kSpeakerRc = 1 << 7; ///< Right of Center (Rc) - Front Right Center
  44. const Speaker kSpeakerS = 1 << 8; ///< Surround (S)
  45. const Speaker kSpeakerCs = kSpeakerS; ///< Center of Surround (Cs) - Back Center - Surround (S)
  46. const Speaker kSpeakerSl = 1 << 9; ///< Side Left (Sl)
  47. const Speaker kSpeakerSr = 1 << 10; ///< Side Right (Sr)
  48. const Speaker kSpeakerTc = 1 << 11; ///< Top Center Over-head, Top Middle (Tc)
  49. const Speaker kSpeakerTfl = 1 << 12; ///< Top Front Left (Tfl)
  50. const Speaker kSpeakerTfc = 1 << 13; ///< Top Front Center (Tfc)
  51. const Speaker kSpeakerTfr = 1 << 14; ///< Top Front Right (Tfr)
  52. const Speaker kSpeakerTrl = 1 << 15; ///< Top Rear/Back Left (Trl)
  53. const Speaker kSpeakerTrc = 1 << 16; ///< Top Rear/Back Center (Trc)
  54. const Speaker kSpeakerTrr = 1 << 17; ///< Top Rear/Back Right (Trr)
  55. const Speaker kSpeakerLfe2 = 1 << 18; ///< Subbass 2 (Lfe2)
  56. const Speaker kSpeakerM = 1 << 19; ///< Mono (M)
  57. const Speaker kSpeakerACN0 = (Speaker)1 << 20; ///< Ambisonic ACN 0
  58. const Speaker kSpeakerACN1 = (Speaker)1 << 21; ///< Ambisonic ACN 1
  59. const Speaker kSpeakerACN2 = (Speaker)1 << 22; ///< Ambisonic ACN 2
  60. const Speaker kSpeakerACN3 = (Speaker)1 << 23; ///< Ambisonic ACN 3
  61. const Speaker kSpeakerACN4 = (Speaker)1 << 38; ///< Ambisonic ACN 4
  62. const Speaker kSpeakerACN5 = (Speaker)1 << 39; ///< Ambisonic ACN 5
  63. const Speaker kSpeakerACN6 = (Speaker)1 << 40; ///< Ambisonic ACN 6
  64. const Speaker kSpeakerACN7 = (Speaker)1 << 41; ///< Ambisonic ACN 7
  65. const Speaker kSpeakerACN8 = (Speaker)1 << 42; ///< Ambisonic ACN 8
  66. const Speaker kSpeakerACN9 = (Speaker)1 << 43; ///< Ambisonic ACN 9
  67. const Speaker kSpeakerACN10 = (Speaker)1 << 44; ///< Ambisonic ACN 10
  68. const Speaker kSpeakerACN11 = (Speaker)1 << 45; ///< Ambisonic ACN 11
  69. const Speaker kSpeakerACN12 = (Speaker)1 << 46; ///< Ambisonic ACN 12
  70. const Speaker kSpeakerACN13 = (Speaker)1 << 47; ///< Ambisonic ACN 13
  71. const Speaker kSpeakerACN14 = (Speaker)1 << 48; ///< Ambisonic ACN 14
  72. const Speaker kSpeakerACN15 = (Speaker)1 << 49; ///< Ambisonic ACN 15
  73. const Speaker kSpeakerTsl = 1 << 24; ///< Top Side Left (Tsl)
  74. const Speaker kSpeakerTsr = 1 << 25; ///< Top Side Right (Tsr)
  75. const Speaker kSpeakerLcs = 1 << 26; ///< Left of Center Surround (Lcs) - Back Left Center
  76. const Speaker kSpeakerRcs = 1 << 27; ///< Right of Center Surround (Rcs) - Back Right Center
  77. const Speaker kSpeakerBfl = 1 << 28; ///< Bottom Front Left (Bfl)
  78. const Speaker kSpeakerBfc = 1 << 29; ///< Bottom Front Center (Bfc)
  79. const Speaker kSpeakerBfr = 1 << 30; ///< Bottom Front Right (Bfr)
  80. const Speaker kSpeakerPl = (Speaker)1 << 31; ///< Proximity Left (Pl)
  81. const Speaker kSpeakerPr = (Speaker)1 << 32; ///< Proximity Right (Pr)
  82. const Speaker kSpeakerBsl = (Speaker)1 << 33; ///< Bottom Side Left (Bsl)
  83. const Speaker kSpeakerBsr = (Speaker)1 << 34; ///< Bottom Side Right (Bsr)
  84. const Speaker kSpeakerBrl = (Speaker)1 << 35; ///< Bottom Rear Left (Brl)
  85. const Speaker kSpeakerBrc = (Speaker)1 << 36; ///< Bottom Rear Center (Brc)
  86. const Speaker kSpeakerBrr = (Speaker)1 << 37; ///< Bottom Rear Right (Brr)
  87. //------------------------------------------------------------------------
  88. /** @}*/
  89. //------------------------------------------------------------------------
  90. /** Speaker Arrangement Definitions (SpeakerArrangement)*/
  91. //------------------------------------------------------------------------
  92. namespace SpeakerArr
  93. {
  94. //------------------------------------------------------------------------
  95. /** Speaker Arrangement Definitions.
  96. \ingroup speakerArrangements */
  97. /*@{*/
  98. const SpeakerArrangement kEmpty = 0; ///< empty arrangement
  99. const SpeakerArrangement kMono = kSpeakerM; ///< M
  100. const SpeakerArrangement kStereo = kSpeakerL | kSpeakerR; ///< L R
  101. const SpeakerArrangement kStereoSurround = kSpeakerLs | kSpeakerRs; ///< Ls Rs
  102. const SpeakerArrangement kStereoCenter = kSpeakerLc | kSpeakerRc; ///< Lc Rc
  103. const SpeakerArrangement kStereoSide = kSpeakerSl | kSpeakerSr; ///< Sl Sr
  104. const SpeakerArrangement kStereoCLfe = kSpeakerC | kSpeakerLfe; ///< C Lfe
  105. const SpeakerArrangement kStereoTF = kSpeakerTfl | kSpeakerTfr; ///< Tfl Tfr
  106. const SpeakerArrangement kStereoTS = kSpeakerTsl | kSpeakerTsr; ///< Tsl Tsr
  107. const SpeakerArrangement kStereoTR = kSpeakerTrl | kSpeakerTrr; ///< Trl Trr
  108. const SpeakerArrangement kStereoBF = kSpeakerBfl | kSpeakerBfr; ///< Bfl Bfr
  109. /** L R C */
  110. const SpeakerArrangement k30Cine = kSpeakerL | kSpeakerR | kSpeakerC;
  111. /** L R S */
  112. const SpeakerArrangement k30Music = kSpeakerL | kSpeakerR | kSpeakerS;
  113. /** L R C Lfe */
  114. const SpeakerArrangement k31Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe;
  115. /** L R Lfe S */
  116. const SpeakerArrangement k31Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerS;
  117. /** L R C S (LCRS) */
  118. const SpeakerArrangement k40Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerS;
  119. /** L R Ls Rs (Quadro) */
  120. const SpeakerArrangement k40Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs;
  121. /** L R C Lfe S (LCRS+Lfe) */
  122. const SpeakerArrangement k41Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerS;
  123. /** L R Lfe Ls Rs (Quadro+Lfe) */
  124. const SpeakerArrangement k41Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
  125. /** L R C Ls Rs */
  126. const SpeakerArrangement k50 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs;
  127. /** L R C Lfe Ls Rs */
  128. const SpeakerArrangement k51 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs;
  129. /** L R C Ls Rs Cs */
  130. const SpeakerArrangement k60Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs;
  131. /** L R Ls Rs Sl Sr */
  132. const SpeakerArrangement k60Music = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
  133. /** L R C Lfe Ls Rs Cs */
  134. const SpeakerArrangement k61Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs;
  135. /** L R Lfe Ls Rs Sl Sr */
  136. const SpeakerArrangement k61Music = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
  137. /** L R C Ls Rs Lc Rc */
  138. const SpeakerArrangement k70Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
  139. /** L R C Ls Rs Sl Sr */
  140. const SpeakerArrangement k70Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
  141. /** L R C Lfe Ls Rs Lc Rc */
  142. const SpeakerArrangement k71Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc;
  143. const SpeakerArrangement k71CineFullFront= k71Cine;
  144. /** L R C Lfe Ls Rs Lcs Rcs */
  145. const SpeakerArrangement k71CineFullRear = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLcs | kSpeakerRcs;
  146. /** L R C Lfe Ls Rs Sl Sr */
  147. const SpeakerArrangement k71Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr;
  148. const SpeakerArrangement k71CineSideFill = k71Music;
  149. /** L R C Lfe Ls Rs Pl Pr */
  150. const SpeakerArrangement k71Proximity = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerPl | kSpeakerPr;
  151. /** L R C Ls Rs Lc Rc Cs */
  152. const SpeakerArrangement k80Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
  153. /** L R C Ls Rs Cs Sl Sr */
  154. const SpeakerArrangement k80Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
  155. /** L R C Lfe Ls Rs Lc Rc Cs */
  156. const SpeakerArrangement k81Cine = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs;
  157. /** L R C Lfe Ls Rs Cs Sl Sr */
  158. const SpeakerArrangement k81Music = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerSl | kSpeakerSr;
  159. /** First-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
  160. const SpeakerArrangement kAmbi1stOrderACN = kSpeakerACN0 | kSpeakerACN1 | kSpeakerACN2 | kSpeakerACN3;
  161. /** Second-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
  162. const SpeakerArrangement kAmbi2cdOrderACN = kAmbi1stOrderACN | kSpeakerACN4 | kSpeakerACN5 | kSpeakerACN6 | kSpeakerACN7 | kSpeakerACN8;
  163. /** Third-Order with Ambisonic Channel Number (ACN) ordering and SN3D normalization */
  164. const SpeakerArrangement kAmbi3rdOrderACN = kAmbi2cdOrderACN | kSpeakerACN9 | kSpeakerACN10 | kSpeakerACN11 | kSpeakerACN12 | kSpeakerACN13 | kSpeakerACN14 | kSpeakerACN15;
  165. /*-----------*/
  166. /* 3D formats */
  167. /*-----------*/
  168. /** L R Ls Rs Tfl Tfr Trl Trr */
  169. const SpeakerArrangement k80Cube = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerTfl| kSpeakerTfr| kSpeakerTrl | kSpeakerTrr;
  170. /** L R C Lfe Ls Rs Cs Tc */
  171. const SpeakerArrangement k71CineTopCenter = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerTc;
  172. /** L R C Lfe Ls Rs Cs Tfc */
  173. const SpeakerArrangement k71CineCenterHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerCs | kSpeakerTfc;
  174. /** L R C Lfe Ls Rs Tfl Tfr */
  175. const SpeakerArrangement k71CineFrontHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTfl | kSpeakerTfr;
  176. const SpeakerArrangement k71MPEG3D = k71CineFrontHigh;
  177. /** L R C Lfe Ls Rs Tsl Tsr */
  178. const SpeakerArrangement k71CineSideHigh = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerTsl | kSpeakerTsr;
  179. /** L R Lfe Ls Rs Tfl Tfc Tfr Bfc */
  180. const SpeakerArrangement k81MPEG3D = kSpeakerL | kSpeakerR | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
  181. kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerBfc;
  182. /** L R C Ls Rs Tfl Tfr Trl Trr */
  183. const SpeakerArrangement k90 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
  184. kSpeakerTfl| kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  185. const SpeakerArrangement k50_4 = k90;
  186. /** L R C Lfe Ls Rs Tfl Tfr Trl Trr */
  187. const SpeakerArrangement k91 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
  188. kSpeakerTfl| kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  189. const SpeakerArrangement k51_4 = k91;
  190. /** L R C Lfe Ls Rs Sl Sr Tsl Tsr */
  191. const SpeakerArrangement k71_2 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs |
  192. kSpeakerRs | kSpeakerSl | kSpeakerSr | kSpeakerTsl | kSpeakerTsr;
  193. const SpeakerArrangement k91Atmos = k71_2;
  194. /** L R C Ls Rs Tc Tfl Tfr Trl Trr */
  195. const SpeakerArrangement k100 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
  196. kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  197. /** L R C Lfe Ls Rs Tc Tfl Tfr Trl Trr */
  198. const SpeakerArrangement k101 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
  199. kSpeakerTc | kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  200. const SpeakerArrangement k101MPEG3D = k101;
  201. /** L R C Lfe Ls Rs Tfl Tfc Tfr Trl Trr Lfe2 */
  202. const SpeakerArrangement k102 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
  203. kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
  204. /** L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr */
  205. const SpeakerArrangement k110 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs |
  206. kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  207. /** L R C Lfe Ls Rs Tc Tfl Tfc Tfr Trl Trr */
  208. const SpeakerArrangement k111 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs |
  209. kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  210. /** L R C Ls Rs Sl Sr Tfl Tfr Trl Trr */
  211. const SpeakerArrangement k70_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
  212. kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  213. /** L R C Lfe Ls Rs Sl Sr Tfl Tfr Trl Trr */
  214. const SpeakerArrangement k71_4 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
  215. kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  216. const SpeakerArrangement k111MPEG3D = k71_4;
  217. /** L R C Lfe Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr Lfe2 */
  218. const SpeakerArrangement k122 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc |
  219. kSpeakerTfl| kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr | kSpeakerLfe2;
  220. /** L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */
  221. const SpeakerArrangement k130 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
  222. kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  223. /** L R C Lfe Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr */
  224. const SpeakerArrangement k131 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
  225. kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr;
  226. /** L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr */
  227. const SpeakerArrangement k140 = kSpeakerL | kSpeakerR | kSpeakerLs | kSpeakerRs | kSpeakerSl | kSpeakerSr |
  228. kSpeakerTfl | kSpeakerTfr | kSpeakerTrl | kSpeakerTrr |
  229. kSpeakerBfl | kSpeakerBfr | kSpeakerBrl | kSpeakerBrr;
  230. /** L R C Lfe Ls Rs Lc Rc Cs Sl Sr Tc Tfl Tfc Tfr Trl Trc Trr Lfe2 Tsl Tsr Bfl Bfc Bfr */
  231. const SpeakerArrangement k222 = kSpeakerL | kSpeakerR | kSpeakerC | kSpeakerLfe | kSpeakerLs | kSpeakerRs | kSpeakerLc | kSpeakerRc | kSpeakerCs | kSpeakerSl | kSpeakerSr |
  232. kSpeakerTc | kSpeakerTfl | kSpeakerTfc | kSpeakerTfr | kSpeakerTrl | kSpeakerTrc | kSpeakerTrr | kSpeakerLfe2 | kSpeakerTsl | kSpeakerTsr |
  233. kSpeakerBfl| kSpeakerBfc | kSpeakerBfr;
  234. //------------------------------------------------------------------------
  235. /** Speaker Arrangement String Representation.
  236. \ingroup speakerArrangements */
  237. /*@{*/
  238. const CString kStringEmpty = "";
  239. const CString kStringMono = "Mono";
  240. const CString kStringStereo = "Stereo";
  241. const CString kStringStereoR = "Stereo (Ls Rs)";
  242. const CString kStringStereoC = "Stereo (Lc Rc)";
  243. const CString kStringStereoSide = "Stereo (Sl Sr)";
  244. const CString kStringStereoCLfe = "Stereo (C LFE)";
  245. const CString kStringStereoTF = "Stereo (Tfl Tfr)";
  246. const CString kStringStereoTS = "Stereo (Tsl Tsr)";
  247. const CString kStringStereoTR = "Stereo (Trl Trr)";
  248. const CString kStringStereoBF = "Stereo (Bfl Bfr)";
  249. const CString kString30Cine = "LRC";
  250. const CString kString30Music = "LRS";
  251. const CString kString31Cine = "LRC+LFE";
  252. const CString kString31Music = "LRS+LFE";
  253. const CString kString40Cine = "LRCS";
  254. const CString kString40Music = "Quadro";
  255. const CString kString41Cine = "LRCS+LFE";
  256. const CString kString41Music = "Quadro+LFE";
  257. const CString kString50 = "5.0";
  258. const CString kString51 = "5.1";
  259. const CString kString60Cine = "6.0 Cine";
  260. const CString kString60Music = "6.0 Music";
  261. const CString kString61Cine = "6.1 Cine";
  262. const CString kString61Music = "6.1 Music";
  263. const CString kString70Cine = "7.0 Cine (SDDS)";
  264. const CString kString70Music = "7.0 Music (Dolby)";
  265. const CString kString71Cine = "7.1 Cine (SDDS)";
  266. const CString kString71Music = "7.1 Music (Dolby)";
  267. const CString kString71CineTopCenter = "7.1 Cine Top Center";
  268. const CString kString71CineCenterHigh = "7.1 Cine Center High";
  269. const CString kString71CineFrontHigh = "7.1 Cine Front High";
  270. const CString kString71CineSideHigh = "7.1 Cine Side High";
  271. const CString kString71CineFullRear = "7.1 Cine Full Rear";
  272. const CString kString71Proximity = "7.1 Proximity";
  273. const CString kString80Cine = "8.0 Cine";
  274. const CString kString80Music = "8.0 Music";
  275. const CString kString80Cube = "8.0 Cube";
  276. const CString kString81Cine = "8.1 Cine";
  277. const CString kString81Music = "8.1 Music";
  278. const CString kString102 = "10.2 Experimental";
  279. const CString kString122 = "12.2";
  280. const CString kString50_4 = "5.0.4";
  281. const CString kString51_4 = "5.1.4";
  282. const CString kString91Atmos = "9.1 Dolby Atmos";
  283. const CString kString100 = "10.0 Auro-3D";
  284. const CString kString101 = "10.1 Auro-3D";
  285. const CString kString110 = "11.0 Auro-3D";
  286. const CString kString111 = "11.1 Auro-3D";
  287. const CString kString130 = "13.0 Auro-3D";
  288. const CString kString131 = "13.1 Auro-3D";
  289. const CString kString81MPEG = "8.1 MPEG";
  290. const CString kString70_4 = "7.0.4";
  291. const CString kString71_4 = "7.1.4";
  292. const CString kString140 = "14.0";
  293. const CString kString222 = "22.2";
  294. const CString kStringAmbi1stOrder = "1st Order Ambisonics";
  295. const CString kStringAmbi2cdOrder = "2nd Order Ambisonics";
  296. const CString kStringAmbi3rdOrder = "3rd Order Ambisonics";
  297. /*@}*/
  298. //------------------------------------------------------------------------
  299. /** Speaker Arrangement String Representation with Speakers Name.
  300. \ingroup speakerArrangements */
  301. /*@{*/
  302. const CString kStringMonoS = "M";
  303. const CString kStringStereoS = "L R";
  304. const CString kStringStereoRS = "Ls Rs";
  305. const CString kStringStereoCS = "Lc Rc";
  306. const CString kStringStereoSS = "Sl Sr";
  307. const CString kStringStereoCLfeS= "C LFE";
  308. const CString kStringStereoTFS = "Tfl Tfr";
  309. const CString kStringStereoTSS = "Tsl Tsr";
  310. const CString kStringStereoTRS = "Trl Trr";
  311. const CString kStringStereoBFS = "Bfl Bfr";
  312. const CString kString30CineS = "L R C";
  313. const CString kString30MusicS = "L R S";
  314. const CString kString31CineS = "L R C LFE";
  315. const CString kString31MusicS = "L R LFE S";
  316. const CString kString40CineS = "L R C S";
  317. const CString kString40MusicS = "L R Ls Rs";
  318. const CString kString41CineS = "L R C LFE S";
  319. const CString kString41MusicS = "L R LFE Ls Rs";
  320. const CString kString50S = "L R C Ls Rs";
  321. const CString kString51S = "L R C LFE Ls Rs";
  322. const CString kString60CineS = "L R C Ls Rs Cs";
  323. const CString kString60MusicS = "L R Ls Rs Sl Sr";
  324. const CString kString61CineS = "L R C LFE Ls Rs Cs";
  325. const CString kString61MusicS = "L R LFE Ls Rs Sl Sr";
  326. const CString kString70CineS = "L R C Ls Rs Lc Rc";
  327. const CString kString70MusicS = "L R C Ls Rs Sl Sr";
  328. const CString kString71CineS = "L R C LFE Ls Rs Lc Rc";
  329. const CString kString71MusicS = "L R C LFE Ls Rs Sl Sr";
  330. const CString kString80CineS = "L R C Ls Rs Lc Rc Cs";
  331. const CString kString80MusicS = "L R C Ls Rs Cs Sl Sr";
  332. const CString kString81CineS = "L R C LFE Ls Rs Lc Rc Cs";
  333. const CString kString81MusicS = "L R C LFE Ls Rs Cs Sl Sr";
  334. const CString kString80CubeS = "L R Ls Rs Tfl Tfr Trl Trr";
  335. const CString kString71CineTopCenterS = "L R C LFE Ls Rs Cs Tc";
  336. const CString kString71CineCenterHighS = "L R C LFE Ls Rs Cs Tfc";
  337. const CString kString71CineFrontHighS = "L R C LFE Ls Rs Tfl Tfl";
  338. const CString kString71CineSideHighS = "L R C LFE Ls Rs Tsl Tsl";
  339. const CString kString71CineFullRearS = "L R C LFE Ls Rs Lcs Rcs";
  340. const CString kString71ProximityS = "L R C LFE Ls Rs Pl Pr";
  341. const CString kString50_4S = "L R C Ls Rs Tfl Tfr Trl Trr";
  342. const CString kString51_4S = "L R C LFE Ls Rs Tfl Tfr Trl Trr";
  343. const CString kString91AtmosS = "L R C LFE Ls Rs Sl Sr Tsl Tsr";
  344. const CString kString100S = "L R C Ls Rs Tc Tfl Tfr Trl Trr";
  345. const CString kString101S = "L R C LFE Ls Rs Tc Tfl Tfr Trl Trr";
  346. const CString kString110S = "L R C Ls Rs Tc Tfl Tfc Tfr Trl Trr";
  347. const CString kString111S = "L R C LFE Ls Rs Tc Tfl Tfc Tfr Trl Trr";
  348. const CString kStringk70_4S = "L R C Ls Rs Sl Sr Tfl Tfr Trl Trr";
  349. const CString kStringk71_4S = "L R C LFE Ls Rs Sl Sr Tfl Tfr Trl Trr";
  350. const CString kString130S = "L R C Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
  351. const CString kString131S = "L R C LFE Ls Rs Sl Sr Tc Tfl Tfc Tfr Trl Trr";
  352. const CString kString102S = "L R C LFE Ls Rs Tfl Tfc Tfr Trl Trr LFE2";
  353. const CString kString122S = "L R C LFE Ls Rs Lc Rc Tfl Tfc Tfr Trl Trr LFE2";
  354. const CString kString81MPEGS = "L R LFE Ls Rs Tfl Tfc Tfr Bfc";
  355. const CString kString140S = "L R Ls Rs Sl Sr Tfl Tfr Trl Trr Bfl Bfr Brl Brr";
  356. 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";
  357. const CString kStringAmbi1stOrderS = "0 1 2 3";
  358. const CString kStringAmbi2cdOrderS = "0 1 2 3 4 5 6 7 8";
  359. const CString kStringAmbi3rdOrderS = "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15";
  360. /*@}*/
  361. //------------------------------------------------------------------------
  362. /** Returns number of channels used in speaker arrangement.
  363. \ingroup speakerArrangements */
  364. /*@{*/
  365. inline int32 getChannelCount (SpeakerArrangement arr)
  366. {
  367. int32 count = 0;
  368. while (arr)
  369. {
  370. if (arr & (SpeakerArrangement)1)
  371. ++count;
  372. arr >>= 1;
  373. }
  374. return count;
  375. }
  376. //------------------------------------------------------------------------
  377. /** Returns the index of a given speaker in a speaker arrangement (-1 if speaker is not part of the
  378. * arrangement). */
  379. inline int32 getSpeakerIndex (Speaker speaker, SpeakerArrangement arrangement)
  380. {
  381. // check if speaker is present in arrangement
  382. if ((arrangement & speaker) == 0)
  383. return -1;
  384. int32 result = 0;
  385. Speaker i = 1;
  386. while (i < speaker)
  387. {
  388. if (arrangement & i)
  389. result++;
  390. i <<= 1;
  391. }
  392. return result;
  393. }
  394. //------------------------------------------------------------------------
  395. /** Returns the speaker for a given index in a speaker arrangement (return 0 when out of range). */
  396. inline Speaker getSpeaker (const SpeakerArrangement& arr, int32 index)
  397. {
  398. SpeakerArrangement arrTmp = arr;
  399. int32 index2 = -1;
  400. int32 pos = -1;
  401. while (arrTmp)
  402. {
  403. if (arrTmp & 0x1)
  404. index2++;
  405. pos++;
  406. if (index2 == index)
  407. return (Speaker)1 << pos;
  408. arrTmp = arrTmp >> 1;
  409. }
  410. return 0;
  411. }
  412. //------------------------------------------------------------------------
  413. /** Returns true if arrSubSet is a subset speaker of arr (means each speaker of arrSubSet is
  414. * included in arr). */
  415. inline bool isSubsetOf (const SpeakerArrangement& arrSubSet, const SpeakerArrangement& arr)
  416. {
  417. return (arrSubSet == (arrSubSet & arr));
  418. }
  419. //------------------------------------------------------------------------
  420. /** Returns true if arrangement is a Auro configuration. */
  421. inline bool isAuro (const SpeakerArrangement& arr)
  422. {
  423. if (arr == k90 || arr == k91 || arr == k100 || arr == k101 || arr == k110 || arr == k111 ||
  424. arr == k130 || arr == k131)
  425. {
  426. return true;
  427. }
  428. return false;
  429. }
  430. //------------------------------------------------------------------------
  431. /** Returns true if arrangement is a Auro configuration. */
  432. inline bool isAmbisonics (const SpeakerArrangement& arr)
  433. {
  434. if (arr == kAmbi1stOrderACN || arr == kAmbi2cdOrderACN || arr == kAmbi3rdOrderACN)
  435. {
  436. return true;
  437. }
  438. return false;
  439. }
  440. //------------------------------------------------------------------------
  441. /** Returns the speaker arrangement associated to a string representation.
  442. Returns kEmpty if no associated arrangement is known.
  443. */
  444. inline SpeakerArrangement getSpeakerArrangementFromString (CString arrStr)
  445. {
  446. if (!strcmp8 (arrStr, kStringMono))
  447. return kMono;
  448. if (!strcmp8 (arrStr, kStringStereo))
  449. return kStereo;
  450. if (!strcmp8 (arrStr, kStringStereoR))
  451. return kStereoSurround;
  452. if (!strcmp8 (arrStr, kStringStereoC))
  453. return kStereoCenter;
  454. if (!strcmp8 (arrStr, kStringStereoSide))
  455. return kStereoSide;
  456. if (!strcmp8 (arrStr, kStringStereoCLfe))
  457. return kStereoCLfe;
  458. if (!strcmp8 (arrStr, kStringStereoTF))
  459. return kStereoTF;
  460. if (!strcmp8 (arrStr, kStringStereoTS))
  461. return kStereoTS;
  462. if (!strcmp8 (arrStr, kStringStereoTR))
  463. return kStereoTR;
  464. if (!strcmp8 (arrStr, kStringStereoBF))
  465. return kStereoBF;
  466. if (!strcmp8 (arrStr, kString30Cine))
  467. return k30Cine;
  468. if (!strcmp8 (arrStr, kString30Music))
  469. return k30Music;
  470. if (!strcmp8 (arrStr, kString31Cine))
  471. return k31Cine;
  472. if (!strcmp8 (arrStr, kString31Music))
  473. return k31Music;
  474. if (!strcmp8 (arrStr, kString40Cine))
  475. return k40Cine;
  476. if (!strcmp8 (arrStr, kString40Music))
  477. return k40Music;
  478. if (!strcmp8 (arrStr, kString41Cine))
  479. return k41Cine;
  480. if (!strcmp8 (arrStr, kString41Music))
  481. return k41Music;
  482. if (!strcmp8 (arrStr, kString50))
  483. return k50;
  484. if (!strcmp8 (arrStr, kString51))
  485. return k51;
  486. if (!strcmp8 (arrStr, kString60Cine))
  487. return k60Cine;
  488. if (!strcmp8 (arrStr, kString60Music))
  489. return k60Music;
  490. if (!strcmp8 (arrStr, kString61Cine))
  491. return k61Cine;
  492. if (!strcmp8 (arrStr, kString61Music))
  493. return k61Music;
  494. if (!strcmp8 (arrStr, kString70Cine))
  495. return k70Cine;
  496. if (!strcmp8 (arrStr, kString70Music))
  497. return k70Music;
  498. if (!strcmp8 (arrStr, kString71Cine))
  499. return k71Cine;
  500. if (!strcmp8 (arrStr, kString71Music))
  501. return k71Music;
  502. if (!strcmp8 (arrStr, kString71Proximity))
  503. return k71Proximity;
  504. if (!strcmp8 (arrStr, kString80Cine))
  505. return k80Cine;
  506. if (!strcmp8 (arrStr, kString80Music))
  507. return k80Music;
  508. if (!strcmp8 (arrStr, kString81Cine))
  509. return k81Cine;
  510. if (!strcmp8 (arrStr, kString81Music))
  511. return k81Music;
  512. if (!strcmp8 (arrStr, kString102))
  513. return k102;
  514. if (!strcmp8 (arrStr, kString122))
  515. return k122;
  516. if (!strcmp8 (arrStr, kString80Cube))
  517. return k80Cube;
  518. if (!strcmp8 (arrStr, kString71CineTopCenter))
  519. return k71CineTopCenter;
  520. if (!strcmp8 (arrStr, kString71CineCenterHigh))
  521. return k71CineCenterHigh;
  522. if (!strcmp8 (arrStr, kString71CineFrontHigh))
  523. return k71CineFrontHigh;
  524. if (!strcmp8 (arrStr, kString71CineSideHigh))
  525. return k71CineSideHigh;
  526. if (!strcmp8 (arrStr, kString71CineFullRear))
  527. return k71CineFullRear;
  528. if (!strcmp8 (arrStr, kString50_4))
  529. return k50_4;
  530. if (!strcmp8 (arrStr, kString51_4))
  531. return k51_4;
  532. if (!strcmp8 (arrStr, kString81MPEG))
  533. return k81MPEG3D;
  534. if (!strcmp8 (arrStr, kString91Atmos))
  535. return k91Atmos;
  536. if (!strcmp8 (arrStr, kString100))
  537. return k100;
  538. if (!strcmp8 (arrStr, kString101))
  539. return k101;
  540. if (!strcmp8 (arrStr, kString110))
  541. return k110;
  542. if (!strcmp8 (arrStr, kString111))
  543. return k111;
  544. if (!strcmp8 (arrStr, kString70_4))
  545. return k70_4;
  546. if (!strcmp8 (arrStr, kString71_4))
  547. return k71_4;
  548. if (!strcmp8 (arrStr, kString130))
  549. return k130;
  550. if (!strcmp8 (arrStr, kString131))
  551. return k131;
  552. if (!strcmp8 (arrStr, kString140))
  553. return k140;
  554. if (!strcmp8 (arrStr, kString222))
  555. return k222;
  556. if (!strcmp8 (arrStr, kStringAmbi1stOrder))
  557. return kAmbi1stOrderACN;
  558. if (!strcmp8 (arrStr, kStringAmbi2cdOrder))
  559. return kAmbi2cdOrderACN;
  560. if (!strcmp8 (arrStr, kStringAmbi3rdOrder))
  561. return kAmbi3rdOrderACN;
  562. return kEmpty;
  563. }
  564. //------------------------------------------------------------------------
  565. /** Returns the string representation of a given speaker arrangement.
  566. Returns kStringEmpty if arr is unknown.
  567. */
  568. inline CString getSpeakerArrangementString (SpeakerArrangement arr, bool withSpeakersName)
  569. {
  570. switch (arr)
  571. {
  572. case kMono: return withSpeakersName ? kStringMonoS : kStringMono;
  573. case kStereo: return withSpeakersName ? kStringStereoS : kStringStereo;
  574. case kStereoSurround: return withSpeakersName ? kStringStereoRS : kStringStereoR;
  575. case kStereoCenter: return withSpeakersName ? kStringStereoCS : kStringStereoC;
  576. case kStereoSide: return withSpeakersName ? kStringStereoSS : kStringStereoSide;
  577. case kStereoCLfe: return withSpeakersName ? kStringStereoCLfeS: kStringStereoCLfe;
  578. case kStereoTF: return withSpeakersName ? kStringStereoTFS : kStringStereoTF;
  579. case kStereoTS: return withSpeakersName ? kStringStereoTSS : kStringStereoTS;
  580. case kStereoTR: return withSpeakersName ? kStringStereoTRS : kStringStereoTR;
  581. case kStereoBF: return withSpeakersName ? kStringStereoBFS : kStringStereoBF;
  582. case k30Cine: return withSpeakersName ? kString30CineS : kString30Cine;
  583. case k30Music: return withSpeakersName ? kString30MusicS : kString30Music;
  584. case k31Cine: return withSpeakersName ? kString31CineS : kString31Cine;
  585. case k31Music: return withSpeakersName ? kString31MusicS : kString31Music;
  586. case k40Cine: return withSpeakersName ? kString40CineS : kString40Cine;
  587. case k40Music: return withSpeakersName ? kString40MusicS : kString40Music;
  588. case k41Cine: return withSpeakersName ? kString41CineS : kString41Cine;
  589. case k41Music: return withSpeakersName ? kString41MusicS : kString41Music;
  590. case k50: return withSpeakersName ? kString50S : kString50;
  591. case k51: return withSpeakersName ? kString51S : kString51;
  592. case k60Cine: return withSpeakersName ? kString60CineS : kString60Cine;
  593. case k60Music: return withSpeakersName ? kString60MusicS : kString60Music;
  594. case k61Cine: return withSpeakersName ? kString61CineS : kString61Cine;
  595. case k61Music: return withSpeakersName ? kString61MusicS : kString61Music;
  596. case k70Cine: return withSpeakersName ? kString70CineS : kString70Cine;
  597. case k70Music: return withSpeakersName ? kString70MusicS : kString70Music;
  598. case k71Cine: return withSpeakersName ? kString71CineS : kString71Cine;
  599. case k71Music: return withSpeakersName ? kString71MusicS : kString71Music;
  600. case k71Proximity: return withSpeakersName ? kString71ProximityS : kString71Proximity;
  601. case k80Cine: return withSpeakersName ? kString80CineS : kString80Cine;
  602. case k80Music: return withSpeakersName ? kString80MusicS : kString80Music;
  603. case k81Cine: return withSpeakersName ? kString81CineS : kString81Cine;
  604. case k81Music: return withSpeakersName ? kString81MusicS : kString81Music;
  605. case k81MPEG3D: return withSpeakersName ? kString81MPEGS : kString81MPEG;
  606. case k102: return withSpeakersName ? kString102S : kString102;
  607. case k122: return withSpeakersName ? kString122S : kString122;
  608. case k80Cube: return withSpeakersName ? kString80CubeS : kString80Cube;
  609. case k71CineTopCenter: return withSpeakersName ? kString71CineTopCenterS : kString71CineTopCenter;
  610. case k71CineCenterHigh: return withSpeakersName ? kString71CineCenterHighS : kString71CineCenterHigh;
  611. case k71CineFrontHigh: return withSpeakersName ? kString71CineFrontHighS : kString71CineFrontHigh;
  612. case k71CineSideHigh: return withSpeakersName ? kString71CineSideHighS : kString71CineSideHigh;
  613. case k71CineFullRear: return withSpeakersName ? kString71CineFullRearS : kString71CineFullRear;
  614. case k91Atmos: return withSpeakersName ? kString91AtmosS : kString91Atmos;
  615. case k100: return withSpeakersName ? kString100S : kString100;
  616. case k101: return withSpeakersName ? kString101S : kString101;
  617. case k110: return withSpeakersName ? kString110S : kString110;
  618. case k111: return withSpeakersName ? kString111S : kString111;
  619. case k50_4: return withSpeakersName ? kString50_4S : kString50_4;
  620. case k51_4: return withSpeakersName ? kString51_4S : kString51_4;
  621. case k70_4: return withSpeakersName ? kStringk70_4S : kString70_4;
  622. case k71_4: return withSpeakersName ? kStringk71_4S : kString71_4;
  623. case k130: return withSpeakersName ? kString130S : kString130;
  624. case k131: return withSpeakersName ? kString131S : kString131;
  625. case k140: return withSpeakersName ? kString140S : kString140;
  626. case k222: return withSpeakersName ? kString222S : kString222;
  627. break;
  628. }
  629. if (arr == kAmbi1stOrderACN)
  630. return withSpeakersName ? kStringAmbi1stOrderS : kStringAmbi1stOrder;
  631. if (arr == kAmbi2cdOrderACN)
  632. return withSpeakersName ? kStringAmbi2cdOrderS : kStringAmbi2cdOrder;
  633. if (arr == kAmbi3rdOrderACN)
  634. return withSpeakersName ? kStringAmbi3rdOrderS : kStringAmbi3rdOrder;
  635. return kStringEmpty;
  636. }
  637. //------------------------------------------------------------------------
  638. /** Returns a CString representation of a given speaker in a given arrangement
  639. */
  640. inline CString getSpeakerShortName (const SpeakerArrangement& arr, int32 index)
  641. {
  642. SpeakerArrangement arrTmp = arr;
  643. bool found = false;
  644. int32 index2 = -1;
  645. int32 pos = -1;
  646. while (arrTmp)
  647. {
  648. if (arrTmp & 0x1)
  649. index2++;
  650. pos++;
  651. if (index2 == index)
  652. {
  653. found = true;
  654. break;
  655. }
  656. arrTmp = arrTmp >> 1;
  657. }
  658. if (!found)
  659. return "";
  660. Speaker speaker = (Speaker)1 << pos;
  661. if (speaker == kSpeakerL)
  662. return "L";
  663. if (speaker == kSpeakerR)
  664. return "R";
  665. if (speaker == kSpeakerC)
  666. return "C";
  667. if (speaker == kSpeakerLfe)
  668. return "LFE";
  669. if (speaker == kSpeakerLs)
  670. return "Ls";
  671. if (speaker == kSpeakerRs)
  672. return "Rs";
  673. if (speaker == kSpeakerLc)
  674. return "Lc";
  675. if (speaker == kSpeakerRc)
  676. return "Rc";
  677. if (speaker == kSpeakerS)
  678. return "S";
  679. if (speaker == kSpeakerSl)
  680. return "Sl";
  681. if (speaker == kSpeakerSr)
  682. return "Sr";
  683. if (speaker == kSpeakerTc)
  684. return "Tc";
  685. if (speaker == kSpeakerTfl)
  686. return "Tfl";
  687. if (speaker == kSpeakerTfc)
  688. return "Tfc";
  689. if (speaker == kSpeakerTfr)
  690. return "Tfr";
  691. if (speaker == kSpeakerTrl)
  692. return "Trl";
  693. if (speaker == kSpeakerTrc)
  694. return "Trc";
  695. if (speaker == kSpeakerTrr)
  696. return "Trr";
  697. if (speaker == kSpeakerLfe2)
  698. return "LFE2";
  699. if (speaker == kSpeakerM)
  700. return "M";
  701. if (speaker == kSpeakerACN0)
  702. return "0";
  703. if (speaker == kSpeakerACN1)
  704. return "1";
  705. if (speaker == kSpeakerACN2)
  706. return "2";
  707. if (speaker == kSpeakerACN3)
  708. return "3";
  709. if (speaker == kSpeakerACN4)
  710. return "4";
  711. if (speaker == kSpeakerACN5)
  712. return "5";
  713. if (speaker == kSpeakerACN6)
  714. return "6";
  715. if (speaker == kSpeakerACN7)
  716. return "7";
  717. if (speaker == kSpeakerACN8)
  718. return "8";
  719. if (speaker == kSpeakerACN9)
  720. return "9";
  721. if (speaker == kSpeakerACN10)
  722. return "10";
  723. if (speaker == kSpeakerACN11)
  724. return "11";
  725. if (speaker == kSpeakerACN12)
  726. return "12";
  727. if (speaker == kSpeakerACN13)
  728. return "13";
  729. if (speaker == kSpeakerACN14)
  730. return "14";
  731. if (speaker == kSpeakerACN15)
  732. return "15";
  733. if (speaker == kSpeakerTsl)
  734. return "Tsl";
  735. if (speaker == kSpeakerTsr)
  736. return "Tsr";
  737. if (speaker == kSpeakerLcs)
  738. return "Lcs";
  739. if (speaker == kSpeakerRcs)
  740. return "Rcs";
  741. if (speaker == kSpeakerBfl)
  742. return "Bfl";
  743. if (speaker == kSpeakerBfc)
  744. return "Bfc";
  745. if (speaker == kSpeakerBfr)
  746. return "Bfr";
  747. if (speaker == kSpeakerPl)
  748. return "Pl";
  749. if (speaker == kSpeakerPr)
  750. return "Pr";
  751. if (speaker == kSpeakerBsl)
  752. return "Bsl";
  753. if (speaker == kSpeakerBsr)
  754. return "Bsr";
  755. if (speaker == kSpeakerBrl)
  756. return "Brl";
  757. if (speaker == kSpeakerBrc)
  758. return "Brc";
  759. if (speaker == kSpeakerBrr)
  760. return "Brr";
  761. return "";
  762. }
  763. /*@}*/
  764. //------------------------------------------------------------------------
  765. } // namespace SpeakerArr
  766. } // namespace Vst
  767. } // namespace Steinberg