Go to the documentation of this file.
34 #ifndef _AK_COMMON_DEFS_H_
35 #define _AK_COMMON_DEFS_H_
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))
194 #define AKMAKECLASSID( in_pluginType, in_companyID, in_pluginID ) \
195 ( (in_pluginType) + ( (in_companyID) << 4 ) + ( (in_pluginID) << ( 4 + 12 ) ) )
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 ) )
201 #define CODECID_FROM_PLUGINID AKGETPLUGINIDFROMCLASSID
349 if ( in_channelConfig.HasLFE() )
354 if ( in_uChannelIdx == uIdxLFE )
355 return in_channelConfig.uNumChannels - 1;
356 else if ( in_uChannelIdx > uIdxLFE )
357 return in_uChannelIdx - 1;
360 return in_uChannelIdx;
401 if ( uNumZeroFrames )
404 for (
AkUInt32 i = 0; i < uNumChannels; ++i )
423 void * pDataOld =
pData;
456 #endif // _AK_COMMON_DEFS_H_
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
AkUInt8 AkDataInterleaveID
Data interleaved state ID.
AkForceInline bool IsChannelConfigSupported() const
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Interface to retrieve metering information about a buffer.
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
AkForceInline bool HasCenter() const
@ SourceChannelOrdering_FuMa
AkForceInline AkChannelConfig GetChannelConfig() const
@ SourceChannelOrdering_Standard
AkAudioBuffer()
Constructor.
AkUInt32 uNumChannels
Number of channels.
virtual AkReal32 GetKWeightedPower()=0
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
AkForceInline void Clear()
Clear members.
AKRESULT
Standard function call result.
AkUInt32 uChannelMask
Channel mask (configuration).
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
@ AK_ChannelConfigType_Standard
Channels must be identified with standard defines in AkSpeakerConfigs.
@ SourceChannelOrdering_Film
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
AKRESULT eState
Execution status
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer.
void * pData
Start of the audio buffer.
AkChannelConfig channelConfig
Channel config.
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
const AkDataTypeID AK_FLOAT
Float data type.
AkUInt16 AkDataTypeID
Data sample type ID.
#define AKASSERT(Condition)
const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE
Native number of bits per sample.
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
AkReal32 AkSampleType
Audio sample data type (32 bit floating point)
const AkUInt32 AK_LE_NATIVE_SAMPLETYPE
Native data type.
AkForceInline void AkMemSet(void *pDest, AkInt32 iVal, AkUInt32 uSize)
Platform Independent Helper.
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
@ AK_DataNeeded
The consumer needs more.
void ZeroPadToMaxFrames()
AkUInt8(* AkChannelMappingFunc)(const AkChannelConfig &config, AkUInt8 idx)
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.
AkForceInline bool HasLFE() const
AkForceInline void * GetInterleavedData()
virtual AK::SpeakerVolumes::ConstVectorPtr GetPeak()=0
#define AK_SPEAKER_LOW_FREQUENCY
Low-frequency speaker bit mask.
const AkDataTypeID AK_INT
Integer data type (uchar, short, and so on)
virtual ~IAkMetering()
Virtual destructor on interface to avoid warnings.
AkForceInline bool IsValid() const
Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
class AkAudioBuffer AK_ALIGN_DMA
AkForceInline void ClearData()
Clear data pointer.
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames)
Attach interleaved data. Allocation is performed outside.
const AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
const AkDataInterleaveID AK_NONINTERLEAVED
Non-interleaved data.
virtual AK::SpeakerVolumes::ConstVectorPtr GetRMS()=0
const AkDataInterleaveID AK_INTERLEAVED
Interleaved data.
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.
const AkUInt32 AK_LE_NATIVE_INTERLEAVE
Native interleaved setting.
AkForceInline AkUInt16 MaxFrames() const
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise