Wwise SDK 2019.1.11
_ak_common_defs_8h_source
版本
menu_open
link
Wwise SDK 2019.1.11
|
AkCommonDefs.h
53 // Native format currently the same on all supported platforms, may become platform specific in the future
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.
85 /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
177 #define AK_MAKE_CHANNELCONFIGOVERRIDE(_config,_order) ((AkInt64)_config.Serialize()|((AkInt64)_order<<32))
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
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()).
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()).
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
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()).
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()).
250 /// Audio buffer structure including the address of an audio buffer, the number of valid frames inside,
310 inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
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.
335 , AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
341 AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
343 AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
357 /// \remarks When using a standard configuration, use ChannelMaskToBufferIndex() to convert channel bits to buffer indices.
383 /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
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 )
404 /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
433 AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
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:362
Interface to retrieve metering information about a buffer.
Definition: AkCommonDefs.h:206
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:323
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:293
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:405
AkForceInline AkUInt32 NumChannels() const
Get the number of channels.
Definition: AkCommonDefs.h:282
Definition: AkSpeakerConfig.h:505
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:330
AkForceInline bool IsChannelConfigSupported() const
Definition: AkCommonDefs.h:142
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
Definition: AkCommonDefs.h:419
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer
Definition: AkCommonDefs.h:440
virtual AK::SpeakerVolumes::ConstVectorPtr GetTruePeak()=0
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:433
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:336
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
Definition: AkPlatformFuncs.h:110
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
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:400
Definition: AkCommonDefs.h:255
AkForceInline bool operator==(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:147
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:304
virtual AK::SpeakerVolumes::ConstVectorPtr GetPeak()=0
AkForceInline AkUInt32 GetNumChannels() const
Definition: AkCommonDefs.h:72
virtual ~IAkMetering()
Virtual destructor on interface to avoid warnings.
Definition: AkCommonDefs.h:209
bool CheckValidSamples()
const AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
Definition: AkSpeakerVolumes.h:51
virtual AK::SpeakerVolumes::ConstVectorPtr GetRMS()=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
void SetAll(AkUInt32 in_uSampleRate, AkChannelConfig in_channelConfig, AkUInt32 in_uBitsPerSample, AkUInt32 in_uBlockAlign, AkUInt32 in_uTypeID, AkUInt32 in_uInterleaveID)
Definition: AkCommonDefs.h:123