Wwise SDK
_ak_common_defs_8h_source
バージョン
menu_open
警告:あなたのメジャーリリース ( 2023.1.4.8496 ) に該当する最新ドキュメンテーションが表示されています。特定バージョンのドキュメンテーションにアクセスするには、Audiokinetic Launcherでオフラインドキュメンテーションをダウンロードし、Wwise AuthoringのOffline Documentationオプションにチェックを入れてください。
link
Wwise SDK 2023.1.4
|
AkCommonDefs.h
[詳解]
56 // Native format currently the same on all supported platforms, may become platform specific in the future
69 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.
88 /// Note that mono configurations have one channel which is arbitrary set to AK_SPEAKER_FRONT_CENTER,
168 SourceChannelOrdering_Standard = 0, // Microsoft L-R-C-LFE-RL-RR-RC-SL-SR-HL-HR-HC-HRL-HRR-HRC-T
174 };
176 #define AK_MAKE_CHANNELCONFIGOVERRIDE(_config,_order) ((AkInt64)_config.Serialize()|((AkInt64)_order<<32))
203 /// Struct containing metering information about a buffer. Depending on when this struct is generated, you may get metering data computed in the previous frame only.
207 /// Vector of linear peak levels, corresponding to each channel. NULL if AK_EnableBusMeter_Peak is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
211 /// 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()).
215 /// Vector of linear rms levels, corresponding to each channel. NULL if AK_EnableBusMeter_RMS is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
218 /// Mean k-weighted power value in this frame, used to compute loudness (as defined by ITU-R BS.1770).
219 /// Total linear k-weighted power of all channels. 0 if AK_EnableBusMeter_KPower is not set (see IAkMixerPluginContext::SetMeteringFlags() or AK::SoundEngine::RegisterBusMeteringCallback()).
255 xform.Set(AK_DEFAULT_LISTENER_POSITION_X, AK_DEFAULT_LISTENER_POSITION_Y, AK_DEFAULT_LISTENER_POSITION_Z, AK_DEFAULT_LISTENER_FRONT_X, AK_DEFAULT_LISTENER_FRONT_Y, AK_DEFAULT_LISTENER_FRONT_Z, AK_DEFAULT_TOP_X, AK_DEFAULT_TOP_Y, AK_DEFAULT_TOP_Z);
261 AkChannelMask uEmitterChannelMask; ///< Emitter channel mask. With 3D spatialization, zeroed channels should be dropped.
285 bool enableHeightSpread; ///< When true, audio objects 3D spatialized onto a planar channel configuration will be given a minimum spread value based on their elevation angle, equal to sin(elevation)**2.
292 AkBehavioralPositioningData behavioral; ///< Positioning data inherited from sound structures and mix busses.
301 /// An audio object refers to an audio signal with some attached metadata going through the sound engine pipeline.
302 /// The AkAudioObject struct encapsulates the metadata part. The signal itself is contained in a separate AkAudioBuffer instance.
323 AkAudioObjectID key; ///< Unique ID, local to a given bus. Only the lower 56 of 64 bits are used for the object itself. The highest 8 bits are available for channel indexing.
326 AkRamp cumulativeGain; ///< Cumulative ramping gain to apply when mixing down to speaker bed or final endpoint
327 AkPipelineID instigatorID; ///< Profiling ID of the node from which the object stems (typically the voice, instance of an actor-mixer).
328 AkPriority priority; ///< Audio object playback priority. Object with a higher priority will be rendered using the hardware's object functionality on platforms that supports it, whereas objects with a lower priority will be downmixed to a lower resolution 3D bed. Audio object priorities should be retrieved, or set through IAkPluginServiceAudioObjectPriority to retain compatibility with future Wwise releases.
333 AkPluginID pluginID; ///< Full plugin ID, including company ID and plugin type. See AKMAKECLASSID macro.
334 AkUniqueID contextID; ///< (Profiling) ID of the sound or bus from which the custom metadata was fetched.
335 AK::IAkPluginParam* pParam; ///< Custom, pluggable medata. Note: any custom metadata is expected to exist for only the current sound engine render tick, and persistent references to it should not be stored.
339 class ArrayCustomMetadata : public AkArray<CustomMetadata, const CustomMetadata&, AkPluginArrayAllocator>
355 ArrayCustomMetadata arCustomMetadata; ///< Array of custom metadata, gathered from visited objects. Note: any custom metadata is expected to exist for only the current sound engine render tick, and persistent references to it should not be stored.
357 typedef AkString<AkPluginArrayAllocator, char> String; ///< String type for use in 3D audio objects.
358 String objectName; ///< Name string of the object, to appear in the object profiler. This is normally used by out-of-place object processors for naming their output objects. Built-in sound engine structures don't use it.
407 /// \return AK_Success if the string was allocated successfully, AK_InsufficientMemory otherwise.
427 /// "3D Audio" refers to a system's ability to position sound sources in a virtual 3D space, pan them accordingly on a range of physical speakers, and produce a binaural mix where appropriate.
428 /// We prefer "3D Audio" to "Spatial" to avoid ambiguity with spatial audio, which typically involves sound propagation and environment effects.
432 AkUInt32 uMaxSystemAudioObjects; ///< Maximum number of System Audio Objects that can be active concurrently. A value of zero indicates the system does not support this feature.
433 AkUInt32 uAvailableSystemAudioObjects; ///< How many System Audio Objects can currently be sent to the sink. This value can change at runtime depending on what is playing. Can never be higher than uMaxSystemAudioObjects.
441 eDefault = 0, // The destination will be chosen based on the audio object's metadata and channel configuration
444 eSystemAudioObject = 3 // The audio object will not be mixed; it will be sent separately to the system's 3D audio endpoint
460 /// Audio buffer structure including the address of an audio buffer, the number of valid frames inside,
520 inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames )
528 inline void AttachInterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
546 /// Convert a channel, identified by a single channel bit, to a buffer index used in GetChannel() below, for a given channel config.
547 /// Standard indexing follows channel bit order (see AkSpeakerConfig.h). Pipeline/buffer indexing is the same but the LFE is moved to the end.
550 AkUInt32 in_uChannelIdx ///< Channel index in standard ordering to be converted to pipeline ordering.
555 AKASSERT( in_channelConfig.eConfigType == AK_ChannelConfigType_Standard ); // in_channelConfig.HasLFE() would not have returned true otherwise.
557 AkUInt32 uIdxLFE = AK::GetNumNonZeroBits( ( AK_SPEAKER_LOW_FREQUENCY - 1 ) & in_channelConfig.uChannelMask );
571 /// \remarks When using a standard Wwise pipeline configuration, use ChannelBitToIndex() to convert channel bits to buffer indices.
597 /// The invalid frames are made valid (zeroed out) for all channels and the validFrames count will be made equal to uMaxFrames.
616 /// Attach deinterleaved data where channels are contiguous in memory. Allocation is performed outside.
617 AkForceInline void AttachContiguousDeinterleavedData( void * in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames, AkChannelConfig in_channelConfig )
621 /// Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is returned and fields are cleared.
654 AkUInt16 uMaxFrames; ///< Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
660 /// A collection of audio objects. Encapsulates the audio data and metadata of each audio object in separate arrays.
663 AkAudioObjects(AkUInt32 in_uNumObjects = 0, AkAudioBuffer** in_ppObjectBuffers = nullptr, AkAudioObject** in_ppObjects = nullptr)
void Transfer(AkAudioObject &in_from)
Transfer function for transfer move policies.
Definition: AkCommonDefs.h:398
AkString< AkPluginArrayAllocator, char > String
String type for use in 3D audio objects.
Definition: AkCommonDefs.h:357
AkForceInline bool HasLFE() const
Returns true if there is an LFE channel present.
Definition: AkCommonDefs.h:498
bool enableHeightSpread
When true, audio objects 3D spatialized onto a planar channel configuration will be given a minimum s...
Definition: AkCommonDefs.h:285
@ AK_DirectSpeakerAssignment
No panning: route to matching channels between input and output.
Definition: AkTypes.h:1102
AkUInt32 uAvailableSystemAudioObjects
How many System Audio Objects can currently be sent to the sink. This value can change at runtime dep...
Definition: AkCommonDefs.h:433
AkSampleType * GetChannel(AkUInt32 in_uIndex)
Definition: AkCommonDefs.h:576
AkForceInline bool HasData() const
Check if buffer has samples attached to it.
Definition: AkCommonDefs.h:541
Definition: AkCommonDefs.h:430
static const AkUInt64 kObjectKeyNumBits
Definition: AkCommonDefs.h:320
AkPositioningData positioning
Positioning data for deferred 3D rendering.
Definition: AkCommonDefs.h:325
AkRamp cumulativeGain
Cumulative ramping gain to apply when mixing down to speaker bed or final endpoint
Definition: AkCommonDefs.h:326
AkForceInline AkChannelConfig GetChannelConfig() const
Definition: AkCommonDefs.h:503
AKRESULT Copy(const AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:865
AkReal32 panSpatMix
Panning vs 3D spatialization mix ([0,1], 1 being 100% spatialized).
Definition: AkCommonDefs.h:282
AkUInt32 uMaxSystemAudioObjects
Maximum number of System Audio Objects that can be active concurrently. A value of zero indicates the...
Definition: AkCommonDefs.h:432
Definition: IAkPlugin.h:620
AkAudioObjectID key
Unique ID, local to a given bus. Only the lower 56 of 64 bits are used for the object itself....
Definition: AkCommonDefs.h:323
AkForceInline void * DetachContiguousDeinterleavedData()
Detach deinterleaved data where channels are contiguous in memory. The address of the buffer is retur...
Definition: AkCommonDefs.h:622
Definition: AkSpeakerConfig.h:497
static AkUInt32 StandardToPipelineIndex(AkChannelConfig in_channelConfig, AkUInt32 in_uChannelIdx)
Definition: AkCommonDefs.h:548
@ AK_ChannelConfigType_Standard
Channels must be identified with standard defines in AkSpeakerConfigs.
Definition: AkSpeakerConfig.h:469
void Set(const AkVector &in_position, const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:560
static const AkAudioObjectID AK_INVALID_AUDIO_OBJECT_ID
Invalid audio object ID
Definition: AkTypes.h:109
AkUInt32 AkChannelMask
Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig....
Definition: AkTypes.h:81
void RelocateMedia(AkUInt8 *in_pNewMedia, AkUInt8 *in_pOldMedia)
Definition: AkCommonDefs.h:636
void CopyContents(const AkAudioObject &in_src)
Copies object metadata (everything but the key) from another object.
Definition: AkCommonDefs.h:361
Positioning data inherited from sound structures and mix busses.
Definition: AkCommonDefs.h:266
@ eDefault
void TransferContents(AkAudioObject &in_src)
Moves object metadata (everything but the key) from another object.
Definition: AkCommonDefs.h:374
AkUInt16 uValidFrames
Number of valid sample frames in the audio buffer
Definition: AkCommonDefs.h:657
Definition: AkCommonDefs.h:249
Definition: AkCommonDefs.h:304
AKRESULT SetName(AK::IAkPluginMemAlloc *in_pAllocator, const char *in_szName)
Definition: AkCommonDefs.h:408
AkForceInline void Init(AK::IAkPluginMemAlloc *in_pAllocator)
Definition: IAkPluginMemAlloc.h:202
Definition: IAkPluginMemAlloc.h:43
AkReal32 * VectorPtr
Volume vector. Access each element with the standard bracket [] operator.
Definition: AkSpeakerVolumes.h:49
AkAudioObjectDestination
Enum of the possible object destinations when reaching a 3D audio-capable sink
Definition: AkCommonDefs.h:440
AkAudioBuffer ** ppObjectBuffers
Array of pointers to audio object buffers.
Definition: AkCommonDefs.h:670
ArrayCustomMetadata arCustomMetadata
Array of custom metadata, gathered from visited objects. Note: any custom metadata is expected to exi...
Definition: AkCommonDefs.h:355
#define AKCODECID_BANK_BUS
Bank encoding for bus banks. These banks are contained in the /bus sub-folder.
Definition: AkTypes.h:1014
static const AkPipelineID AK_INVALID_PIPELINE_ID
Invalid pipeline ID (for profiling)
Definition: AkTypes.h:108
const AkUInt32 AK_LE_NATIVE_BITSPERSAMPLE
Native number of bits per sample.
Definition: AkCommonDefs.h:57
AkUInt16 uMaxFrames
Number of sample frames the buffer can hold. Access through AkAudioBuffer::MaxFrames().
Definition: AkCommonDefs.h:654
AkPluginID pluginID
Full plugin ID, including company ID and plugin type. See AKMAKECLASSID macro.
Definition: AkCommonDefs.h:333
AkBehavioralPositioningData behavioral
Positioning data inherited from sound structures and mix busses.
Definition: AkCommonDefs.h:292
ArrayType::Iterator FindByPluginID(AkPluginID pluginID) const
Definition: AkCommonDefs.h:344
AkForceInline void Clear()
Clear the channel config. Becomes "invalid" (IsValid() returns false).
Definition: AkSpeakerConfig.h:556
AK::IAkPluginParam * pParam
Custom, pluggable medata. Note: any custom metadata is expected to exist for only the current sound e...
Definition: AkCommonDefs.h:335
void Transfer(AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy > &in_rSource)
Definition: AkArray.h:852
AkPipelineID instigatorID
Profiling ID of the node from which the object stems (typically the voice, instance of an actor-mixer...
Definition: AkCommonDefs.h:327
AkBehavioralPositioningData()
Definition: AkCommonDefs.h:267
Iterator Begin() const
Returns the iterator to the first item of the array, will be End() if the array is empty.
Definition: AkArray.h:344
AkForceInline AkUInt32 GetNumNonZeroBits(AkUInt32 in_uWord)
Definition: AkBitFuncs.h:181
Struct containing metering information about a buffer. Depending on when this struct is generated,...
Definition: AkCommonDefs.h:205
AkForceInline AkUInt32 GetBitsPerSample() const
Definition: AkCommonDefs.h:98
A collection of audio objects. Encapsulates the audio data and metadata of each audio object in separ...
Definition: AkCommonDefs.h:662
#define AKCODECID_BANK_EVENT
Bank encoding for event banks. These banks are contained in the /event sub-folder.
Definition: AkTypes.h:1013
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:69
AkForceInline AkUInt32 GetInterleaveID() const
Definition: AkCommonDefs.h:119
AkForceInline bool operator!=(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:153
AkForceInline AkUInt32 GetBlockAlign() const
Definition: AkCommonDefs.h:105
AkChannelMask uEmitterChannelMask
Emitter channel mask. With 3D spatialization, zeroed channels should be dropped.
Definition: AkCommonDefs.h:261
void SetCustomMetadata(CustomMetadata *in_aCustomMetadata, AkUInt32 in_uLength)
Definition: AkCommonDefs.h:386
AkUInt8(* AkChannelMappingFunc)(const AkChannelConfig &config, AkUInt8 idx)
Definition: AkCommonDefs.h:164
AkSpeakerPanningType
Speaker panning type: type of panning logic when object is not 3D spatialized (i.e....
Definition: AkTypes.h:1101
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:617
Definition: AkCommonDefs.h:465
AkPriority priority
Audio object playback priority. Object with a higher priority will be rendered using the hardware's o...
Definition: AkCommonDefs.h:328
AkForceInline bool operator==(const AkAudioFormat &in_other) const
Definition: AkCommonDefs.h:143
AkForceInline void * GetInterleavedData()
Definition: AkCommonDefs.h:514
String objectName
Name string of the object, to appear in the object profiler. This is normally used by out-of-place ob...
Definition: AkCommonDefs.h:358
AkForceInline AkUInt32 GetNumChannels() const
Definition: AkCommonDefs.h:75
Array type for carrying custom metadata.
Definition: AkCommonDefs.h:340
AkUniqueID contextID
(Profiling) ID of the sound or bus from which the custom metadata was fetched.
Definition: AkCommonDefs.h:334
bool CheckValidSamples()
AkForceInline bool IsValid() const
Returns true if valid, false otherwise (as when it is constructed, or invalidated using Clear()).
Definition: AkSpeakerConfig.h:623
void AttachInterleavedData(void *in_pData, AkUInt16 in_uMaxFrames, AkUInt16 in_uValidFrames)
Attach interleaved data. Allocation is performed outside.
Definition: AkCommonDefs.h:520
AkAudioObjects(AkUInt32 in_uNumObjects=0, AkAudioBuffer **in_ppObjectBuffers=nullptr, AkAudioObject **in_ppObjects=nullptr)
Definition: AkCommonDefs.h:663
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:528
void SetAll(AkUInt32 in_uSampleRate, AkChannelConfig in_channelConfig, AkUInt32 in_uBitsPerSample, AkUInt32 in_uBlockAlign, AkUInt32 in_uTypeID, AkUInt32 in_uInterleaveID)
Definition: AkCommonDefs.h:126