34 #ifndef _AK_COMMON_DEFS_H_
35 #define _AK_COMMON_DEFS_H_
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))
192 #define AKMAKECLASSID( in_pluginType, in_companyID, in_pluginID ) \
193 ( (in_pluginType) + ( (in_companyID) << 4 ) + ( (in_pluginID) << ( 4 + 12 ) ) )
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 ) )
199 #define CODECID_FROM_PLUGINID AKGETPLUGINIDFROMCLASSID
339 if ( in_channelConfig.HasLFE() )
344 if ( in_uChannelIdx == uIdxLFE )
345 return in_channelConfig.uNumChannels - 1;
346 else if ( in_uChannelIdx > uIdxLFE )
347 return in_uChannelIdx - 1;
350 return in_uChannelIdx;
389 if ( uNumZeroFrames )
391 for (
AkUInt32 i = 0; i < uNumChannels; ++i )
410 void * pDataOld =
pData;
415 #if defined(AK_CHECK_AUDIO_BUFFER_VALID)
416 bool CheckValidSamples()
420 for (
AkUInt32 i = 0; i < uNumChannels; ++i )
430 else if ( fSample < -4.f )
466 #endif // _AK_COMMON_DEFS_H_
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer
AkAudioBuffer()
Constructor.
AkUInt32 uChannelMask
Channel mask (configuration).
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
AkForceInline AkUInt16 MaxFrames() const
AkUInt32 uNumChannels
Number of channels.
AkForceInline void * GetInterleavedData()
AKRESULT
Standard function call result.
const AkDataInterleaveID AK_INTERLEAVED
Interleaved data
AkForceInline bool IsChannelConfigSupported() const
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.
const AkDataInterleaveID AK_NONINTERLEAVED
Non-interleaved data
AkForceInline void Clear()
Clear members.
virtual ~IAkMetering()
Virtual destructor on interface to avoid warnings.
AKRESULT eState
Execution status
AkUInt8 AkDataInterleaveID
Data interleaved state ID
Channels must be identified with standard defines in AkSpeakerConfigs.
AkReal32 AkSampleType
Audio sample data type (32 bit floating point)
#define AKASSERT(Condition)
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
AkUInt16 AkDataTypeID
Data sample type ID
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
AkChannelConfig channelConfig
Channel config.
AkSampleType * GetChannel(AkUInt32 in_uIndex)
const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE
Native number of bits per sample.
class AkAudioBuffer AK_ALIGN_DMA
const AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
AkForceInline void AkMemSet(void *pDest, AkInt32 iVal, AkUInt32 uSize)
Platform Independent Helper
virtual AK::SpeakerVolumes::ConstVectorPtr GetRMS()=0
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
const AkUInt32 AK_LE_NATIVE_SAMPLETYPE
Native data type.
AkForceInline AkChannelConfig GetChannelConfig() const
const AkUInt32 AK_LE_NATIVE_INTERLEAVE
Native interleaved setting.
Interface to retrieve metering information about a buffer.
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
const AkDataTypeID AK_FLOAT
Float data type
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.
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
virtual AkReal32 GetKWeightedPower()=0
void ZeroPadToMaxFrames()
#define AK_SPEAKER_LOW_FREQUENCY
Low-frequency speaker bit mask
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
AkForceInline void ClearData()
Clear data pointer.
AkForceInline bool HasCenter() const
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
const AkDataTypeID AK_INT
Integer data type (uchar, short, and so on)
void * pData
Start of the audio buffer.
AkForceInline bool HasLFE() const