Version
menu

Wwise SDK 2025.1.2
AkCommonDefs.h
Go to the documentation of this file.
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) 2025 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 // AkCommonDefs.h
28 
29 /// \file
30 /// AudioLib common defines, enums, and structs.
31 
32 
33 #ifndef _AK_COMMON_DEFS_H_
34 #define _AK_COMMON_DEFS_H_
35 
40 
41 //-----------------------------------------------------------------------------
42 // AUDIO DATA FORMAT
43 //-----------------------------------------------------------------------------
44 
45 // Audio data format.
46 // ------------------------------------------------
47 
48 const AkDataTypeID AK_INT = 0; ///< Integer data type (uchar, short, and so on)
49 const AkDataTypeID AK_FLOAT = 1; ///< Float data type
50 
51 const AkDataInterleaveID AK_INTERLEAVED = 0; ///< Interleaved data
52 const AkDataInterleaveID AK_NONINTERLEAVED = 1; ///< Non-interleaved data
53 
54 // Native format currently the same on all supported platforms, may become platform specific in the future
55 const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE = 32; ///< Native number of bits per sample.
56 const AkUInt32 AK_LE_NATIVE_SAMPLETYPE = AK_FLOAT; ///< Native data type.
57 const AkUInt32 AK_LE_NATIVE_INTERLEAVE = AK_NONINTERLEAVED; ///< Native interleaved setting.
58 
59 /// Defines the parameters of an audio buffer format.
61 {
62  AkUInt32 uSampleRate; ///< Number of samples per second
63 
64  AkChannelConfig channelConfig; ///< Channel configuration.
65 
66  AkUInt32 uBitsPerSample :6; ///< Number of bits per sample.
67  AkUInt32 uBlockAlign :10;///< Number of bytes per sample frame. (For example a 5.1 PCM 16bit should have a uBlockAlign equal to 6(5.1 channels)*2(16 bits per sample) = 12.
68  AkUInt32 uTypeID :2; ///< Data type ID (AkDataTypeID).
69  AkUInt32 uInterleaveID :1; ///< Interleave ID (AkDataInterleaveID).
70 
71  /// Get the number of channels.
72  /// \return The number of channels
74  {
76  }
77 
78  /// Query if LFE channel is present.
79  /// \return True when LFE channel is present
80  AkForceInline bool HasLFE() const
81  {
82  return channelConfig.HasLFE();
83  }
84 
85  /// Query if center channel is present.
86  /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
87  /// so HasCenter() returns true for mono signals.
88  /// \return True when center channel is present and configuration has more than 2 channels.
89  AkForceInline bool HasCenter() const
90  {
91  return channelConfig.HasCenter();
92  }
93 
94  /// Get the number of bits per sample.
95  /// \return The number of bits per sample
97  {
98  return uBitsPerSample;
99  }
100 
101  /// Get the block alignment.
102  /// \return The block alignment
104  {
105  return uBlockAlign;
106  }
107 
108  /// Get the data sample format (Float or Integer).
109  /// \return The data sample format
111  {
112  return uTypeID;
113  }
114 
115  /// Get the interleaved type.
116  /// \return The interleaved type
118  {
119  return uInterleaveID;
120  }
121 
122  /// Set all parameters of the audio format structure.
123  /// Channels are specified by channel mask (standard configs).
124  void SetAll(
125  AkUInt32 in_uSampleRate, ///< Number of samples per second
126  AkChannelConfig in_channelConfig, ///< Channel configuration
127  AkUInt32 in_uBitsPerSample, ///< Number of bits per sample
128  AkUInt32 in_uBlockAlign, ///< Number of bytes per sample frame. (For example a 5.1 PCM 16bit should have a uBlockAlign equal to 6(5.1 channels)*2(16 bits per sample) = 12.
129  AkUInt32 in_uTypeID, ///< Data sample format (Float or Integer)
130  AkUInt32 in_uInterleaveID ///< Interleaved type
131  )
132  {
133  uSampleRate = in_uSampleRate;
134  channelConfig = in_channelConfig;
135  uBitsPerSample = in_uBitsPerSample;
136  uBlockAlign = in_uBlockAlign;
137  uTypeID = in_uTypeID;
138  uInterleaveID = in_uInterleaveID;
139  }
140 
141  AkForceInline bool operator==(const AkAudioFormat & in_other) const
142  {
143  return uSampleRate == in_other.uSampleRate
144  && channelConfig == in_other.channelConfig
145  && uBitsPerSample == in_other.uBitsPerSample
146  && uBlockAlign == in_other.uBlockAlign
147  && uTypeID == in_other.uTypeID
148  && uInterleaveID == in_other.uInterleaveID;
149  }
150 
151  AkForceInline bool operator!=(const AkAudioFormat & in_other) const
152  {
153  return uSampleRate != in_other.uSampleRate
154  || channelConfig != in_other.channelConfig
155  || uBitsPerSample != in_other.uBitsPerSample
156  || uBlockAlign != in_other.uBlockAlign
157  || uTypeID != in_other.uTypeID
158  || uInterleaveID != in_other.uInterleaveID;
159  }
160 };
161 
162 typedef AkUInt8(*AkChannelMappingFunc)(const AkChannelConfig &config, AkUInt8 idx);
163 
164 #define AK_MAKE_CHANNELCONFIGOVERRIDE(_config,_order) ((AkInt64)_config.Serialize()|((AkInt64)_order<<32))
165 #define AK_GET_CHANNELCONFIGOVERRIDE_CONFIG(_over) (_over&UINT_MAX)
166 #define AK_GET_CHANNELCONFIGOVERRIDE_ORDERING(_over) ((AK::AkChannelOrdering)(_over>>32))
167 
168 // Build a 32 bit class identifier based on the Plug-in type,
169 // CompanyID and PluginID.
170 //
171 // Parameters:
172 // - in_pluginType: A value from enum AkPluginType (4 bits)
173 // - in_companyID: CompanyID as defined in the Plug-in's XML file (12 bits)
174 // * 0-63: Reserved for Audiokinetic
175 // * 64-255: Reserved for clients' in-house Plug-ins
176 // * 256-4095: Assigned by Audiokinetic to third-party plug-in developers
177 // - in_pluginID: PluginID as defined in the Plug-in's XML file (16 bits)
178 // * 0-32767: Set freely by the Plug-in developer
179 #define AKMAKECLASSID( in_pluginType, in_companyID, in_pluginID ) \
180  ( (in_pluginType) + ( (in_companyID) << 4 ) + ( (in_pluginID) << ( 4 + 12 ) ) )
181 
182 #define AKGETPLUGINTYPEFROMCLASSID( in_classID ) ( (in_classID) & AkPluginTypeMask )
183 #define AKGETCOMPANYIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0x0000FFF0 ) >> 4 )
184 #define AKGETPLUGINIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0xFFFF0000 ) >> ( 4 + 12 ) )
185 
186 #define CODECID_FROM_PLUGINID AKGETPLUGINIDFROMCLASSID
187 
188 
189 namespace AK
190 {
191  /// Struct containing metering information about a buffer. Depending on when this struct is generated, you may get metering data computed in the previous frame only.
192  struct AkMetering
193  {
194  /// Peak of each channel in this frame.
195  /// Vector of linear peak levels, corresponding to each channel. NULL if AK_EnableBusMeter_Peak is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
197 
198  /// True peak of each channel (as defined by ITU-R BS.1770) in this frame.
199  /// Vector of linear true peak levels, corresponding to each channel. NULL if AK_EnableBusMeter_TruePeak is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
201 
202  /// RMS value of each channel in this frame.
203  /// Vector of linear rms levels, corresponding to each channel. NULL if AK_EnableBusMeter_RMS is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
205 
206  /// Mean k-weighted power value in this frame, used to compute loudness (as defined by ITU-R BS.1770).
207  /// Total linear k-weighted power of all channels. 0 if AK_EnableBusMeter_KPower is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
209  };
210 
211  static inline bool IsBankCodecID(AkUInt32 in_codecID)
212  {
213  return in_codecID == AKCODECID_BANK ||
214  in_codecID == AKCODECID_BANK_EVENT ||
215  in_codecID == AKCODECID_BANK_BUS;
216  }
217 }
218 
219 // 3D Audio Object.
220 // ------------------------------------------------
221 
222 /// Default listener transform.
223 #define AK_DEFAULT_LISTENER_POSITION_X (0.0f) // at coordinate system's origin
224 #define AK_DEFAULT_LISTENER_POSITION_Y (0.0f)
225 #define AK_DEFAULT_LISTENER_POSITION_Z (0.0f)
226 #define AK_DEFAULT_LISTENER_FRONT_X (0.0f) // looking toward Z,
227 #define AK_DEFAULT_LISTENER_FRONT_Y (0.0f)
228 #define AK_DEFAULT_LISTENER_FRONT_Z (1.0f)
229 #define AK_DEFAULT_TOP_X (0.0f) // top towards Y
230 #define AK_DEFAULT_TOP_Y (1.0f)
231 #define AK_DEFAULT_TOP_Z (0.0f)
232 
233 
234 /// 3D data needed for 3D spatialization.
235 /// Undergoes transformations based on emitter-listener placement.
236 struct Ak3dData
237 {
239  : spread(1.f)
240  , focus(1.f)
241  , uEmitterChannelMask(0xffffffff)
242  {
244  }
245 
246  AkTransform xform; ///< Object position / orientation.
247  AkReal32 spread; ///< Spread [0,1]
248  AkReal32 focus; ///< Focus [0,1]
249  AkChannelMask uEmitterChannelMask; ///< Emitter channel mask. With 3D spatialization, zeroed channels should be dropped.
250 };
251 
252 /// Positioning data inherited from sound structures and mix busses.
254 {
256  : center(1.f)
257  , panLR(0.f)
258  , panBF(0.f)
259  , panDU(0.f)
260  , panSpatMix(1.f)
263  , enableHeightSpread(true)
264  {}
265 
266  AkReal32 center; ///< Center percentage [0,1]
267  AkReal32 panLR; ///< Pan left-right [-1,1]
268  AkReal32 panBF; ///< Pan back-front [-1,1]
269  AkReal32 panDU; ///< Pan down-up [-1,1]
270  AkReal32 panSpatMix; ///< Panning vs 3D spatialization mix ([0,1], 1 being 100% spatialized).
271  Ak3DSpatializationMode spatMode; ///< 3D spatialization mode.
272  AkSpeakerPanningType panType; ///< Speaker panning type.
273  bool enableHeightSpread; ///< When true, audio objects 3D spatialized onto a planar channel configuration will be given a minimum spread value based on their elevation angle, equal to sin(elevation)**2.
274 };
275 
276 /// Positioning data of 3D audio objects.
278 {
279  Ak3dData threeD; ///< 3D data used for 3D spatialization.
280  AkBehavioralPositioningData behavioral; ///< Positioning data inherited from sound structures and mix busses.
281 };
282 
283 /// Enum of the possible object destinations when reaching a 3D audio-capable sink
285 {
286  eDefault = 0, // The destination will be chosen based on the audio object's metadata and channel configuration
287  eMainMix = 1, // The audio object will be mixed to the sink's main mix
288  ePassthrough = 2, // The audio object will be mixed to the sink's passthrough mix
289  eSystemAudioObject = 3 // The audio object will not be mixed; it will be sent separately to the system's 3D audio endpoint
290 };
291 
292 // Audio buffer.
293 // ------------------------------------------------
294 
295 /// Native sample type.
296 /// \remarks Sample values produced by insert effects must use this type.
297 /// \remarks Source plug-ins can produce samples of other types (specified through
298 /// according fields of AkAudioFormat, at initial handshaking), but these will be
299 /// format converted internally into the native format.
300 /// \sa
301 /// - \ref iaksourceeffect_init
302 /// - \ref iakmonadiceffect_init
303 typedef AkReal32 AkSampleType; ///< Audio sample data type (32 bit floating point)
304 
305 /// Audio buffer structure including the address of an audio buffer, the number of valid frames inside,
306 /// and the maximum number of frames the audio buffer can hold.
307 /// \sa
308 /// - \ref fx_audiobuffer_struct
310 {
311 public:
312 
313  /// Constructor.
315  {
316  Clear();
317  }
318 
319  /// Clear data pointer.
321  {
322  pData = NULL;
323  uValidFrames = 0;
324  }
325 
326  /// Clear members.
328  {
329  ClearData();
330  uMaxFrames = 0;
332  }
333 
334  /// \name Channel queries.
335  //@{
336  /// Get the number of channels.
338  {
340  }
341 
342  /// Returns true if there is an LFE channel present.
343  AkForceInline bool HasLFE() const
344  {
345  return channelConfig.HasLFE();
346  }
347 
349 
350  //@}
351 
352  /// \name Interleaved interface
353  //@{
354  /// Get address of data: to be used with interleaved buffers only.
355  /// \remarks Only source plugins can output interleaved data. This is determined at
356  /// initial handshaking.
357  /// \sa
358  /// - \ref fx_audiobuffer_struct
360  {
361  return pData;
362  }
363 
364  /// Attach interleaved data. Allocation is performed outside.
365  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames )
366  {
367  pData = in_pData;
368  uMaxFrames = in_uMaxFrames;
369  uValidFrames = in_uValidFrames;
371  }
372  /// Attach interleaved data with a new channel config. Allocation is performed outside.
373  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
374  {
375  pData = in_pData;
376  uMaxFrames = in_uMaxFrames;
377  uValidFrames = in_uValidFrames;
378  channelConfig = in_channelConfig;
379  }
380  //@}
381 
382  /// \name Deinterleaved interface
383  //@{
384 
385  /// Check if buffer has samples attached to it.
386  AkForceInline bool HasData() const
387  {
388  return ( NULL != pData );
389  }
390 
391  /// Convert a channel, identified by a single channel bit, to a buffer index used in GetChannel() below, for a given channel config.
392  /// Standard indexing follows channel bit order (see AkSpeakerConfig.h). Pipeline/buffer indexing is the same but the LFE is moved to the end.
394  AkChannelConfig in_channelConfig, ///< Channel configuration.
395  AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
396  )
397  {
398  if ( in_channelConfig.HasLFE() )
399  {
400  AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
401  AKASSERT( AK::GetNumNonZeroBits( in_channelConfig.uChannelMask ) );
402  AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
403  if ( in_uChannelIdx == uIdxLFE )
404  return in_channelConfig.uNumChannels - 1;
405  else if ( in_uChannelIdx > uIdxLFE )
406  return in_uChannelIdx - 1;
407  }
408 
409  return in_uChannelIdx;
410  }
411 
412  /// Get the buffer of the ith channel.
413  /// Access to channel data is most optimal through this method. Use whenever the
414  /// speaker configuration is known, or when an operation must be made independently
415  /// for each channel.
416  /// \remarks When using a standard Wwise pipeline configuration, use ChannelBitToIndex() to convert channel bits to buffer indices.
417  /// \return Address of the buffer of the ith channel.
418  /// \sa
419  /// - \ref fx_audiobuffer_struct
420  /// - \ref fx_audiobuffer_struct_channels
422  AkUInt32 in_uIndex ///< Channel index [0,NumChannels()-1]
423  )
424  {
425  AKASSERT( in_uIndex < NumChannels() );
426  return (AkSampleType*)((AkUInt8*)(pData) + ( in_uIndex * sizeof(AkSampleType) * MaxFrames() ));
427  }
428 
429  /// Get the buffer of the LFE.
430  /// \return Address of the buffer of the LFE. Null if there is no LFE channel.
431  /// \sa
432  /// - \ref fx_audiobuffer_struct_channels
433  inline AkSampleType * GetLFE()
434  {
436  return GetChannel( NumChannels()-1 );
437 
438  return (AkSampleType*)0;
439  }
440 
441  /// Can be used to transform an incomplete into a complete buffer with valid data.
442  /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
444  {
445  AKASSERT(pData != nullptr || MaxFrames() == 0);
446  // The following members MUST be copied locally due to multi-core calls to this function.
447  const AkUInt32 uNumChannels = NumChannels();
448  const AkUInt32 uNumCurrentFrames = AkMin(uValidFrames, MaxFrames());
449  const AkUInt32 uNumZeroFrames = MaxFrames() - uNumCurrentFrames;
450  if ( uNumZeroFrames )
451  {
452  AKASSERT(pData != nullptr);
453  for ( AkUInt32 i = 0; i < uNumChannels; ++i )
454  {
455  memset( GetChannel(i) + uNumCurrentFrames, 0, uNumZeroFrames * sizeof(AkSampleType) );
456  }
458  }
459  }
460 
461  /// Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
462  AkForceInline void AttachContiguousDeinterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
463  {
464  AttachInterleavedData( in_pData, in_uMaxFrames, in_uValidFrames, in_channelConfig );
465  }
466  /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
468  {
469  uMaxFrames = 0;
470  uValidFrames = 0;
472  void * pDataOld = pData;
473  pData = NULL;
474  return pDataOld;
475  }
476 
478 
479  //@}
480 
481  void RelocateMedia( AkUInt8* in_pNewMedia, AkUInt8* in_pOldMedia )
482  {
483  AkUIntPtr uMemoryOffset = (AkUIntPtr)in_pNewMedia - (AkUIntPtr)in_pOldMedia;
484  pData = (void*) (((AkUIntPtr)pData) + uMemoryOffset);
485  }
486 
487  /// Access to the number of sample frames the buffer can hold.
488  /// \return Number of sample frames the buffer can hold.
490 
491 protected:
492  void * pData; ///< Start of the audio buffer.
493  AkChannelConfig channelConfig; ///< Channel config.
494 
495 public:
496  AKRESULT eState; ///< Execution status
497 
498 protected:
499  AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
500 
501 public:
502  AkUInt16 uValidFrames; ///< Number of valid sample frames in the audio buffer
503 };
504 
505 #endif // _AK_COMMON_DEFS_H_
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
Definition: AkCommonDefs.h:343
bool enableHeightSpread
When true, audio objects 3D spatialized onto a planar channel configuration will be given a minimum s...
Definition: AkCommonDefs.h:273
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Definition: AkCommonDefs.h:421
#define AK_DEFAULT_TOP_Z
Definition: AkCommonDefs.h:231
uint16_t AkUInt16
Unsigned 16-bit integer.
Definition of data structures for AkAudioObject.
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:386
@ AK_DirectSpeakerAssignment
No panning: route to matching channels between input and output.
Definition: AkEnums.h:223
@ AK_ChannelConfigType_Standard
Channels must be identified with standard defines in AkSpeakerConfigs.
Definition: AkEnums.h:406
AkForceInline bool HasCenter() const
AkReal32 center
Center percentage [0,1].
Definition: AkCommonDefs.h:266
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:348
@ AK_DataNeeded
The consumer needs more.
Definition: AkEnums.h:58
AkReal32 panSpatMix
Panning vs 3D spatialization mix ([0,1], 1 being 100% spatialized).
Definition: AkCommonDefs.h:270
AkAudioBuffer()
Constructor.
Definition: AkCommonDefs.h:314
AkUInt8 AkDataInterleaveID
Data interleaved state ID.
Definition: AkTypedefs.h:57
AkUInt32 uNumChannels
Number of channels.
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
Definition: AkCommonDefs.h:467
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
Definition: AkCommonDefs.h:337
AkForceInline void Clear()
Clear members.
Definition: AkCommonDefs.h:327
#define AK_DEFAULT_LISTENER_FRONT_Y
Definition: AkCommonDefs.h:227
AkUInt32 uChannelMask
Channel mask (configuration).
AkSpeakerPanningType
Speaker panning type: type of panning logic when object is not 3D spatialized (i.e....
Definition: AkEnums.h:222
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:393
AkForceInline bool HasCenter() const
Definition: AkCommonDefs.h:89
AkChannelConfig channelConfig
Channel configuration.
Definition: AkCommonDefs.h:64
#define AK_DEFAULT_LISTENER_POSITION_Z
Definition: AkCommonDefs.h:225
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
Definition: AkCommonDefs.h:481
uint8_t AkUInt8
Unsigned 8-bit integer.
AkUInt32 uBitsPerSample
Number of bits per sample.
Definition: AkCommonDefs.h:66
#define AK_DEFAULT_LISTENER_POSITION_Y
Definition: AkCommonDefs.h:224
Positioning data inherited from sound structures and mix busses.
Definition: AkCommonDefs.h:254
AkUInt32 uTypeID
Data type ID (AkDataTypeID).
Definition: AkCommonDefs.h:68
#define AK_DEFAULT_TOP_X
Definition: AkCommonDefs.h:229
AK::SpeakerVolumes::VectorPtr rms
Definition: AkCommonDefs.h:204
Position and orientation of objects in a "local" space.
Definition: Ak3DObjects.h:255
float AkReal32
32-bit floating point
AKRESULT eState
Execution status.
Definition: AkCommonDefs.h:496
Ak3DSpatializationMode
3D spatialization mode.
Definition: AkEnums.h:253
AK::SpeakerVolumes::VectorPtr truePeak
Definition: AkCommonDefs.h:200
#define AkMin(x1, x2)
AkReal32 panDU
Pan down-up [-1,1].
Definition: AkCommonDefs.h:269
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
Definition: AkCommonDefs.h:502
uintptr_t AkUIntPtr
Integer (unsigned) type for pointers.
#define AK_DEFAULT_TOP_Y
Definition: AkCommonDefs.h:230
#define AKCODECID_BANK
Bank encoding.
Definition: AkConstants.h:115
void * pData
Start of the audio buffer.
Definition: AkCommonDefs.h:492
AkAudioObjectDestination
Enum of the possible object destinations when reaching a 3D audio-capable sink.
Definition: AkCommonDefs.h:285
AkChannelConfig channelConfig
Channel config.
Definition: AkCommonDefs.h:493
#define AKCODECID_BANK_EVENT
Bank encoding for event banks. These banks are contained in the /event sub-folder.
Definition: AkConstants.h:137
AkReal32 fMeanPowerK
Definition: AkCommonDefs.h:208
#define AK_DEFAULT_LISTENER_POSITION_X
Default listener transform.
Definition: AkCommonDefs.h:223
const AkDataTypeID AK_FLOAT
Float data type.
Definition: AkCommonDefs.h:49
#define AKASSERT(Condition)
Definition: AkAssert.h:69
AkSpeakerPanningType panType
Speaker panning type.
Definition: AkCommonDefs.h:272
const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE
Native number of bits per sample.
Definition: AkCommonDefs.h:55
void Set(const AkVector &in_position, const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: Ak3DObjects.h:285
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:499
AkBehavioralPositioningData behavioral
Positioning data inherited from sound structures and mix busses.
Definition: AkCommonDefs.h:280
AkUInt16 AkDataTypeID
Data sample type ID.
Definition: AkTypedefs.h:56
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
AkReal32 AkSampleType
Audio sample data type (32 bit floating point)
Definition: AkCommonDefs.h:303
#define AKCODECID_BANK_BUS
Bank encoding for bus banks. These banks are contained in the /bus sub-folder.
Definition: AkConstants.h:138
const AkUInt32 AK_LE_NATIVE_SAMPLETYPE
Native data type.
Definition: AkCommonDefs.h:56
#define AK_DEFAULT_LISTENER_FRONT_X
Definition: AkCommonDefs.h:226
#define NULL
Definition: AkTypedefs.h:33
Ak3dData threeD
3D data used for 3D spatialization.
Definition: AkCommonDefs.h:279
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
Definition: AkBitFuncs.h:201
Struct containing metering information about a buffer. Depending on when this struct is generated,...
Definition: AkCommonDefs.h:193
AkForceInline AkUInt32 GetBitsPerSample() const
Definition: AkCommonDefs.h:96
Positioning data of 3D audio objects.
Definition: AkCommonDefs.h:278
AKRESULT
Definition: AkEnums.h:32
AkUInt32 uBlockAlign
Number of bytes per sample frame. (For example a 5.1 PCM 16bit should have a uBlockAlign equal to 6(5...
Definition: AkCommonDefs.h:67
AkForceInline AkUInt32 GetInterleaveID() const
Definition: AkCommonDefs.h:117
#define AK_DEFAULT_LISTENER_FRONT_Z
Definition: AkCommonDefs.h:228
AkForceInline bool operator!=(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:151
void ZeroPadToMaxFrames()
Definition: AkCommonDefs.h:443
AkForceInline bool HasLFE() const
Definition: AkCommonDefs.h:80
AkForceInline AkUInt32 GetBlockAlign() const
Definition: AkCommonDefs.h:103
AkChannelMask uEmitterChannelMask
Emitter channel mask. With 3D spatialization, zeroed channels should be dropped.
Definition: AkCommonDefs.h:249
uint32_t AkUInt32
Unsigned 32-bit integer.
AkUInt8(* AkChannelMappingFunc)(const AkChannelConfig &config, AkUInt8 idx)
Definition: AkCommonDefs.h:162
AkUInt32 eConfigType
Channel config type (AkChannelConfigType).
AkReal32 panLR
Pan left-right [-1,1].
Definition: AkCommonDefs.h:267
AkForceInline void AttachContiguousDeinterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig)
Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
Definition: AkCommonDefs.h:462
AkReal32 spread
Spread [0,1].
Definition: AkCommonDefs.h:247
AkForceInline bool HasLFE() const
AkForceInline bool operator==(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:141
AkSampleType * GetLFE()
Definition: AkCommonDefs.h:433
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:359
AkUInt32 AkChannelMask
Channel mask (similar to extensibleWavFormat). Bit values are defined in AkSpeakerConfig....
Definition: AkTypedefs.h:68
AkForceInline AkUInt32 GetNumChannels() const
Definition: AkCommonDefs.h:73
#define AK_SPEAKER_LOW_FREQUENCY
Low-frequency speaker bit mask.
static bool IsBankCodecID(AkUInt32 in_codecID)
Definition: AkCommonDefs.h:211
const AkDataTypeID AK_INT
Integer data type (uchar, short, and so on)
Definition: AkCommonDefs.h:48
#define AkForceInline
Definition: AkTypes.h:63
Defines the parameters of an audio buffer format.
Definition: AkCommonDefs.h:61
AkUInt32 uInterleaveID
Interleave ID (AkDataInterleaveID).
Definition: AkCommonDefs.h:69
bool CheckValidSamples()
AkForceInline AkUInt32 GetTypeID() const
Definition: AkCommonDefs.h:110
AkForceInline bool IsValid() const
Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
AkReal32 focus
Focus [0,1].
Definition: AkCommonDefs.h:248
AkTransform xform
Object position / orientation.
Definition: AkCommonDefs.h:246
AkSpeakerVolumesMatrixPtr VectorPtr
Definition: AkTypedefs.h:103
AkForceInline void ClearData()
Clear data pointer.
Definition: AkCommonDefs.h:320
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames)
Attach interleaved data. Allocation is performed outside.
Definition: AkCommonDefs.h:365
@ AK_SpatializationMode_None
No spatialization.
Definition: AkEnums.h:254
AkUInt32 uSampleRate
Number of samples per second.
Definition: AkCommonDefs.h:62
AK::SpeakerVolumes::VectorPtr peak
Definition: AkCommonDefs.h:196
const AkDataInterleaveID AK_NONINTERLEAVED
Non-interleaved data.
Definition: AkCommonDefs.h:52
Ak3DSpatializationMode spatMode
3D spatialization mode.
Definition: AkCommonDefs.h:271
AkReal32 panBF
Pan back-front [-1,1].
Definition: AkCommonDefs.h:268
const AkDataInterleaveID AK_INTERLEAVED
Interleaved data.
Definition: AkCommonDefs.h:51
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig)
Attach interleaved data with a new channel config. Allocation is performed outside.
Definition: AkCommonDefs.h:373
void SetAll(AkUInt32 in_uSampleRate, AkChannelConfig in_channelConfig, AkUInt32 in_uBitsPerSample, AkUInt32 in_uBlockAlign, AkUInt32 in_uTypeID, AkUInt32 in_uInterleaveID)
Definition: AkCommonDefs.h:124
const AkUInt32 AK_LE_NATIVE_INTERLEAVE
Native interleaved setting.
Definition: AkCommonDefs.h:57
AkForceInline AkUInt16 MaxFrames() const
Definition: AkCommonDefs.h:489

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise