バージョン

menu_open
Wwise SDK 2024.1.0
AkSpeakerConfig.h
[詳解]
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 #ifndef _AK_SPEAKERCONFIG_H_
28 #define _AK_SPEAKERCONFIG_H_
29 
33 
34 /// Standard speakers (channel mask):
35 #define AK_SPEAKER_FRONT_LEFT 0x1 ///< Front left speaker bit mask
36 #define AK_SPEAKER_FRONT_RIGHT 0x2 ///< Front right speaker bit mask
37 #define AK_SPEAKER_FRONT_CENTER 0x4 ///< Front center speaker bit mask
38 #define AK_SPEAKER_LOW_FREQUENCY 0x8 ///< Low-frequency speaker bit mask
39 #define AK_SPEAKER_BACK_LEFT 0x10 ///< Rear left speaker bit mask
40 #define AK_SPEAKER_BACK_RIGHT 0x20 ///< Rear right speaker bit mask
41 #define AK_SPEAKER_BACK_CENTER 0x100 ///< Rear center speaker ("surround speaker") bit mask
42 #define AK_SPEAKER_SIDE_LEFT 0x200 ///< Side left speaker bit mask
43 #define AK_SPEAKER_SIDE_RIGHT 0x400 ///< Side right speaker bit mask
44 
45 /// "Height" speakers.
46 #define AK_SPEAKER_TOP 0x800 ///< Top speaker bit mask
47 #define AK_SPEAKER_HEIGHT_FRONT_LEFT 0x1000 ///< Top front left speaker bit mask
48 #define AK_SPEAKER_HEIGHT_FRONT_CENTER 0x2000 ///< Top front center speaker bit mask
49 #define AK_SPEAKER_HEIGHT_FRONT_RIGHT 0x4000 ///< Top front right speaker bit mask
50 #define AK_SPEAKER_HEIGHT_BACK_LEFT 0x8000 ///< Top rear left speaker bit mask
51 #define AK_SPEAKER_HEIGHT_BACK_CENTER 0x10000 ///< Top rear center speaker bit mask
52 #define AK_SPEAKER_HEIGHT_BACK_RIGHT 0x20000 ///< Top rear right speaker bit mask
53 #define AK_SPEAKER_HEIGHT_SIDE_LEFT 0x40000 ///< Top side left speaker bit mask
54 #define AK_SPEAKER_HEIGHT_SIDE_RIGHT 0x80000 ///< Top side right speaker bit mask
55 
56 //
57 // Supported speaker setups. Those are the ones that can be used in the Wwise Sound Engine audio pipeline.
58 //
59 
60 #define AK_SPEAKER_SETUP_MONO AK_SPEAKER_FRONT_CENTER ///< 1.0 setup channel mask
61 #define AK_SPEAKER_SETUP_0POINT1 AK_SPEAKER_LOW_FREQUENCY ///< 0.1 setup channel mask
62 #define AK_SPEAKER_SETUP_1POINT1 (AK_SPEAKER_FRONT_CENTER | AK_SPEAKER_LOW_FREQUENCY) ///< 1.1 setup channel mask
63 #define AK_SPEAKER_SETUP_STEREO (AK_SPEAKER_FRONT_LEFT | AK_SPEAKER_FRONT_RIGHT) ///< 2.0 setup channel mask
64 #define AK_SPEAKER_SETUP_2POINT1 (AK_SPEAKER_SETUP_STEREO | AK_SPEAKER_LOW_FREQUENCY) ///< 2.1 setup channel mask
65 #define AK_SPEAKER_SETUP_3STEREO (AK_SPEAKER_SETUP_STEREO | AK_SPEAKER_FRONT_CENTER) ///< 3.0 setup channel mask
66 #define AK_SPEAKER_SETUP_3POINT1 (AK_SPEAKER_SETUP_3STEREO | AK_SPEAKER_LOW_FREQUENCY) ///< 3.1 setup channel mask
67 #define AK_SPEAKER_SETUP_4 (AK_SPEAKER_SETUP_STEREO | AK_SPEAKER_SIDE_LEFT | AK_SPEAKER_SIDE_RIGHT) ///< 4.0 setup channel mask
68 #define AK_SPEAKER_SETUP_4POINT1 (AK_SPEAKER_SETUP_4 | AK_SPEAKER_LOW_FREQUENCY) ///< 4.1 setup channel mask
69 #define AK_SPEAKER_SETUP_5 (AK_SPEAKER_SETUP_4 | AK_SPEAKER_FRONT_CENTER) ///< 5.0 setup channel mask
70 #define AK_SPEAKER_SETUP_5POINT1 (AK_SPEAKER_SETUP_5 | AK_SPEAKER_LOW_FREQUENCY) ///< 5.1 setup channel mask
71 #define AK_SPEAKER_SETUP_6 (AK_SPEAKER_SETUP_4 | AK_SPEAKER_BACK_LEFT | AK_SPEAKER_BACK_RIGHT) ///< 6.0 setup channel mask
72 #define AK_SPEAKER_SETUP_6POINT1 (AK_SPEAKER_SETUP_6 | AK_SPEAKER_LOW_FREQUENCY) ///< 6.1 setup channel mask
73 #define AK_SPEAKER_SETUP_7 (AK_SPEAKER_SETUP_6 | AK_SPEAKER_FRONT_CENTER) ///< 7.0 setup channel mask
74 #define AK_SPEAKER_SETUP_7POINT1 (AK_SPEAKER_SETUP_7 | AK_SPEAKER_LOW_FREQUENCY) ///< 7.1 setup channel mask
75 #define AK_SPEAKER_SETUP_SURROUND (AK_SPEAKER_SETUP_STEREO | AK_SPEAKER_BACK_CENTER) ///< Legacy surround setup channel mask
76 
77 #define AK_SPEAKER_SETUP_HEIGHT_2 (AK_SPEAKER_HEIGHT_FRONT_LEFT | AK_SPEAKER_HEIGHT_FRONT_RIGHT) ///< 2 speaker height layer.
78 #define AK_SPEAKER_SETUP_HEIGHT_4 (AK_SPEAKER_SETUP_HEIGHT_2 | AK_SPEAKER_HEIGHT_BACK_LEFT | AK_SPEAKER_HEIGHT_BACK_RIGHT) ///< 4 speaker height layer.
79 #define AK_SPEAKER_SETUP_HEIGHT_5 (AK_SPEAKER_SETUP_HEIGHT_4 | AK_SPEAKER_HEIGHT_FRONT_CENTER) ///< 5 speaker height layer.
80 #define AK_SPEAKER_SETUP_HEIGHT_ALL (AK_SPEAKER_SETUP_HEIGHT_5 | AK_SPEAKER_HEIGHT_BACK_CENTER) ///< All height speaker layer.
81 #define AK_SPEAKER_SETUP_HEIGHT_4_TOP (AK_SPEAKER_SETUP_HEIGHT_4 | AK_SPEAKER_TOP) ///< 4 speaker height layer + top.
82 #define AK_SPEAKER_SETUP_HEIGHT_5_TOP (AK_SPEAKER_SETUP_HEIGHT_5 | AK_SPEAKER_TOP) ///< 5 speaker height layer + top.
83 
84 // Auro speaker setups
85 #define AK_SPEAKER_SETUP_AURO_222 (AK_SPEAKER_SETUP_4 | AK_SPEAKER_HEIGHT_FRONT_LEFT | AK_SPEAKER_HEIGHT_FRONT_RIGHT) ///< Auro-222 setup channel mask (4.0.2)
86 #define AK_SPEAKER_SETUP_AURO_8 (AK_SPEAKER_SETUP_AURO_222 | AK_SPEAKER_HEIGHT_BACK_LEFT | AK_SPEAKER_HEIGHT_BACK_RIGHT) ///< Auro-8 setup channel mask (4.0.4)
87 #define AK_SPEAKER_SETUP_AURO_9 (AK_SPEAKER_SETUP_AURO_8 | AK_SPEAKER_FRONT_CENTER) ///< Auro-9.0 setup channel mask (5.0.4)
88 #define AK_SPEAKER_SETUP_AURO_9POINT1 (AK_SPEAKER_SETUP_AURO_9 | AK_SPEAKER_LOW_FREQUENCY) ///< Auro-9.1 setup channel mask (5.1.4)
89 #define AK_SPEAKER_SETUP_AURO_10 (AK_SPEAKER_SETUP_AURO_9 | AK_SPEAKER_TOP) ///< Auro-10.0 setup channel mask (5.0.4+top)
90 #define AK_SPEAKER_SETUP_AURO_10POINT1 (AK_SPEAKER_SETUP_AURO_10 | AK_SPEAKER_LOW_FREQUENCY) ///< Auro-10.1 setup channel mask (5.1.4+top)
91 #define AK_SPEAKER_SETUP_AURO_11 (AK_SPEAKER_SETUP_AURO_10 | AK_SPEAKER_HEIGHT_FRONT_CENTER) ///< Auro-11.0 setup channel mask (5.0.5+top)
92 #define AK_SPEAKER_SETUP_AURO_11POINT1 (AK_SPEAKER_SETUP_AURO_11 | AK_SPEAKER_LOW_FREQUENCY) ///< Auro-11.1 setup channel mask (5.1.5+top)
93 #define AK_SPEAKER_SETUP_AURO_11_740 (AK_SPEAKER_SETUP_7 | AK_SPEAKER_SETUP_HEIGHT_4) ///< Auro-11.0 (7+4) setup channel mask (7.0.4)
94 #define AK_SPEAKER_SETUP_AURO_11POINT1_740 (AK_SPEAKER_SETUP_AURO_11_740 | AK_SPEAKER_LOW_FREQUENCY) ///< Auro-11.1 (7+4) setup channel mask (7.1.4)
95 #define AK_SPEAKER_SETUP_AURO_13_751 (AK_SPEAKER_SETUP_7 | AK_SPEAKER_SETUP_HEIGHT_5 | AK_SPEAKER_TOP) ///< Auro-13.0 setup channel mask (7.0.5+top)
96 #define AK_SPEAKER_SETUP_AURO_13POINT1_751 (AK_SPEAKER_SETUP_AURO_13_751 | AK_SPEAKER_LOW_FREQUENCY) ///< Auro-13.1 setup channel mask (7.1.5+top)
97 
98 // Dolby speaker setups: in Dolby nomenclature, [#plane].[lfe].[#height]
99 #define AK_SPEAKER_SETUP_DOLBY_5_0_2 (AK_SPEAKER_SETUP_5 | AK_SPEAKER_HEIGHT_FRONT_LEFT | AK_SPEAKER_HEIGHT_FRONT_RIGHT ) ///< Dolby 5.0.2 setup channel mask
100 #define AK_SPEAKER_SETUP_DOLBY_5_1_2 (AK_SPEAKER_SETUP_DOLBY_5_0_2 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 5.1.2 setup channel mask
101 #define AK_SPEAKER_SETUP_DOLBY_5_0_4 (AK_SPEAKER_SETUP_DOLBY_5_0_2 | AK_SPEAKER_HEIGHT_BACK_LEFT | AK_SPEAKER_HEIGHT_BACK_RIGHT ) ///< Dolby 5.0.4 setup channel mask
102 #define AK_SPEAKER_SETUP_DOLBY_5_1_4 (AK_SPEAKER_SETUP_DOLBY_5_0_4 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 5.1.4 setup channel mask
103 #define AK_SPEAKER_SETUP_DOLBY_6_0_2 (AK_SPEAKER_SETUP_6 | AK_SPEAKER_HEIGHT_FRONT_LEFT | AK_SPEAKER_HEIGHT_FRONT_RIGHT ) ///< Dolby 6.0.2 setup channel mask
104 #define AK_SPEAKER_SETUP_DOLBY_6_1_2 (AK_SPEAKER_SETUP_DOLBY_6_0_2 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 6.1.2 setup channel mask
105 #define AK_SPEAKER_SETUP_DOLBY_6_0_4 (AK_SPEAKER_SETUP_DOLBY_6_0_2 | AK_SPEAKER_HEIGHT_BACK_LEFT | AK_SPEAKER_HEIGHT_BACK_RIGHT ) ///< Dolby 6.0.4 setup channel mask
106 #define AK_SPEAKER_SETUP_DOLBY_6_1_4 (AK_SPEAKER_SETUP_DOLBY_6_0_4 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 6.1.4 setup channel mask
107 #define AK_SPEAKER_SETUP_DOLBY_7_0_2 (AK_SPEAKER_SETUP_7 | AK_SPEAKER_HEIGHT_FRONT_LEFT | AK_SPEAKER_HEIGHT_FRONT_RIGHT ) ///< Dolby 7.0.2 setup channel mask
108 #define AK_SPEAKER_SETUP_DOLBY_7_1_2 (AK_SPEAKER_SETUP_DOLBY_7_0_2 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 7.1.2 setup channel mask
109 #define AK_SPEAKER_SETUP_DOLBY_7_0_4 (AK_SPEAKER_SETUP_DOLBY_7_0_2 | AK_SPEAKER_HEIGHT_BACK_LEFT | AK_SPEAKER_HEIGHT_BACK_RIGHT ) ///< Dolby 7.0.4 setup channel mask
110 #define AK_SPEAKER_SETUP_DOLBY_7_1_4 (AK_SPEAKER_SETUP_DOLBY_7_0_4 | AK_SPEAKER_LOW_FREQUENCY ) ///< Dolby 7.1.4 setup channel mask
111 
112 #define AK_SPEAKER_SETUP_ALL_SPEAKERS (AK_SPEAKER_SETUP_7POINT1 | AK_SPEAKER_BACK_CENTER | AK_SPEAKER_SETUP_HEIGHT_ALL | AK_SPEAKER_TOP) ///< All speakers.
113 
114 // Channel indices.
115 // ------------------------------------------------
116 
117 // Channel indices for standard setups on the plane.
118 #define AK_IDX_SETUP_FRONT_LEFT (0) ///< Index of front-left channel in all configurations.
119 #define AK_IDX_SETUP_FRONT_RIGHT (1) ///< Index of front-right channel in all configurations.
120 #define AK_IDX_SETUP_CENTER (2) ///< Index of front-center channel in all configurations.
121 
122 #define AK_IDX_SETUP_NOCENTER_BACK_LEFT (2) ///< Index of back-left channel in configurations with no front-center channel.
123 #define AK_IDX_SETUP_NOCENTER_BACK_RIGHT (3) ///< Index of back-right channel in configurations with no front-center channel.
124 #define AK_IDX_SETUP_NOCENTER_SIDE_LEFT (4) ///< Index of side-left channel in configurations with no front-center channel.
125 #define AK_IDX_SETUP_NOCENTER_SIDE_RIGHT (5) ///< Index of side-right channel in configurations with no front-center channel.
126 
127 #define AK_IDX_SETUP_WITHCENTER_BACK_LEFT (3) ///< Index of back-left channel in configurations with a front-center channel.
128 #define AK_IDX_SETUP_WITHCENTER_BACK_RIGHT (4) ///< Index of back-right channel in configurations with a front-center channel.
129 #define AK_IDX_SETUP_WITHCENTER_SIDE_LEFT (5) ///< Index of side-left channel in configurations with a front-center channel.
130 #define AK_IDX_SETUP_WITHCENTER_SIDE_RIGHT (6) ///< Index of side-right channel in configurations with a front-center channel.
131 
132 #define AK_IDX_SETUP_WITHCENTER_HEIGHT_FRONT_LEFT (7) ///< Index of height-front-left channel in configurations with a front-center channel.
133 #define AK_IDX_SETUP_WITHCENTER_HEIGHT_FRONT_RIGHT (8) ///< Index of height-front-right channel in configurations with a front-center channel.
134 #define AK_IDX_SETUP_WITHCENTER_HEIGHT_BACK_LEFT (9) ///< Index of height-back-left channel in configurations with a front-center channel.
135 #define AK_IDX_SETUP_WITHCENTER_HEIGHT_BACK_RIGHT (10) ///< Index of height-back-right channel in configurations with a front-center channel.
136 
137 // Channel indices for specific setups.
138 #define AK_IDX_SETUP_0_LFE (0) ///< Index of low-frequency channel in 0.1 setup (use with AkAudioBuffer::GetChannel())
139 
140 #define AK_IDX_SETUP_1_CENTER (0) ///< Index of center channel in 1.x setups (use with AkAudioBuffer::GetChannel())
141 #define AK_IDX_SETUP_1_LFE (1) ///< Index of low-frequency channel in 1.1 setup (use with AkAudioBuffer::GetChannel())
142 
143 #define AK_IDX_SETUP_2_LEFT (0) ///< Index of left channel in 2.x setups (use with AkAudioBuffer::GetChannel())
144 #define AK_IDX_SETUP_2_RIGHT (1) ///< Index of right channel in 2.x setups (use with AkAudioBuffer::GetChannel())
145 #define AK_IDX_SETUP_2_LFE (2) ///< Index of low-frequency channel in 2.1 setup (use with AkAudioBuffer::GetChannel())
146 
147 #define AK_IDX_SETUP_3_LEFT (0) ///< Index of left channel in 3.x setups (use with AkAudioBuffer::GetChannel())
148 #define AK_IDX_SETUP_3_RIGHT (1) ///< Index of right channel in 3.x setups (use with AkAudioBuffer::GetChannel())
149 #define AK_IDX_SETUP_3_CENTER (2) ///< Index of center channel in 3.x setups (use with AkAudioBuffer::GetChannel())
150 #define AK_IDX_SETUP_3_LFE (3) ///< Index of low-frequency channel in 3.1 setup (use with AkAudioBuffer::GetChannel())
151 
152 #define AK_IDX_SETUP_4_FRONTLEFT (0) ///< Index of front left channel in 4.x setups (use with AkAudioBuffer::GetChannel())
153 #define AK_IDX_SETUP_4_FRONTRIGHT (1) ///< Index of front right channel in 4.x setups (use with AkAudioBuffer::GetChannel())
154 #define AK_IDX_SETUP_4_REARLEFT (2) ///< Index of rear left channel in 4.x setups (use with AkAudioBuffer::GetChannel())
155 #define AK_IDX_SETUP_4_REARRIGHT (3) ///< Index of rear right channel in 4.x setups (use with AkAudioBuffer::GetChannel())
156 #define AK_IDX_SETUP_4_LFE (4) ///< Index of low-frequency channel in 4.1 setup (use with AkAudioBuffer::GetChannel())
157 
158 #define AK_IDX_SETUP_5_FRONTLEFT (0) ///< Index of front left channel in 5.x setups (use with AkAudioBuffer::GetChannel())
159 #define AK_IDX_SETUP_5_FRONTRIGHT (1) ///< Index of front right channel in 5.x setups (use with AkAudioBuffer::GetChannel())
160 #define AK_IDX_SETUP_5_CENTER (2) ///< Index of center channel in 5.x setups (use with AkAudioBuffer::GetChannel())
161 #define AK_IDX_SETUP_5_REARLEFT (3) ///< Index of rear left channel in 5.x setups (use with AkAudioBuffer::GetChannel())
162 #define AK_IDX_SETUP_5_REARRIGHT (4) ///< Index of rear right channel in 5.x setups (use with AkAudioBuffer::GetChannel())
163 #define AK_IDX_SETUP_5_LFE (5) ///< Index of low-frequency channel in 5.1 setup (use with AkAudioBuffer::GetChannel())
164 
165 #define AK_IDX_SETUP_6_FRONTLEFT (0) ///< Index of front left channel in 6.x setups (use with AkAudioBuffer::GetChannel())
166 #define AK_IDX_SETUP_6_FRONTRIGHT (1) ///< Index of front right channel in 6x setups (use with AkAudioBuffer::GetChannel())
167 #define AK_IDX_SETUP_6_REARLEFT (2) ///< Index of rear left channel in 6.x setups (use with AkAudioBuffer::GetChannel())
168 #define AK_IDX_SETUP_6_REARRIGHT (3) ///< Index of rear right channel in 6.x setups (use with AkAudioBuffer::GetChannel())
169 #define AK_IDX_SETUP_6_SIDELEFT (4) ///< Index of side left channel in 6.x setups (use with AkAudioBuffer::GetChannel())
170 #define AK_IDX_SETUP_6_SIDERIGHT (5) ///< Index of side right channel in 6.x setups (use with AkAudioBuffer::GetChannel())
171 #define AK_IDX_SETUP_6_LFE (6) ///< Index of low-frequency channel in 6.1 setup (use with AkAudioBuffer::GetChannel())
172 
173 #define AK_IDX_SETUP_7_FRONTLEFT (0) ///< Index of front left channel in 7.x setups (use with AkAudioBuffer::GetChannel())
174 #define AK_IDX_SETUP_7_FRONTRIGHT (1) ///< Index of front right channel in 7.x setups (use with AkAudioBuffer::GetChannel())
175 #define AK_IDX_SETUP_7_CENTER (2) ///< Index of center channel in 7.x setups (use with AkAudioBuffer::GetChannel())
176 #define AK_IDX_SETUP_7_REARLEFT (3) ///< Index of rear left channel in 7.x setups (use with AkAudioBuffer::GetChannel())
177 #define AK_IDX_SETUP_7_REARRIGHT (4) ///< Index of rear right channel in 7.x setups (use with AkAudioBuffer::GetChannel())
178 #define AK_IDX_SETUP_7_SIDELEFT (5) ///< Index of side left channel in 7.x setups (use with AkAudioBuffer::GetChannel())
179 #define AK_IDX_SETUP_7_SIDERIGHT (6) ///< Index of side right channel in 7.x setups (use with AkAudioBuffer::GetChannel())
180 #define AK_IDX_SETUP_7_LFE (7) ///< Index of low-frequency channel in 7.1 setup (use with AkAudioBuffer::GetChannel())
181 
182 //
183 // Extra speaker setups. This is a more exhaustive list of speaker setups, which might not all be supported
184 // by the Wwise Sound Engine audio pipeline.
185 //
186 
187 #define AK_SPEAKER_SETUP_0_1 ( AK_SPEAKER_LOW_FREQUENCY ) //0.1
188 
189 #define AK_SPEAKER_SETUP_1_0_CENTER ( AK_SPEAKER_FRONT_CENTER ) //1.0 (C)
190 #define AK_SPEAKER_SETUP_1_1_CENTER ( AK_SPEAKER_FRONT_CENTER | AK_SPEAKER_LOW_FREQUENCY ) //1.1 (C)
191 
192 #define AK_SPEAKER_SETUP_2_0 ( AK_SPEAKER_FRONT_LEFT | AK_SPEAKER_FRONT_RIGHT ) //2.0
193 #define AK_SPEAKER_SETUP_2_1 ( AK_SPEAKER_FRONT_LEFT | AK_SPEAKER_FRONT_RIGHT | AK_SPEAKER_LOW_FREQUENCY ) //2.1
194 
195 #define AK_SPEAKER_SETUP_3_0 ( AK_SPEAKER_FRONT_LEFT | AK_SPEAKER_FRONT_RIGHT | AK_SPEAKER_FRONT_CENTER ) //3.0
196 #define AK_SPEAKER_SETUP_3_1 ( AK_SPEAKER_SETUP_3_0 | AK_SPEAKER_LOW_FREQUENCY ) //3.1
197 
198 #define AK_SPEAKER_SETUP_FRONT ( AK_SPEAKER_SETUP_3_0 )
199 
200 #define AK_SPEAKER_SETUP_4_0 ( AK_SPEAKER_SETUP_4 )
201 #define AK_SPEAKER_SETUP_4_1 ( AK_SPEAKER_SETUP_4POINT1 )
202 #define AK_SPEAKER_SETUP_5_0 ( AK_SPEAKER_SETUP_5 )
203 #define AK_SPEAKER_SETUP_5_1 ( AK_SPEAKER_SETUP_5POINT1 )
204 
205 #define AK_SPEAKER_SETUP_6_0 ( AK_SPEAKER_SETUP_6 )
206 #define AK_SPEAKER_SETUP_6_1 ( AK_SPEAKER_SETUP_6POINT1 )
207 #define AK_SPEAKER_SETUP_7_0 ( AK_SPEAKER_SETUP_7 )
208 #define AK_SPEAKER_SETUP_7_1 ( AK_SPEAKER_SETUP_7POINT1 )
209 
210 // Standard/largest setup definitions.
211 #define AK_SPEAKER_SETUP_DEFAULT_PLANE (AK_SPEAKER_SETUP_7POINT1) ///< All speakers on the plane, supported on this platform.
212 #define AK_SUPPORTED_STANDARD_CHANNEL_MASK (AK_SPEAKER_SETUP_ALL_SPEAKERS) ///< Platform supports all standard channels.
213 #define AK_STANDARD_MAX_NUM_CHANNELS (8) ///< Legacy: Platform supports at least 7.1
214 
215 #define AK_MAX_AMBISONICS_ORDER (5)
216 
217 #define AK_DEFAULT_HEIGHT_ANGLE 30.f
218 
219 // Helpers.
220 inline void AK_SPEAKER_SETUP_FIX_LEFT_TO_CENTER( AkUInt32 &io_uChannelMask )
221 {
222  if( !(io_uChannelMask & AK_SPEAKER_FRONT_CENTER)
223  && !(io_uChannelMask & AK_SPEAKER_FRONT_RIGHT)
224  && (io_uChannelMask & AK_SPEAKER_FRONT_LEFT) )
225  {
226  io_uChannelMask &= ~AK_SPEAKER_FRONT_LEFT; // remove left
227  io_uChannelMask |= AK_SPEAKER_FRONT_CENTER; // add center
228  }
229 }
230 
231 inline void AK_SPEAKER_SETUP_FIX_REAR_TO_SIDE( AkUInt32 &io_uChannelMask )
232 {
233  if( io_uChannelMask & ( AK_SPEAKER_BACK_LEFT ) && !( io_uChannelMask & AK_SPEAKER_SIDE_LEFT ) )
234  {
235  io_uChannelMask &= ~( AK_SPEAKER_BACK_LEFT | AK_SPEAKER_BACK_RIGHT ); // remove rears
236  io_uChannelMask |= ( AK_SPEAKER_SIDE_LEFT | AK_SPEAKER_SIDE_RIGHT ); // add sides
237  }
238 }
239 
240 inline void AK_SPEAKER_SETUP_CONVERT_TO_SUPPORTED( AkUInt32 &io_uChannelMask )
241 {
242  AK_SPEAKER_SETUP_FIX_LEFT_TO_CENTER( io_uChannelMask );
243  AK_SPEAKER_SETUP_FIX_REAR_TO_SIDE( io_uChannelMask );
244 }
245 
246 /// Ambisonics configurations (corresponding to AkChannelConfig::eConfigType == AK_ChannelConfigType_Ambisonic).
247 /// Convention: X points towards the front, and XYZ follow a right-hand rule, so Y is the side vector (pointing to the left).
248 /// Channel presence and ordering are predefined according to the number of channels. The ordering convention is ACN,
249 /// with the mapping of components to number of channels detailed below (source: https://en.wikipedia.org/wiki/Ambisonic_data_exchange_formats).
250 /// Normalization natively used in Wwise is SN3D.
251 ///
252 /// <table cellspacing="0" cellpadding="1" border="1" width="800px">
253 /// <tr><td rowspan="2" align="center"><b>Number of channels</b></td> <td colspan="2" align="center"><b>Order</b></td><td rowspan="2" align="center"><b>Description</b></td><td rowspan="2" align="center"><b>Layout of components</b></td></tr>
254 /// <tr><td align="center">Horizontal</td><td align="center">Vertical</td></tr>
255 /// <tr><td align="right">1 &nbsp;&nbsp;&nbsp;</td> <td align="right">0 &nbsp;&nbsp;&nbsp;</td><td align="right">0 &nbsp;&nbsp;&nbsp;</td> <td>&nbsp;&nbsp;mono</td><td>&nbsp;</td></tr>
256 /// <tr><td align="right">4 &nbsp;&nbsp;&nbsp;</td> <td align="right">1 &nbsp;&nbsp;&nbsp;</td><td align="right">1 &nbsp;&nbsp;&nbsp;</td> <td>&nbsp;&nbsp;first-order full sphere</td><td>&nbsp;&nbsp;WYZX</td></tr>
257 /// <tr><td align="right">9 &nbsp;&nbsp;&nbsp;</td> <td align="right">2 &nbsp;&nbsp;&nbsp;</td><td align="right">2 &nbsp;&nbsp;&nbsp;</td> <td>&nbsp;&nbsp;second-order full sphere</td><td>&nbsp;&nbsp;WYZXVTRSU</td></tr>
258 /// <tr><td align="right">16 &nbsp;&nbsp;&nbsp;</td> <td align="right">3 &nbsp;&nbsp;&nbsp;</td><td align="right">3 &nbsp;&nbsp;&nbsp;</td> <td>&nbsp;&nbsp;third-order full sphere</td><td>&nbsp;&nbsp;WYZXVTRSUQOMKLNP</td></tr>
259 /// </table>
260 
261 namespace AK
262 {
263 
264 /// Returns the number of channels of a given channel configuration.
265 static inline AkUInt8 ChannelMaskToNumChannels( AkChannelMask in_uChannelMask )
266 {
267  return (AkUInt8)AKPLATFORM::AkPopCount(in_uChannelMask);
268 }
269 
270 /// Returns a 'best guess' channel configuration from a given number of channels.
271 /// Will return 0 if no guess can be made.
272 static inline AkChannelMask ChannelMaskFromNumChannels( unsigned int in_uNumChannels )
273 {
274  AkChannelMask uChannelMask = 0;
275 
276  switch ( in_uNumChannels )
277  {
278  case 1:
279  uChannelMask = AK_SPEAKER_SETUP_1_0_CENTER;
280  break;
281  case 2:
282  uChannelMask = AK_SPEAKER_SETUP_2_0;
283  break;
284  case 3:
285  uChannelMask = AK_SPEAKER_SETUP_2_1;
286  break;
287  case 4:
288  uChannelMask = AK_SPEAKER_SETUP_4_0;
289  break;
290  case 5:
291  uChannelMask = AK_SPEAKER_SETUP_5_0;
292  break;
293  case 6:
294  uChannelMask = AK_SPEAKER_SETUP_5_1;
295  break;
296  case 7:
297  uChannelMask = AK_SPEAKER_SETUP_7;
298  break;
299  case 8:
300  uChannelMask = AK_SPEAKER_SETUP_7POINT1;
301  break;
302  }
303 
304  return uChannelMask;
305 }
306 
307 /// Converts a channel bit to a channel index (in Wwise pipeline ordering - LFE at the end), given a channel mask in_uChannelMask.
308 /// \return Channel index.
309 static inline AkUInt8 ChannelBitToIndex(AkChannelMask in_uChannelBit, AkChannelMask in_uChannelMask)
310 {
311 #ifdef AKASSERT
312  AKASSERT(ChannelMaskToNumChannels(in_uChannelBit) == 1);
313 #endif
314  if (in_uChannelBit == AK_SPEAKER_LOW_FREQUENCY)
315  return ChannelMaskToNumChannels(in_uChannelMask) - 1;
316  return ChannelMaskToNumChannels(in_uChannelMask & ~AK_SPEAKER_LOW_FREQUENCY & (in_uChannelBit - 1)); // Count all channels prior this one except the LFE
317 }
318 
319 /// Returns true when the LFE channel is present in a given channel configuration.
320 /// \return True if the LFE channel is present.
321 AkForceInline bool HasLFE(AkChannelMask in_uChannelMask)
322 {
323  return (in_uChannelMask & AK_SPEAKER_LOW_FREQUENCY) > 0;
324 }
325 
326 /// Returns true when the center channel is present in a given channel configuration.
327 /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
328 /// so HasCenter() returns true for mono signals.
329 /// \return True if the center channel is present.
330 AkForceInline bool HasCenter(AkChannelMask in_uChannelMask)
331 {
332  // All supported non-mono configurations have an AK_SPEAKER_FRONT_LEFT.
333  return (in_uChannelMask & AK_SPEAKER_FRONT_CENTER) > 0;
334 }
335 
336 /// Returns the number of angle values required to represent the given channel configuration.
337 /// Use this function with supported 2D standard channel configurations only.
338 /// \sa AK::SoundEngine::SetSpeakerAngles().
340 {
341 #ifdef AKASSERT
342  AKASSERT((in_uChannelMask & ~AK_SPEAKER_SETUP_DEFAULT_PLANE) == 0);
343 #endif
344 
345  // LFE is irrelevant.
346  in_uChannelMask &= ~AK_SPEAKER_LOW_FREQUENCY;
347  // Center speaker is always in the center and thus does not require an angle.
348  in_uChannelMask &= ~AK_SPEAKER_FRONT_CENTER;
349  // We should have complete pairs at this point, unless there is a speaker at 180 degrees,
350  // in which case we need one more angle to specify it.
351 #ifdef AKASSERT
352  AKASSERT((in_uChannelMask & AK_SPEAKER_BACK_CENTER) || ((ChannelMaskToNumChannels(in_uChannelMask) % 2) == 0));
353 #endif
354  return ChannelMaskToNumChannels(in_uChannelMask) >> 1;
355 }
356 
357 /// Channel ordering type.
359 {
360  ChannelOrdering_Standard = 0, // L-R-C-LFE-RL-RR-RC-SL-SR-HL-HR-HC-HRL-HRR-HRC-T, or ACN ordering + SN3D norm
361  ChannelOrdering_Film, // L-C-R-SL-SR-RL-RR-LFE-HL-HR-HRL-HRR
363  ChannelOrdering_RunTime, // L-R-C-RL-RR-RC-SL-SR-HL-HR-HC-HRL-HRR-HRC-T-LFE
364 
365  ChannelOrdering_Last // End of enum, invalid value.
366 };
367 
368 /// Returns true if standard configuration represented by channel mask has surround
369 /// channels, either defined as side or back channels.
371 {
372  return ( in_uChannelMask & AK_SPEAKER_BACK_LEFT || in_uChannelMask & AK_SPEAKER_SIDE_LEFT );
373 }
374 
375 /// Returns true if standard configuration represented by channel mask has strictly one
376 /// pair of surround channels, either defined as side or back channels. 7.1 has two pairs
377 /// of surround channels and would thus return false.
379 {
380  return ( ( ( in_uChannelMask & AK_SPEAKER_BACK_LEFT ) != 0 ) ^ ( ( in_uChannelMask & AK_SPEAKER_SIDE_LEFT ) != 0 ) );
381 }
382 
383 /// Returns true if standard configuration represented by channel mask has two
384 /// pair of surround channels, that is, side and back channels. 7.1 has two pairs
385 /// of surround channels and would thus return true, whereas 5.1 would return false.
387 {
388  return ( in_uChannelMask & AK_SPEAKER_BACK_LEFT && in_uChannelMask & AK_SPEAKER_SIDE_LEFT );
389 }
390 
391 /// Returns true if standard configuration represented by channel mask has at least one "height" channel (above the plane).
393 {
394  return (in_uChannelMask & ~AK_SPEAKER_SETUP_DEFAULT_PLANE) > 0;
395 }
396 
397 /// Takes a channel mask and swap back channels with side channels if there is just
398 /// one pair of surround channels.
400 {
401  if ( HasStrictlyOnePairOfSurroundChannels( in_uChannelMask ) )
402  {
403  in_uChannelMask &= ~( AK_SPEAKER_BACK_LEFT | AK_SPEAKER_BACK_RIGHT ); // remove rears
404  in_uChannelMask |= ( AK_SPEAKER_SIDE_LEFT | AK_SPEAKER_SIDE_RIGHT ); // add sides
405  }
406  return in_uChannelMask;
407 }
408 
409 } // namespace AK
410 
411 /// Channel configuration type.
413 {
414  AK_ChannelConfigType_Anonymous = 0x0, ///< Channel mask == 0 and channels are anonymous.
415  AK_ChannelConfigType_Standard = 0x1, ///< Channels must be identified with standard defines in AkSpeakerConfigs.
416  AK_ChannelConfigType_Ambisonic = 0x2, ///< Ambisonics. Channel mask == 0 and channels follow standard ambisonic order.
417  AK_ChannelConfigType_Objects = 0x3, ///< Object-based configurations.
418  AK_ChannelConfigType_Last, ///< End of enum, invalid value.
419 
420  AK_ChannelConfigType_UseDeviceMain = 0xE, ///< Special setting for bus objects to use the audio device main configuration.
421  AK_ChannelConfigType_UseDevicePassthrough = 0xF ///< Special setting for bus objects to use the audio device passthrough configuration.
422 };
423 
424 /// Defines a channel configuration.
425 /// Examples:
426 /// \code
427 /// AkChannelConfig cfg;
428 ///
429 /// // Create a stereo configuration.
430 /// cfg.SetStandard(AK_SPEAKER_SETUP_STEREO);
431 ///
432 /// // Create a 7.1.4 configuration (7.1 plus 4 height channels).
433 /// cfg.SetStandard(AK_SPEAKER_SETUP_AURO_11POINT1_740);
434 /// // or
435 /// cfg.SetStandard(AK_SPEAKER_SETUP_DOLBY_7_1_4);
436 ///
437 /// // Create a 3rd order ambisonic configuration.
438 /// cfg.SetAmbisonic(16); // pass in the number of spherical harmonics, (N+1)^2, where N is the ambisonics order.
439 ///
440 /// // Invalidate (usually means "As Parent")
441 /// cfg.Clear();
442 /// \endcode
444 {
445  // Channel config:
446  // - uChannelMask is a bit field, whose channel identifiers depend on AkChannelConfigType (up to 20). Channel bits are defined in AkSpeakerConfig.h.
447  // - eConfigType is a code that completes the identification of channels by uChannelMask.
448  // - uNumChannels is the number of channels, identified (deduced from channel mask) or anonymous (set directly).
449  AkUInt32 uNumChannels : 8; ///< Number of channels.
450  AkUInt32 eConfigType : 4; ///< Channel config type (AkChannelConfigType).
451  AkUInt32 uChannelMask : 20;///< Channel mask (configuration).
452 
453  /// Construct standard channel config from channel mask
455  {
456  return AkChannelConfig(AK::ChannelMaskToNumChannels(in_uChannelMask), in_uChannelMask);
457  }
458 
459  // Construct anonymous channel config from number of channels
461  {
462  return AkChannelConfig(in_uNumChannels, 0);
463  }
464 
465  /// Construct ambisonic channel config from number of channels (NOT order)
467  {
468  AkChannelConfig cfg;
469  cfg.SetAmbisonic(in_uNumChannels);
470  return cfg;
471  }
472 
473  // Construct object-based channel config
475  {
476  AkChannelConfig cfg;
477  cfg.SetObject();
478  return cfg;
479  }
480 
481  /// Constructor. Clears / sets the channel config in "invalid" state (IsValid() returns false).
483  : uNumChannels(0)
484  , eConfigType(0)
485  , uChannelMask(0)
486  {
487  }
488 
489  /// Constructor. Sets number of channels, and config type according to whether channel mask is defined or not. If defined, it must be consistent with the number of channels.
490  AkForceInline AkChannelConfig(AkUInt32 in_uNumChannels, AkUInt32 in_uChannelMask)
491  {
492  // Input arguments should be consistent.
493  SetStandardOrAnonymous(in_uNumChannels, in_uChannelMask);
494  }
495 
496  /// Operator != with a 32-bit word.
497  AkForceInline bool operator!=(AkUInt32 in_uBitField)
498  {
499  return (*((AkUInt32*)this) != in_uBitField);
500  }
501 
502  /// Clear the channel config. Becomes "invalid" (IsValid() returns false).
504  {
505  uNumChannels = 0;
506  eConfigType = 0;
507  uChannelMask = 0;
508  }
509 
510  /// Set channel config as a standard configuration specified with given channel mask.
511  AkForceInline void SetStandard(AkUInt32 in_uChannelMask)
512  {
513  uNumChannels = AK::ChannelMaskToNumChannels(in_uChannelMask);
515  uChannelMask = in_uChannelMask;
516  }
517 
518  /// Set channel config as either a standard or an anonymous configuration, specified with both a given channel mask (0 if anonymous) and a number of channels (which must match the channel mask if standard).
519  AkForceInline void SetStandardOrAnonymous(AkUInt32 in_uNumChannels, AkUInt32 in_uChannelMask)
520  {
521 #ifdef AKASSERT
522  AKASSERT(in_uChannelMask == 0 || in_uNumChannels == AK::ChannelMaskToNumChannels(in_uChannelMask));
523 #endif
524  uNumChannels = in_uNumChannels;
526  uChannelMask = in_uChannelMask;
527  }
528 
529  /// Set channel config as an anonymous configuration specified with given number of channels.
530  AkForceInline void SetAnonymous(AkUInt32 in_uNumChannels)
531  {
532  uNumChannels = in_uNumChannels;
534  uChannelMask = 0;
535  }
536 
537  /// Set channel config as an ambisonic configuration specified with given number of channels.
538  AkForceInline void SetAmbisonic(AkUInt32 in_uNumChannels)
539  {
540  uNumChannels = in_uNumChannels;
542  uChannelMask = 0;
543  }
544 
545  /// Set channel config as an object-based configuration (implies dynamic number of objects).
547  {
548  uNumChannels = 0;
550  uChannelMask = 0;
551  }
552 
553  /// Set channel config as the main mix channel configuration
555  {
556  uNumChannels = 0;
558  uChannelMask = 0;
559  }
560 
561  /// Set channel config as the passthrough mix channel configuration
563  {
564  uNumChannels = 0;
566  uChannelMask = 0;
567  }
568 
569  /// Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
570  AkForceInline bool IsValid() const
571  {
573  }
574 
575  /// Serialize channel config into a 32-bit word.
577  {
578  return uNumChannels | (eConfigType << 8) | (uChannelMask << 12);
579  }
580 
581  /// Deserialize channel config from a 32-bit word.
582  AkForceInline void Deserialize(AkUInt32 in_uChannelConfig)
583  {
584  uNumChannels = in_uChannelConfig & 0x000000ff;
585  eConfigType = (in_uChannelConfig >> 8) & 0x0000000f;
586  uChannelMask = (in_uChannelConfig >> 12) & 0x000fffff;
587  }
588 
589  /// Returns a new config based on 'this' with no LFE.
591  {
592  AkChannelConfig newConfig = *this;
593  AkUInt32 uNewChannelMask = newConfig.uChannelMask & ~AK_SPEAKER_LOW_FREQUENCY;
594  AkUInt32 uNumLFEChannel = (newConfig.uChannelMask - uNewChannelMask) >> 3; // 0 or 1
595 #ifdef AKASSERT
596  AKASSERT(uNumLFEChannel == 0 || uNumLFEChannel == 1);
597 #endif
598  newConfig.uNumChannels -= uNumLFEChannel;
599  newConfig.uChannelMask = uNewChannelMask;
600  return newConfig;
601  }
602 
603  /// Returns a new config based on 'this' with no Front Center channel.
605  {
606  AkChannelConfig newConfig = *this;
607  AkUInt32 uNewChannelMask = newConfig.uChannelMask & ~AK_SPEAKER_FRONT_CENTER;
608  AkUInt32 uNumCenterChannel = (newConfig.uChannelMask - uNewChannelMask) >> 2; // 0 or 1.
609 #ifdef AKASSERT
610  AKASSERT(uNumCenterChannel == 0 || uNumCenterChannel == 1);
611 #endif
612  newConfig.uNumChannels -= uNumCenterChannel;
613  newConfig.uChannelMask = uNewChannelMask;
614  return newConfig;
615  }
616 
617  /// Operator ==
618  AkForceInline bool operator==(const AkChannelConfig & in_other) const
619  {
620  return uNumChannels == in_other.uNumChannels
621  && eConfigType == in_other.eConfigType
622  && uChannelMask == in_other.uChannelMask;
623  }
624 
625  /// Operator !=
626  AkForceInline bool operator!=(const AkChannelConfig & in_other) const
627  {
628  return uNumChannels != in_other.uNumChannels
629  || eConfigType != in_other.eConfigType
630  || uChannelMask != in_other.uChannelMask;
631  }
632 
633  /// Query if LFE channel is present.
634  /// \return True when LFE channel is present
635  AkForceInline bool HasLFE() const
636  {
637  return AK::HasLFE(uChannelMask);
638  }
639 
640  /// Query if center channel is present.
641  /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
642  /// so HasCenter() returns true for mono signals.
643  /// \return True when center channel is present and configuration has more than 2 channels.
645  {
646  return AK::HasCenter(uChannelMask);
647  }
648 };
649 
650 #endif //_AK_SPEAKERCONFIG_H_
AkForceInline bool operator!=(AkUInt32 in_uBitField)
Operator != with a 32-bit word.
@ ChannelOrdering_Film
AkForceInline bool HasLFE(AkChannelMask in_uChannelMask)
AkForceInline void SetStandardOrAnonymous(AkUInt32 in_uNumChannels, AkUInt32 in_uChannelMask)
Set channel config as either a standard or an anonymous configuration, specified with both a given ch...
@ ChannelOrdering_Last
static AkForceInline AkChannelConfig Ambisonic(AkUInt32 in_uNumChannels)
Construct ambisonic channel config from number of channels (NOT order)
#define AK_SPEAKER_SETUP_5_0
Definition of data structures for AkAudioObject
AkForceInline bool HasCenter() const
@ AK_ChannelConfigType_Last
End of enum, invalid value.
AkForceInline AkChannelMask BackToSideChannels(AkChannelMask in_uChannelMask)
AkUInt32 uNumChannels
Number of channels.
void AK_SPEAKER_SETUP_FIX_REAR_TO_SIDE(AkUInt32 &io_uChannelMask)
#define AK_SPEAKER_SETUP_1_0_CENTER
AkUInt32 uChannelMask
Channel mask (configuration).
@ ChannelOrdering_Standard
@ AK_ChannelConfigType_Standard
Channels must be identified with standard defines in AkSpeakerConfigs.
AkForceInline bool HasCenter(AkChannelMask in_uChannelMask)
#define AK_SPEAKER_SETUP_7POINT1
7.1 setup channel mask
#define AK_SPEAKER_BACK_LEFT
Rear left speaker bit mask
AkUInt32 AkChannelMask
Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig....
Definition: AkTypes.h:81
uint8_t AkUInt8
Unsigned 8-bit integer
AkForceInline AkChannelConfig()
Constructor. Clears / sets the channel config in "invalid" state (IsValid() returns false).
AkForceInline void SetAmbisonic(AkUInt32 in_uNumChannels)
Set channel config as an ambisonic configuration specified with given number of channels.
AkForceInline AkUInt32 AkPopCount(AkUInt32 in_bits)
Definition: AkBitFuncs.h:68
@ AK_ChannelConfigType_Objects
Object-based configurations.
#define AK_SPEAKER_FRONT_RIGHT
Front right speaker bit mask
AkForceInline AkUInt32 Serialize() const
Serialize channel config into a 32-bit word.
@ AK_ChannelConfigType_Ambisonic
Ambisonics. Channel mask == 0 and channels follow standard ambisonic order.
AkForceInline void SetSameAsPassthrough()
Set channel config as the passthrough mix channel configuration
@ ChannelOrdering_FuMa
AkForceInline void SetAnonymous(AkUInt32 in_uNumChannels)
Set channel config as an anonymous configuration specified with given number of channels.
AkForceInline AkChannelConfig RemoveCenter() const
Returns a new config based on 'this' with no Front Center channel.
static AkUInt8 ChannelBitToIndex(AkChannelMask in_uChannelBit, AkChannelMask in_uChannelMask)
#define AK_SPEAKER_SETUP_DEFAULT_PLANE
All speakers on the plane, supported on this platform.
AkForceInline bool operator!=(const AkChannelConfig &in_other) const
Operator !=
@ AK_ChannelConfigType_UseDevicePassthrough
Special setting for bus objects to use the audio device passthrough configuration.
AkForceInline AkUInt32 GetNumberOfAnglesForConfig(AkChannelMask in_uChannelMask)
static AkForceInline AkChannelConfig Anonymous(AkUInt32 in_uNumChannels)
#define AK_SPEAKER_SIDE_LEFT
Side left speaker bit mask
#define AKASSERT(Condition)
Definition: AkAssert.h:67
#define AK_SPEAKER_BACK_CENTER
Rear center speaker ("surround speaker") bit mask
static AkChannelMask ChannelMaskFromNumChannels(unsigned int in_uNumChannels)
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
AkForceInline void SetSameAsMainMix()
Set channel config as the main mix channel configuration
#define AK_SPEAKER_SETUP_5_1
AkChannelConfigType
Channel configuration type.
AkForceInline bool HasHeightChannels(AkChannelMask in_uChannelMask)
Returns true if standard configuration represented by channel mask has at least one "height" channel ...
static AkForceInline AkChannelConfig Object()
#define AK_SPEAKER_SETUP_7
7.0 setup channel mask
AkForceInline void SetObject()
Set channel config as an object-based configuration (implies dynamic number of objects).
#define AK_SPEAKER_SETUP_2_1
@ AK_ChannelConfigType_Anonymous
Channel mask == 0 and channels are anonymous.
AkForceInline bool HasSurroundChannels(AkChannelMask in_uChannelMask)
#define AK_SPEAKER_SETUP_2_0
AkForceInline bool operator==(const AkChannelConfig &in_other) const
Operator ==
AkForceInline AkChannelConfig RemoveLFE() const
Returns a new config based on 'this' with no LFE.
AkForceInline void SetStandard(AkUInt32 in_uChannelMask)
Set channel config as a standard configuration specified with given channel mask.
#define AK_SPEAKER_FRONT_LEFT
Standard speakers (channel mask):
AkForceInline AkChannelConfig(AkUInt32 in_uNumChannels, AkUInt32 in_uChannelMask)
Constructor. Sets number of channels, and config type according to whether channel mask is defined or...
uint32_t AkUInt32
Unsigned 32-bit integer
AkUInt32 eConfigType
Channel config type (AkChannelConfigType).
@ AK_ChannelConfigType_UseDeviceMain
Special setting for bus objects to use the audio device main configuration.
AkForceInline bool HasSideAndRearChannels(AkChannelMask in_uChannelMask)
AkForceInline bool HasLFE() const
static AkUInt8 ChannelMaskToNumChannels(AkChannelMask in_uChannelMask)
Returns the number of channels of a given channel configuration.
void AK_SPEAKER_SETUP_CONVERT_TO_SUPPORTED(AkUInt32 &io_uChannelMask)
AkChannelOrdering
Channel ordering type.
#define AK_SPEAKER_LOW_FREQUENCY
Low-frequency speaker bit mask
AkForceInline void Deserialize(AkUInt32 in_uChannelConfig)
Deserialize channel config from a 32-bit word.
#define AK_SPEAKER_FRONT_CENTER
Front center speaker bit mask
#define AkForceInline
Definition: AkTypes.h:63
void AK_SPEAKER_SETUP_FIX_LEFT_TO_CENTER(AkUInt32 &io_uChannelMask)
@ ChannelOrdering_RunTime
static AkForceInline AkChannelConfig Standard(AkUInt32 in_uChannelMask)
Construct standard channel config from channel mask
AkForceInline bool IsValid() const
Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
#define AK_SPEAKER_SETUP_4_0
#define AK_SPEAKER_BACK_RIGHT
Rear right speaker bit mask
#define AK_SPEAKER_SIDE_RIGHT
Side right speaker bit mask
AkForceInline bool HasStrictlyOnePairOfSurroundChannels(AkChannelMask in_uChannelMask)

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう