Table of Contents

Wwise SDK 2019.2.2
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 enum AkSourceChannelOrdering
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
174  SourceChannelOrdering_FuMa
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.
265  AkForceInline void ClearData()
266  {
267  pData = NULL;
268  }
269 
270  /// Clear members.
271  AkForceInline void Clear()
272  {
273  ClearData();
274  uValidFrames = 0;
275  uMaxFrames = 0;
276  eState = AK_DataNeeded;
277  }
278 
279  /// \name Channel queries.
280  //@{
281  /// Get the number of channels.
282  AkForceInline AkUInt32 NumChannels() const
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 
293  AkForceInline AkChannelConfig GetChannelConfig() const { return channelConfig; }
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
304  AkForceInline void * GetInterleavedData()
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 )
311  {
312  pData = in_pData;
313  uMaxFrames = in_uMaxFrames;
314  uValidFrames = in_uValidFrames;
315  AKASSERT(channelConfig.IsValid());
316  }
317  /// Attach interleaved data with a new channel config. Allocation is performed outside.
318  inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
319  {
320  pData = in_pData;
321  uMaxFrames = in_uMaxFrames;
322  uValidFrames = in_uValidFrames;
323  channelConfig = in_channelConfig;
324  }
325  //@}
326 
327  /// \name Deinterleaved interface
328  //@{
329 
330  /// Check if buffer has samples attached to it.
331  AkForceInline bool HasData() const
332  {
333  return ( NULL != pData );
334  }
335 
336  /// Convert a channel, identified by a single channel bit, to a buffer index used in GetChannel() below, for a given channel config.
337  /// Standard indexing follows channel bit order (see AkSpeakerConfig.h). Pipeline/buffer indexing is the same but the LFE is moved to the end.
338  static inline AkUInt32 StandardToPipelineIndex(
340 #ifdef AK_LFECENTER
341  in_channelConfig ///< Channel configuration.
342 #endif
343  , AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
344  )
345  {
346 #ifdef AK_LFECENTER
347  if ( in_channelConfig.HasLFE() )
348  {
349  AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
350  AKASSERT( AK::GetNumNonZeroBits( in_channelConfig.uChannelMask ) );
351  AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
352  if ( in_uChannelIdx == uIdxLFE )
353  return in_channelConfig.uNumChannels - 1;
354  else if ( in_uChannelIdx > uIdxLFE )
355  return in_uChannelIdx - 1;
356  }
357 #endif
358  return in_uChannelIdx;
359  }
360 
361  /// Get the buffer of the ith channel.
362  /// Access to channel data is most optimal through this method. Use whenever the
363  /// speaker configuration is known, or when an operation must be made independently
364  /// for each channel.
365  /// \remarks When using a standard configuration, use ChannelMaskToBufferIndex() to convert channel bits to buffer indices.
366  /// \return Address of the buffer of the ith channel.
367  /// \sa
368  /// - \ref fx_audiobuffer_struct
369  /// - \ref fx_audiobuffer_struct_channels
370  inline AkSampleType * GetChannel(
371  AkUInt32 in_uIndex ///< Channel index [0,NumChannels()-1]
372  )
373  {
374  AKASSERT( in_uIndex < NumChannels() );
375  return (AkSampleType*)((AkUInt8*)(pData) + ( in_uIndex * sizeof(AkSampleType) * MaxFrames() ));
376  }
377 
378  /// Get the buffer of the LFE.
379  /// \return Address of the buffer of the LFE. Null if there is no LFE channel.
380  /// \sa
381  /// - \ref fx_audiobuffer_struct_channels
382  inline AkSampleType * GetLFE()
383  {
384  if ( channelConfig.uChannelMask & AK_SPEAKER_LOW_FREQUENCY )
385  return GetChannel( NumChannels()-1 );
386 
387  return (AkSampleType*)0;
388  }
389 
390  /// Can be used to transform an incomplete into a complete buffer with valid data.
391  /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
393  {
394  // Zero out all channels.
395  const AkUInt32 uNumChannels = NumChannels();
396  const AkUInt32 uNumZeroFrames = MaxFrames()-uValidFrames;
397  if ( uNumZeroFrames )
398  {
399  for ( AkUInt32 i = 0; i < uNumChannels; ++i )
400  {
401  AKPLATFORM::AkMemSet( GetChannel(i) + uValidFrames, 0, uNumZeroFrames * sizeof(AkSampleType) );
402  }
404  }
405  }
406 
407  /// Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
408  AkForceInline void AttachContiguousDeinterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
409  {
410  AttachInterleavedData( in_pData, in_uMaxFrames, in_uValidFrames, in_channelConfig );
411  }
412  /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
413  AkForceInline void * DetachContiguousDeinterleavedData()
414  {
415  uMaxFrames = 0;
416  uValidFrames = 0;
418  void * pDataOld = pData;
419  pData = NULL;
420  return pDataOld;
421  }
422 
423  bool CheckValidSamples();
424 
425  //@}
426 
427  void RelocateMedia( AkUInt8* in_pNewMedia, AkUInt8* in_pOldMedia )
428  {
429  AkUIntPtr uMemoryOffset = (AkUIntPtr)in_pNewMedia - (AkUIntPtr)in_pOldMedia;
430  pData = (void*) (((AkUIntPtr)pData) + uMemoryOffset);
431  }
432 
433 protected:
434 
435  void * pData; ///< Start of the audio buffer.
436 
437  AkChannelConfig channelConfig; ///< Channel config.
438 public:
439  AKRESULT eState; ///< Execution status
440 protected:
441  AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
442 
443 public:
444  /// Access to the number of sample frames the buffer can hold.
445  /// \return Number of sample frames the buffer can hold.
446  AkForceInline AkUInt16 MaxFrames() const { return uMaxFrames; }
447 
448  AkUInt16 uValidFrames; ///< Number of valid sample frames in the audio buffer
449 } AK_ALIGN_DMA;
450 
451 #endif // _AK_COMMON_DEFS_H_
452 
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
Definition: AkCommonDefs.h:288
AkForceInline bool IsChannelConfigSupported() const
Definition: AkSpeakerConfig.h:648
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Definition: AkCommonDefs.h:370
Interface to retrieve metering information about a buffer.
Definition: AkCommonDefs.h:205
Audiokinetic namespace.
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:331
AkForceInline bool HasCenter() const
Definition: AkSpeakerConfig.h:694
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:293
AkAudioBuffer()
Constructor.
Definition: AkCommonDefs.h:259
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:413
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
Definition: AkCommonDefs.h:282
AkForceInline void Clear()
Clear members.
Definition: AkCommonDefs.h:271
AkUInt32 uChannelMask
Channel mask (configuration).
Definition: AkSpeakerConfig.h:512
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:338
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:427
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:439
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
Definition: AkCommonDefs.h:448
void * pData
Start of the audio buffer.
Definition: AkCommonDefs.h:435
AkChannelConfig channelConfig
Channel config.
Definition: AkCommonDefs.h:437
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:441
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:392
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:408
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:382
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:304
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:209
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:265
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames)
Attach interleaved data. Allocation is performed outside.
Definition: AkCommonDefs.h:310
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:318
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:446