Table of Contents

Wwise SDK 2019.2.3
AkCommonDefs.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  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 
37 #include <AK/SoundEngine/Common/AkSpeakerConfig.h>
38 #include <AK/SoundEngine/Common/AkSpeakerVolumes.h>
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
72  AkForceInline AkUInt32 GetNumChannels() const
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
95  AkForceInline AkUInt32 GetBitsPerSample() const
96  {
97  return uBitsPerSample;
98  }
99 
100  /// Get the block alignment.
101  /// \return The block alignment
102  AkForceInline AkUInt32 GetBlockAlign() const
103  {
104  return uBlockAlign;
105  }
106 
107  /// Get the data sample format (Float or Integer).
108  /// \return The data sample format
109  AkForceInline AkUInt32 GetTypeID() const
110  {
111  return uTypeID;
112  }
113 
114  /// Get the interleaved type.
115  /// \return The interleaved type
116  AkForceInline AkUInt32 GetInterleaveID() const
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
142  AkForceInline bool IsChannelConfigSupported() const
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 
168 typedef AkUInt8(*AkChannelMappingFunc)(const AkChannelConfig &config, AkUInt8 idx);
169 
170 enum AkSourceChannelOrdering
171 {
172  SourceChannelOrdering_Standard = 0, // SMPTE L-R-C-LFE-RL-RR-RC-SL-SR-HL-HR-HC-HRL-HRR-HRC-T
173  // or ACN ordering + SN3D norm
174 
175  SourceChannelOrdering_Film, // L/C/R/Ls/Rs/Lfe
176  SourceChannelOrdering_FuMa
177 };
178 
179 #define AK_MAKE_CHANNELCONFIGOVERRIDE(_config,_order) ((AkInt64)_config.Serialize()|((AkInt64)_order<<32))
180 #define AK_GET_CHANNELCONFIGOVERRIDE_CONFIG(_over) (_over&UINT_MAX)
181 #define AK_GET_CHANNELCONFIGOVERRIDE_ORDERING(_over) ((AkSourceChannelOrdering)(_over>>32))
182 
183 // Build a 32 bit class identifier based on the Plug-in type,
184 // CompanyID and PluginID.
185 //
186 // Parameters:
187 // - in_pluginType: A value from enum AkPluginType (4 bits)
188 // - in_companyID: CompanyID as defined in the Plug-in's XML file (12 bits)
189 // * 0-63: Reserved for Audiokinetic
190 // * 64-255: Reserved for clients' in-house Plug-ins
191 // * 256-4095: Assigned by Audiokinetic to third-party plug-in developers
192 // - in_pluginID: PluginID as defined in the Plug-in's XML file (16 bits)
193 // * 0-32767: Set freely by the Plug-in developer
194 #define AKMAKECLASSID( in_pluginType, in_companyID, in_pluginID ) \
195  ( (in_pluginType) + ( (in_companyID) << 4 ) + ( (in_pluginID) << ( 4 + 12 ) ) )
196 
197 #define AKGETPLUGINTYPEFROMCLASSID( in_classID ) ( (in_classID) & AkPluginTypeMask )
198 #define AKGETCOMPANYIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0x0000FFF0 ) >> 4 )
199 #define AKGETPLUGINIDFROMCLASSID( in_classID ) ( ( (in_classID) & 0xFFFF0000 ) >> ( 4 + 12 ) )
200 
201 #define CODECID_FROM_PLUGINID AKGETPLUGINIDFROMCLASSID
202 
203 
204 namespace AK
205 {
206  /// Interface to retrieve metering information about a buffer.
207  class IAkMetering
208  {
209  protected:
210  /// Virtual destructor on interface to avoid warnings.
211  virtual ~IAkMetering(){}
212 
213  public:
214 
215  /// Get peak of each channel in this frame.
216  /// Depending on when this function is called, you may get metering data computed in the previous frame only. In order to force recomputing of
217  /// meter values, pass in_bForceCompute=true.
218  /// \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()).
220 
221  /// Get true peak of each channel (as defined by ITU-R BS.1770) in this frame.
222  /// Depending on when this function is called, you may get metering data computed in the previous frame only.
223  /// \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()).
225 
226  /// Get the RMS value of each channel in this frame.
227  /// Depending on when this function is called, you may get metering data computed in the previous frame only. In order to force recomputing of
228  /// meter values, pass in_bForceCompute=true.
229  /// \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()).
231 
232  /// Get the mean k-weighted power value in this frame, used to compute loudness (as defined by ITU-R BS.1770).
233  /// Depending on when this function is called, you may get metering data computed in the previous frame only.
234  /// \return Total linear k-weighted power of all channels. 0 if AK_EnableBusMeter_KPower is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
235  virtual AkReal32 GetKWeightedPower() = 0;
236  };
237 }
238 
239 // Audio buffer.
240 // ------------------------------------------------
241 
242 /// Native sample type.
243 /// \remarks Sample values produced by insert effects must use this type.
244 /// \remarks Source plug-ins can produce samples of other types (specified through
245 /// according fields of AkAudioFormat, at initial handshaking), but these will be
246 /// format converted internally into the native format.
247 /// \sa
248 /// - \ref iaksourceeffect_init
249 /// - \ref iakmonadiceffect_init
250 typedef AkReal32 AkSampleType; ///< Audio sample data type (32 bit floating point)
251 
252 /// Audio buffer structure including the address of an audio buffer, the number of valid frames inside,
253 /// and the maximum number of frames the audio buffer can hold.
254 /// \sa
255 /// - \ref fx_audiobuffer_struct
257 {
258 public:
259 
260  /// Constructor.
262  {
263  Clear();
264  }
265 
266  /// Clear data pointer.
267  AkForceInline void ClearData()
268  {
269  pData = NULL;
270  }
271 
272  /// Clear members.
273  AkForceInline void Clear()
274  {
275  ClearData();
276  uValidFrames = 0;
277  uMaxFrames = 0;
278  eState = AK_DataNeeded;
279  }
280 
281  /// \name Channel queries.
282  //@{
283  /// Get the number of channels.
284  AkForceInline AkUInt32 NumChannels() const
285  {
287  }
288 
289  /// Returns true if there is an LFE channel present.
290  AkForceInline bool HasLFE() const
291  {
292  return channelConfig.HasLFE();
293  }
294 
295  AkForceInline AkChannelConfig GetChannelConfig() const { return channelConfig; }
296 
297  //@}
298 
299  /// \name Interleaved interface
300  //@{
301  /// Get address of data: to be used with interleaved buffers only.
302  /// \remarks Only source plugins can output interleaved data. This is determined at
303  /// initial handshaking.
304  /// \sa
305  /// - \ref fx_audiobuffer_struct
306  AkForceInline void * GetInterleavedData()
307  {
308  return pData;
309  }
310 
311  /// Attach interleaved data. Allocation is performed outside.
312  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames )
313  {
314  pData = in_pData;
315  uMaxFrames = in_uMaxFrames;
316  uValidFrames = in_uValidFrames;
317  AKASSERT(channelConfig.IsValid());
318  }
319  /// Attach interleaved data with a new channel config. Allocation is performed outside.
320  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
321  {
322  pData = in_pData;
323  uMaxFrames = in_uMaxFrames;
324  uValidFrames = in_uValidFrames;
325  channelConfig = in_channelConfig;
326  }
327  //@}
328 
329  /// \name Deinterleaved interface
330  //@{
331 
332  /// Check if buffer has samples attached to it.
333  AkForceInline bool HasData() const
334  {
335  return ( NULL != pData );
336  }
337 
338  /// Convert a channel, identified by a single channel bit, to a buffer index used in GetChannel() below, for a given channel config.
339  /// Standard indexing follows channel bit order (see AkSpeakerConfig.h). Pipeline/buffer indexing is the same but the LFE is moved to the end.
340  static inline AkUInt32 StandardToPipelineIndex(
342 #ifdef AK_LFECENTER
343  in_channelConfig ///< Channel configuration.
344 #endif
345  , AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
346  )
347  {
348 #ifdef AK_LFECENTER
349  if ( in_channelConfig.HasLFE() )
350  {
351  AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
352  AKASSERT( AK::GetNumNonZeroBits( in_channelConfig.uChannelMask ) );
353  AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
354  if ( in_uChannelIdx == uIdxLFE )
355  return in_channelConfig.uNumChannels - 1;
356  else if ( in_uChannelIdx > uIdxLFE )
357  return in_uChannelIdx - 1;
358  }
359 #endif
360  return in_uChannelIdx;
361  }
362 
363  /// Get the buffer of the ith channel.
364  /// Access to channel data is most optimal through this method. Use whenever the
365  /// speaker configuration is known, or when an operation must be made independently
366  /// for each channel.
367  /// \remarks When using a standard configuration, use ChannelMaskToBufferIndex() to convert channel bits to buffer indices.
368  /// \return Address of the buffer of the ith channel.
369  /// \sa
370  /// - \ref fx_audiobuffer_struct
371  /// - \ref fx_audiobuffer_struct_channels
372  inline AkSampleType * GetChannel(
373  AkUInt32 in_uIndex ///< Channel index [0,NumChannels()-1]
374  )
375  {
376  AKASSERT( in_uIndex < NumChannels() );
377  return (AkSampleType*)((AkUInt8*)(pData) + ( in_uIndex * sizeof(AkSampleType) * MaxFrames() ));
378  }
379 
380  /// Get the buffer of the LFE.
381  /// \return Address of the buffer of the LFE. Null if there is no LFE channel.
382  /// \sa
383  /// - \ref fx_audiobuffer_struct_channels
384  inline AkSampleType * GetLFE()
385  {
386  if ( channelConfig.uChannelMask & AK_SPEAKER_LOW_FREQUENCY )
387  return GetChannel( NumChannels()-1 );
388 
389  return (AkSampleType*)0;
390  }
391 
392  /// Can be used to transform an incomplete into a complete buffer with valid data.
393  /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
395  {
396  // Zero out all channels.
397  const AkUInt32 uNumChannels = NumChannels();
398  const AkUInt32 uNumZeroFrames = MaxFrames()-uValidFrames;
399  if ( uNumZeroFrames )
400  {
401  for ( AkUInt32 i = 0; i < uNumChannels; ++i )
402  {
403  AKPLATFORM::AkMemSet( GetChannel(i) + uValidFrames, 0, uNumZeroFrames * sizeof(AkSampleType) );
404  }
406  }
407  }
408 
409  /// Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
410  AkForceInline void AttachContiguousDeinterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
411  {
412  AttachInterleavedData( in_pData, in_uMaxFrames, in_uValidFrames, in_channelConfig );
413  }
414  /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
415  AkForceInline void * DetachContiguousDeinterleavedData()
416  {
417  uMaxFrames = 0;
418  uValidFrames = 0;
420  void * pDataOld = pData;
421  pData = NULL;
422  return pDataOld;
423  }
424 
425  bool CheckValidSamples();
426 
427  //@}
428 
429  void RelocateMedia( AkUInt8* in_pNewMedia, AkUInt8* in_pOldMedia )
430  {
431  AkUIntPtr uMemoryOffset = (AkUIntPtr)in_pNewMedia - (AkUIntPtr)in_pOldMedia;
432  pData = (void*) (((AkUIntPtr)pData) + uMemoryOffset);
433  }
434 
435 protected:
436 
437  void * pData; ///< Start of the audio buffer.
438 
439  AkChannelConfig channelConfig; ///< Channel config.
440 public:
441  AKRESULT eState; ///< Execution status
442 protected:
443  AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
444 
445 public:
446  /// Access to the number of sample frames the buffer can hold.
447  /// \return Number of sample frames the buffer can hold.
448  AkForceInline AkUInt16 MaxFrames() const { return uMaxFrames; }
449 
450  AkUInt16 uValidFrames; ///< Number of valid sample frames in the audio buffer
451 } AK_ALIGN_DMA;
452 
453 #endif // _AK_COMMON_DEFS_H_
454 
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
Definition: AkCommonDefs.h:290
AkForceInline bool IsChannelConfigSupported() const
Definition: AkSpeakerConfig.h:648
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Definition: AkCommonDefs.h:372
Interface to retrieve metering information about a buffer.
Definition: AkCommonDefs.h:207
Audiokinetic namespace.
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:333
AkForceInline bool HasCenter() const
Definition: AkSpeakerConfig.h:694
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:295
AkAudioBuffer()
Constructor.
Definition: AkCommonDefs.h:261
AkUInt32 uNumChannels
Number of channels.
Definition: AkSpeakerConfig.h:510
virtual AkReal32 GetKWeightedPower()=0
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
Definition: AkCommonDefs.h:415
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
Definition: AkCommonDefs.h:284
AkForceInline void Clear()
Clear members.
Definition: AkCommonDefs.h:273
AkUInt32 uChannelMask
Channel mask (configuration).
Definition: AkSpeakerConfig.h:512
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:340
AkForceInline bool IsChannelConfigSupported() const
Definition: AkCommonDefs.h:142
AkForceInline bool HasCenter() const
Definition: AkCommonDefs.h:88
AkChannelConfig channelConfig
Channel configuration.
Definition: AkCommonDefs.h:63
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
Definition: AkCommonDefs.h:429
AkUInt32 uBitsPerSample
Number of bits per sample.
Definition: AkCommonDefs.h:65
AkUInt32 uTypeID
Data type ID (AkDataTypeID).
Definition: AkCommonDefs.h:67
AKRESULT eState
Execution status
Definition: AkCommonDefs.h:441
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
Definition: AkCommonDefs.h:450
void * pData
Start of the audio buffer.
Definition: AkCommonDefs.h:437
AkChannelConfig channelConfig
Channel config.
Definition: AkCommonDefs.h:439
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:443
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
Definition: AkSpeakerConfig.h:536
AkForceInline void AkMemSet(void *pDest, AkInt32 iVal, AkUInt32 uSize)
Platform Independent Helper.
Definition: AkPlatformFuncs.h:339
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
Definition: AkPlatformFuncs.h:123
AkForceInline AkUInt32 GetBitsPerSample() const
Definition: AkCommonDefs.h:95
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
AkForceInline AkUInt32 GetInterleaveID() const
Definition: AkCommonDefs.h:116
AkForceInline bool operator!=(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:157
void ZeroPadToMaxFrames()
Definition: AkCommonDefs.h:394
AkForceInline bool HasLFE() const
Definition: AkCommonDefs.h:79
AkForceInline AkUInt32 GetBlockAlign() const
Definition: AkCommonDefs.h:102
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:410
AkForceInline bool HasLFE() const
Definition: AkSpeakerConfig.h:681
AkForceInline bool operator==(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:147
AkSampleType * GetLFE()
Definition: AkCommonDefs.h:384
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:306
virtual AK::SpeakerVolumes::ConstVectorPtr GetPeak()=0
AkForceInline AkUInt32 GetNumChannels() const
Definition: AkCommonDefs.h:72
const typedef AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
Definition: AkSpeakerVolumes.h:51
Defines the parameters of an audio buffer format.
Definition: AkCommonDefs.h:59
AkUInt32 uInterleaveID
Interleave ID (AkDataInterleaveID).
Definition: AkCommonDefs.h:68
virtual ~IAkMetering()
Virtual destructor on interface to avoid warnings.
Definition: AkCommonDefs.h:211
bool CheckValidSamples()
AkForceInline AkUInt32 GetTypeID() const
Definition: AkCommonDefs.h:109
AkForceInline bool IsValid() const
Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
Definition: AkSpeakerConfig.h:579
AkForceInline void ClearData()
Clear data pointer.
Definition: AkCommonDefs.h:267
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames)
Attach interleaved data. Allocation is performed outside.
Definition: AkCommonDefs.h:312
AkUInt32 uSampleRate
Number of samples per second.
Definition: AkCommonDefs.h:61
virtual AK::SpeakerVolumes::ConstVectorPtr GetRMS()=0
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:320
void SetAll(AkUInt32 in_uSampleRate, AkChannelConfig in_channelConfig, AkUInt32 in_uBitsPerSample, AkUInt32 in_uBlockAlign, AkUInt32 in_uTypeID, AkUInt32 in_uInterleaveID)
Definition: AkCommonDefs.h:123
AkForceInline AkUInt16 MaxFrames() const
Definition: AkCommonDefs.h:448