목차

Wwise SDK 2018.1.11
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  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkCommonDefs.h
29 
30 /// \file
31 /// AudioLib common defines, enums, and structs.
32 
33 
34 #ifndef _AK_COMMON_DEFS_H_
35 #define _AK_COMMON_DEFS_H_
36 
39 
40 //-----------------------------------------------------------------------------
41 // AUDIO DATA FORMAT
42 //-----------------------------------------------------------------------------
43 
44 // Audio data format.
45 // ------------------------------------------------
46 
47 const AkDataTypeID AK_INT = 0; ///< Integer data type (uchar, short, and so on)
48 const AkDataTypeID AK_FLOAT = 1; ///< Float data type
49 
50 const AkDataInterleaveID AK_INTERLEAVED = 0; ///< Interleaved data
51 const AkDataInterleaveID AK_NONINTERLEAVED = 1; ///< Non-interleaved data
52 
53 // Native format currently the same on all supported platforms, may become platform specific in the future
54 const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE = 32; ///< Native number of bits per sample.
55 const AkUInt32 AK_LE_NATIVE_SAMPLETYPE = AK_FLOAT; ///< Native data type.
56 const AkUInt32 AK_LE_NATIVE_INTERLEAVE = AK_NONINTERLEAVED; ///< Native interleaved setting.
57 
58 /// Defines the parameters of an audio buffer format.
60 {
61  AkUInt32 uSampleRate; ///< Number of samples per second
62 
63  AkChannelConfig channelConfig; ///< Channel configuration.
64 
65  AkUInt32 uBitsPerSample :6; ///< Number of bits per sample.
66  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.
67  AkUInt32 uTypeID :2; ///< Data type ID (AkDataTypeID).
68  AkUInt32 uInterleaveID :1; ///< Interleave ID (AkDataInterleaveID).
69 
70  /// Get the number of channels.
71  /// \return The number of channels
73  {
75  }
76 
77  /// Query if LFE channel is present.
78  /// \return True when LFE channel is present
79  AkForceInline bool HasLFE() const
80  {
81  return channelConfig.HasLFE();
82  }
83 
84  /// Query if center channel is present.
85  /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
86  /// so HasCenter() returns true for mono signals.
87  /// \return True when center channel is present and configuration has more than 2 channels.
88  AkForceInline bool HasCenter() const
89  {
90  return channelConfig.HasCenter();
91  }
92 
93  /// Get the number of bits per sample.
94  /// \return The number of bits per sample
96  {
97  return uBitsPerSample;
98  }
99 
100  /// Get the block alignment.
101  /// \return The block alignment
103  {
104  return uBlockAlign;
105  }
106 
107  /// Get the data sample format (Float or Integer).
108  /// \return The data sample format
110  {
111  return uTypeID;
112  }
113 
114  /// Get the interleaved type.
115  /// \return The interleaved type
117  {
118  return uInterleaveID;
119  }
120 
121  /// Set all parameters of the audio format structure.
122  /// Channels are specified by channel mask (standard configs).
123  void SetAll(
124  AkUInt32 in_uSampleRate, ///< Number of samples per second
125  AkChannelConfig in_channelConfig, ///< Channel configuration
126  AkUInt32 in_uBitsPerSample, ///< Number of bits per sample
127  AkUInt32 in_uBlockAlign, ///< Block alignment
128  AkUInt32 in_uTypeID, ///< Data sample format (Float or Integer)
129  AkUInt32 in_uInterleaveID ///< Interleaved type
130  )
131  {
132  uSampleRate = in_uSampleRate;
133  channelConfig = in_channelConfig;
134  uBitsPerSample = in_uBitsPerSample;
135  uBlockAlign = in_uBlockAlign;
136  uTypeID = in_uTypeID;
137  uInterleaveID = in_uInterleaveID;
138  }
139 
140  /// Checks if the channel configuration is supported by the source pipeline.
141  /// \return The interleaved type
143  {
145  }
146 
147  AkForceInline bool operator==(const AkAudioFormat & in_other) const
148  {
149  return uSampleRate == in_other.uSampleRate
150  && channelConfig == in_other.channelConfig
151  && uBitsPerSample == in_other.uBitsPerSample
152  && uBlockAlign == in_other.uBlockAlign
153  && uTypeID == in_other.uTypeID
154  && uInterleaveID == in_other.uInterleaveID;
155  }
156 
157  AkForceInline bool operator!=(const AkAudioFormat & in_other) const
158  {
159  return uSampleRate != in_other.uSampleRate
160  || channelConfig != in_other.channelConfig
161  || uBitsPerSample != in_other.uBitsPerSample
162  || uBlockAlign != in_other.uBlockAlign
163  || uTypeID != in_other.uTypeID
164  || uInterleaveID != in_other.uInterleaveID;
165  }
166 };
167 
169 {
170  SourceChannelOrdering_Standard = 0, // SMPTE L-R-C-LFE-RL-RR-RC-SL-SR-HL-HR-HC-HRL-HRR-HRC-T
171  // or ACN ordering + SN3D norm
172 
173  SourceChannelOrdering_Film, // L/C/R/Ls/Rs/Lfe
175 };
176 
177 #define AK_MAKE_CHANNELCONFIGOVERRIDE(_config,_order) ((AkInt64)_config.Serialize()|((AkInt64)_order<<32))
178 #define AK_GET_CHANNELCONFIGOVERRIDE_CONFIG(_over) (_over&UINT_MAX)
179 #define AK_GET_CHANNELCONFIGOVERRIDE_ORDERING(_over) ((AkSourceChannelOrdering)(_over>>32))
180 
181 // Build a 32 bit class identifier based on the Plug-in type,
182 // CompanyID and PluginID.
183 //
184 // Parameters:
185 // - in_pluginType: A value from enum AkPluginType (4 bits)
186 // - in_companyID: CompanyID as defined in the Plug-in's XML file (12 bits)
187 // * 0-63: Reserved for Audiokinetic
188 // * 64-255: Reserved for clients' in-house Plug-ins
189 // * 256-4095: Assigned by Audiokinetic to third-party plug-in developers
190 // - in_pluginID: PluginID as defined in the Plug-in's XML file (16 bits)
191 // * 0-32767: Set freely by the Plug-in developer
192 #define AKMAKECLASSID( in_pluginType, in_companyID, in_pluginID ) \
193  ( (in_pluginType) + ( (in_companyID) << 4 ) + ( (in_pluginID) << ( 4 + 12 ) ) )
194 
195 #define AKGETPLUGINTYPEFROMCLASSID( in_classID ) ( (in_classID) & AkPluginTypeMask )
196 #define AKGETCOMPANYIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0x0000FFF0 ) >> 4 )
197 #define AKGETPLUGINIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0xFFFF0000 ) >> ( 4 + 12 ) )
198 
199 #define CODECID_FROM_PLUGINID AKGETPLUGINIDFROMCLASSID
200 
201 
202 namespace AK
203 {
204  /// Interface to retrieve metering information about a buffer.
205  class IAkMetering
206  {
207  protected:
208  /// Virtual destructor on interface to avoid warnings.
209  virtual ~IAkMetering(){}
210 
211  public:
212 
213  /// Get peak of each channel in this frame.
214  /// Depending on when this function is called, you may get metering data computed in the previous frame only. In order to force recomputing of
215  /// meter values, pass in_bForceCompute=true.
216  /// \return Vector of linear peak levels, corresponding to each channel. NULL if AK_EnableBusMeter_Peak is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
218 
219  /// Get true peak of each channel (as defined by ITU-R BS.1770) in this frame.
220  /// Depending on when this function is called, you may get metering data computed in the previous frame only.
221  /// \return 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()).
223 
224  /// Get the RMS value of each channel in this frame.
225  /// Depending on when this function is called, you may get metering data computed in the previous frame only. In order to force recomputing of
226  /// meter values, pass in_bForceCompute=true.
227  /// \return Vector of linear rms levels, corresponding to each channel. NULL if AK_EnableBusMeter_RMS is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
229 
230  /// Get the mean k-weighted power value in this frame, used to compute loudness (as defined by ITU-R BS.1770).
231  /// Depending on when this function is called, you may get metering data computed in the previous frame only.
232  /// \return Total linear k-weighted power of all channels. 0 if AK_EnableBusMeter_KPower is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
233  virtual AkReal32 GetKWeightedPower() = 0;
234  };
235 }
236 
237 // Audio buffer.
238 // ------------------------------------------------
239 
240 /// Native sample type.
241 /// \remarks Sample values produced by insert effects must use this type.
242 /// \remarks Source plug-ins can produce samples of other types (specified through
243 /// according fields of AkAudioFormat, at initial handshaking), but these will be
244 /// format converted internally into the native format.
245 /// \sa
246 /// - \ref iaksourceeffect_init
247 /// - \ref iakmonadiceffect_init
248 typedef AkReal32 AkSampleType; ///< Audio sample data type (32 bit floating point)
249 
250 /// Audio buffer structure including the address of an audio buffer, the number of valid frames inside,
251 /// and the maximum number of frames the audio buffer can hold.
252 /// \sa
253 /// - \ref fx_audiobuffer_struct
255 {
256 public:
257 
258  /// Constructor.
260  {
261  Clear();
262  }
263 
264  /// Clear data pointer.
266  {
267  pData = NULL;
268  }
269 
270  /// Clear members.
272  {
273  ClearData();
274  uValidFrames = 0;
275  uMaxFrames = 0;
277  }
278 
279  /// \name Channel queries.
280  //@{
281  /// Get the number of channels.
283  {
285  }
286 
287  /// Returns true if there is an LFE channel present.
288  AkForceInline bool HasLFE() const
289  {
290  return channelConfig.HasLFE();
291  }
292 
294 
295  //@}
296 
297  /// \name Interleaved interface
298  //@{
299  /// Get address of data: to be used with interleaved buffers only.
300  /// \remarks Only source plugins can output interleaved data. This is determined at
301  /// initial handshaking.
302  /// \sa
303  /// - \ref fx_audiobuffer_struct
305  {
306  return pData;
307  }
308 
309  /// Attach interleaved data. Allocation is performed outside.
310  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
311  {
312  pData = in_pData;
313  uMaxFrames = in_uMaxFrames;
314  uValidFrames = in_uValidFrames;
315  channelConfig = in_channelConfig;
316  }
317  //@}
318 
319  /// \name Deinterleaved interface
320  //@{
321 
322  /// Check if buffer has samples attached to it.
323  AkForceInline bool HasData() const
324  {
325  return ( NULL != pData );
326  }
327 
328  /// Convert a channel, identified by a single channel bit, to a buffer index used in GetChannel() below, for a given channel config.
329  /// Standard indexing follows channel bit order (see AkSpeakerConfig.h). Pipeline/buffer indexing is the same but the LFE is moved to the end.
332 #ifdef AK_LFECENTER
333  in_channelConfig ///< Channel configuration.
334 #endif
335  , AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
336  )
337  {
338 #ifdef AK_LFECENTER
339  if ( in_channelConfig.HasLFE() )
340  {
341  AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
342  AKASSERT( AK::GetNumNonZeroBits( in_channelConfig.uChannelMask ) );
343  AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
344  if ( in_uChannelIdx == uIdxLFE )
345  return in_channelConfig.uNumChannels - 1;
346  else if ( in_uChannelIdx > uIdxLFE )
347  return in_uChannelIdx - 1;
348  }
349 #endif
350  return in_uChannelIdx;
351  }
352 
353  /// Get the buffer of the ith channel.
354  /// Access to channel data is most optimal through this method. Use whenever the
355  /// speaker configuration is known, or when an operation must be made independently
356  /// for each channel.
357  /// \remarks When using a standard configuration, use ChannelMaskToBufferIndex() to convert channel bits to buffer indices.
358  /// \return Address of the buffer of the ith channel.
359  /// \sa
360  /// - \ref fx_audiobuffer_struct
361  /// - \ref fx_audiobuffer_struct_channels
363  AkUInt32 in_uIndex ///< Channel index [0,NumChannels()-1]
364  )
365  {
366  AKASSERT( in_uIndex < NumChannels() );
367  return (AkSampleType*)((AkUInt8*)(pData) + ( in_uIndex * sizeof(AkSampleType) * MaxFrames() ));
368  }
369 
370  /// Get the buffer of the LFE.
371  /// \return Address of the buffer of the LFE. Null if there is no LFE channel.
372  /// \sa
373  /// - \ref fx_audiobuffer_struct_channels
374  inline AkSampleType * GetLFE()
375  {
377  return GetChannel( NumChannels()-1 );
378 
379  return (AkSampleType*)0;
380  }
381 
382  /// Can be used to transform an incomplete into a complete buffer with valid data.
383  /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
385  {
386  // Zero out all channels.
387  const AkUInt32 uNumChannels = NumChannels();
388  const AkUInt32 uNumZeroFrames = MaxFrames()-uValidFrames;
389  if ( uNumZeroFrames )
390  {
391  for ( AkUInt32 i = 0; i < uNumChannels; ++i )
392  {
393  AKPLATFORM::AkMemSet( GetChannel(i) + uValidFrames, 0, uNumZeroFrames * sizeof(AkSampleType) );
394  }
396  }
397  }
398 
399  /// Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
400  AkForceInline void AttachContiguousDeinterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
401  {
402  AttachInterleavedData( in_pData, in_uMaxFrames, in_uValidFrames, in_channelConfig );
403  }
404  /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
406  {
407  uMaxFrames = 0;
408  uValidFrames = 0;
410  void * pDataOld = pData;
411  pData = NULL;
412  return pDataOld;
413  }
414 
415 #if defined(AK_CHECK_AUDIO_BUFFER_VALID)
416  bool CheckValidSamples()
417  {
418  // Zero out all channels.
419  const AkUInt32 uNumChannels = NumChannels();
420  for ( AkUInt32 i = 0; i < uNumChannels; ++i )
421  {
422  AkSampleType * AK_RESTRICT pfChan = GetChannel(i);
423  if ( pfChan )
424  {
425  for ( AkUInt32 j = 0; j < uValidFrames; j++ )
426  {
427  AkSampleType fSample = *pfChan++;
428  if ( fSample > 4.f )
429  return false;
430  else if ( fSample < -4.f )
431  return false;
432  }
433  }
434  }
435 
436  return true;
437  }
438 #endif
439 
440  //@}
441 
442  void RelocateMedia( AkUInt8* in_pNewMedia, AkUInt8* in_pOldMedia )
443  {
444  AkUIntPtr uMemoryOffset = (AkUIntPtr)in_pNewMedia - (AkUIntPtr)in_pOldMedia;
445  pData = (void*) (((AkUIntPtr)pData) + uMemoryOffset);
446  }
447 
448 protected:
449 
450  void * pData; ///< Start of the audio buffer.
451 
452  AkChannelConfig channelConfig; ///< Channel config.
453 public:
454  AKRESULT eState; ///< Execution status
455 protected:
456  AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
457 
458 public:
459  /// Access to the number of sample frames the buffer can hold.
460  /// \return Number of sample frames the buffer can hold.
462 
463  AkUInt16 uValidFrames; ///< Number of valid sample frames in the audio buffer
464 } AK_ALIGN_DMA;
465 
466 #endif // _AK_COMMON_DEFS_H_
467 
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
Definition: AkCommonDefs.h:463
AkAudioBuffer()
Constructor.
Definition: AkCommonDefs.h:259
AkUInt32 uChannelMask
Channel mask (configuration).
Definition: AkSpeakerConfig.h:512
uint16_t AkUInt16
Unsigned 16-bit integer.
Definition: AkTypes.h:78
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
Definition: AkCommonDefs.h:282
AkForceInline bool HasCenter() const
Definition: AkCommonDefs.h:88
AkForceInline AkUInt16 MaxFrames() const
Definition: AkCommonDefs.h:461
Defines the parameters of an audio buffer format.
Definition: AkCommonDefs.h:59
AkUInt32 uNumChannels
Number of channels.
Definition: AkSpeakerConfig.h:510
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:304
AkUInt32 uTypeID
Data type ID (AkDataTypeID).
Definition: AkCommonDefs.h:67
AKRESULT
Standard function call result.
Definition: AkTypes.h:126
const AkDataInterleaveID AK_INTERLEAVED
Interleaved data.
Definition: AkCommonDefs.h:50
uint8_t AkUInt8
Unsigned 8-bit integer.
Definition: AkTypes.h:77
AkForceInline bool IsChannelConfigSupported() const
Definition: AkSpeakerConfig.h:648
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:400
const AkDataInterleaveID AK_NONINTERLEAVED
Non-interleaved data.
Definition: AkCommonDefs.h:51
AkForceInline void Clear()
Clear members.
Definition: AkCommonDefs.h:271
Audiokinetic namespace.
AkChannelConfig channelConfig
Channel configuration.
Definition: AkCommonDefs.h:63
virtual ~IAkMetering()
Virtual destructor on interface to avoid warnings.
Definition: AkCommonDefs.h:209
AKRESULT eState
Execution status.
Definition: AkCommonDefs.h:454
AkUInt8 AkDataInterleaveID
Data interleaved state ID.
Definition: AkTypes.h:80
AkUInt32 uInterleaveID
Interleave ID (AkDataInterleaveID).
Definition: AkCommonDefs.h:68
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:66
Channels must be identified with standard defines in AkSpeakerConfigs.
Definition: AkSpeakerConfig.h:481
AkForceInline AkUInt32 GetBlockAlign() const
Definition: AkCommonDefs.h:102
AkForceInline AkUInt32 GetBitsPerSample() const
Definition: AkCommonDefs.h:95
AkReal32 AkSampleType
Audio sample data type (32 bit floating point)
Definition: AkCommonDefs.h:248
#define AKASSERT(Condition)
Definition: AkAssert.h:69
AkForceInline AkUInt32 GetNumChannels() const
Definition: AkCommonDefs.h:72
#define AK_RESTRICT
Refers to the __restrict compilation flag available on some platforms.
Definition: AkTypes.h:59
AkForceInline bool operator==(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:147
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
Definition: AkCommonDefs.h:405
#define AkForceInline
Force inlining.
Definition: AkTypes.h:63
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:456
AkUInt16 AkDataTypeID
Data sample type ID.
Definition: AkTypes.h:79
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
Definition: AkCommonDefs.h:442
AkChannelConfig channelConfig
Channel config.
Definition: AkCommonDefs.h:452
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Definition: AkCommonDefs.h:362
const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE
Native number of bits per sample.
Definition: AkCommonDefs.h:54
class AkAudioBuffer AK_ALIGN_DMA
const AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
Definition: AkSpeakerVolumes.h:51
AkForceInline bool IsChannelConfigSupported() const
Definition: AkCommonDefs.h:142
The consumer needs more.
Definition: AkTypes.h:171
AkForceInline void AkMemSet(void *pDest, AkInt32 iVal, AkUInt32 uSize)
Platform Independent Helper.
Definition: AkPlatformFuncs.h:336
virtual AK::SpeakerVolumes::ConstVectorPtr GetRMS()=0
AkForceInline AkUInt32 GetInterleaveID() const
Definition: AkCommonDefs.h:116
AkForceInline AkUInt32 GetTypeID() const
Definition: AkCommonDefs.h:109
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
Definition: AkSpeakerConfig.h:536
const AkUInt32 AK_LE_NATIVE_SAMPLETYPE
Native data type.
Definition: AkCommonDefs.h:55
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:293
AkUInt32 uBitsPerSample
Number of bits per sample.
Definition: AkCommonDefs.h:65
#define AK_LFECENTER
Internal use.
Definition: AkTypes.h:36
#define NULL
Definition: AkTypes.h:49
const AkUInt32 AK_LE_NATIVE_INTERLEAVE
Native interleaved setting.
Definition: AkCommonDefs.h:56
Interface to retrieve metering information about a buffer.
Definition: AkCommonDefs.h:205
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
Definition: AkPlatformFuncs.h:103
const AkDataTypeID AK_FLOAT
Float data type.
Definition: AkCommonDefs.h:48
virtual AK::SpeakerVolumes::ConstVectorPtr GetPeak()=0
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig)
Attach interleaved data. Allocation is performed outside.
Definition: AkCommonDefs.h:310
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
AkSampleType * GetLFE()
Definition: AkCommonDefs.h:374
AkForceInline bool operator!=(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:157
AkUInt32 uSampleRate
Number of samples per second.
Definition: AkCommonDefs.h:61
virtual AkReal32 GetKWeightedPower()=0
uint32_t AkUInt32
Unsigned 32-bit integer.
Definition: AkTypes.h:79
AkSourceChannelOrdering
Definition: AkCommonDefs.h:168
void SetAll(AkUInt32 in_uSampleRate, AkChannelConfig in_channelConfig, AkUInt32 in_uBitsPerSample, AkUInt32 in_uBlockAlign, AkUInt32 in_uTypeID, AkUInt32 in_uInterleaveID)
Definition: AkCommonDefs.h:123
void ZeroPadToMaxFrames()
Definition: AkCommonDefs.h:384
#define AK_SPEAKER_LOW_FREQUENCY
Low-frequency speaker bit mask.
Definition: AkSpeakerConfig.h:37
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:330
float AkReal32
32-bit floating point
Definition: AkTypes.h:97
AkForceInline void ClearData()
Clear data pointer.
Definition: AkCommonDefs.h:265
AkForceInline bool HasLFE() const
Definition: AkCommonDefs.h:79
AkForceInline bool HasCenter() const
Definition: AkSpeakerConfig.h:694
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
Definition: AkCommonDefs.h:288
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:323
uint64_t AkUIntPtr
Definition: AkTypes.h:84
const AkDataTypeID AK_INT
Integer data type (uchar, short, and so on)
Definition: AkCommonDefs.h:47
void * pData
Start of the audio buffer.
Definition: AkCommonDefs.h:450
AkForceInline bool HasLFE() const
Definition: AkSpeakerConfig.h:681