Table of Contents
Wwise SDK 2019.1.6
|
AkTypes.h
Go to the documentation of this file.
37 //----------------------------------------------------------------------------------------------------
41 //----------------------------------------------------------------------------------------------------
90 typedef AkUInt32 AkChannelMask; ///< Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig.h.
98 static const AkGameObjectID AK_INVALID_GAME_OBJECT = (AkGameObjectID)-1; ///< Invalid game object (may also mean all game objects)
102 static const AkUInt32 AK_DEFAULT_SWITCH_STATE = 0; ///< Switch selected if no switch has been set yet
104 static const AkMemPoolId AK_DEFAULT_POOL_ID = -1; ///< Default pool ID, same as AK_INVALID_POOL_ID
105 static const AkAuxBusID AK_INVALID_AUX_ID = AK_INVALID_UNIQUE_ID;///< Invalid auxiliary bus ID (or no Aux bus ID)
109 static const AkArgumentValueID AK_FALLBACK_ARGUMENTVALUE_ID = 0; ///< Fallback argument value ID
119 static const AkPriority AK_DEFAULT_BANK_IO_PRIORITY = AK_DEFAULT_PRIORITY; ///< Default bank load I/O priority
120 static const AkReal32 AK_DEFAULT_BANK_THROUGHPUT = 1*1024*1024/1000.f; ///< Default bank load throughput (1 Mb/ms)
146 AK_ElementAlreadyInList = 35, ///< The item could not be added because it was already in the list.
165 AK_DeviceNotReady = 67, ///< Specified ID doesn't match a valid hardware device: either the device doesn't exist or is disabled.
170 AK_MemManagerNotInitialized = 74, ///< The memory manager should have been initialized at this point.
171 AK_StreamMgrNotInitialized = 75, ///< The stream manager should have been initialized at this point.
172 AK_SSEInstructionsNotSupported = 76,///< The machine does not support SSE instructions (required on PC).
174 AK_UnsupportedChannelConfig = 78, ///< Channel configuration is not supported in the current execution context.
179 AK_InvalidCustomPlatformName= 83, ///< Detecting incompatibility between Custom platform of banks and custom platform of connected application
180 AK_DLLCannotLoad = 84, ///< Plugin DLL could not be loaded, either because it is not found or one dependency is missing.
184 AK_PluginNotRegistered = 88, ///< Plugin is not registered. Make sure to implement a AK::PluginRegistration class for it and use AK_STATIC_LINK_PLUGIN in the game binary.
185 AK_DataAlignmentError = 89, ///< A pointer to audio data was not aligned to the platform's required alignment (check AkTypes.h in the platform-specific folder)
188 AK_InitBankNotLoaded = 92, ///< The Init bank was not loaded yet, the sound engine isn't completely ready yet.
189 AK_DeviceNotFound = 93, ///< The specified device ID does not match with any of the output devices that the sound engine is currently using.
207 /// This structure allows the game to provide audio files to fill the external sources. See \ref AK::SoundEngine::PostEvent
208 /// You can specify a streaming file or a file in-memory, regardless of the "Stream" option in the Wwise project.
210 /// Make sure that only one of szFile, pInMemory or idFile is non-null. if both idFile and szFile are set, idFile is passed to low-level IO and szFile is used as stream name (for profiling purposes).
214 AkUInt32 iExternalSrcCookie; ///< Cookie identifying the source, given by hashing the name of the source given in the project. See \ref AK::SoundEngine::GetIDFromString. \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project therefore have a unique cookie) in order to tell them apart when filling the AkExternalSourceInfo structures. \endaknote
215 AkCodecID idCodec; ///< Codec ID for the file. One of the audio formats defined in AkTypes.h (AKCODECID_XXX)
216 AkOSChar * szFile; ///< File path for the source. If not NULL, the source will be streaming from disk. Set pInMemory to NULL. If idFile is set, this field is used as stream name (for profiling purposes).
217 void* pInMemory; ///< Pointer to the in-memory file. If not NULL, the source will be read from memory. Set szFile and idFile to NULL.
219 AkFileID idFile; ///< File ID. If not zero, the source will be streaming from disk. This ID can be anything. Note that you must override the low-level IO to resolve this ID to a real file. See \ref streamingmanager_lowlevel for more information on overriding the Low Level IO.
333 /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
345 /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
456 /// Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
482 /// Get the absolute angle, in radians between 0 and pi, of the emitter's orientation relative to
486 /// Get the absolute angle, in radians between 0 and pi, of the listener's orientation relative to
496 /// Get the emitter-listener-pair-specific gain (due to distance and cone attenuation), linear [0,1], for a given connection type.
514 AkReal32 fDryMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
515 AkReal32 fGameDefAuxMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send connections.
516 AkReal32 fUserDefAuxMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send connections.
534 AkReal32 fScalingFactor; /// Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
535 bool bSpatialized; /// Whether listener is spatialized or not (see AK::SoundEngine::SetListenerSpatialization()).
538 // If you modify AkCurveInterpolation, don't forget to modify WAAPI validation schema accordingly.
544 //Curves from 0 to LastFadeCurve NEED TO BE A MIRROR IMAGE AROUND LINEAR (eg. Log3 is the inverse of Exp3)
554 AkCurveInterpolation_LastFadeCurve = 8, ///< Update this value to reflect last curve available for fades
561 #define AKCURVEINTERPOLATION_NUM_STORAGE_BIT 5 ///< Internal storage restriction, for internal use only.
566 AkGameObjectID listenerID; ///< Game object ID of the listener associated with this send. Use AK_INVALID_GAME_OBJECT as a wildcard to set the auxiliary send to all connected listeners (see AK::SoundEngine::SetListeners).
576 AkRamp & operator*=(const AkRamp& in_rRhs) { fPrev *= in_rRhs.fPrev; fNext *= in_rRhs.fNext; return *this; }
600 AkNoAlloc = 0, ///< CreatePool will not allocate memory. You need to allocate the buffer yourself.
604 AkFixedSizeBlocksMode = 1<<3, ///< Block management type: Fixed-size blocks. Get blocks through GetBlock/ReleaseBlock API. If not specified, use AkAlloc/AkFree.
616 /// \return A pointer to the start of the allocated memory (NULL if the system is out of memory)
671 //#define AKCOMPANYID_NVIDIA (273) ///< NVIDIA // Commented out to avoid redefinition, provider is already defining it.
672 //#define AKCOMPANYID_RESERVED (274) ///< Reserved // Commented out to avoid redefinition, provider is already defining it.
673 //#define AKCOMPANYID_MICROSOFT (275) ///< Microsoft // Commented out to avoid redefinition, provider is already defining it.
674 //#define AKCOMPANYID_YAMAHA (276) ///< YAMAHA // Commented out to avoid redefinition, provider is already defining it.
687 #define AKCODECID_AAC (10) ///< AAC encoding (only available on Apple devices) -- see AkAACFactory.h
688 #define AKCODECID_FILE_PACKAGE (11) ///< File package files generated by the File Packager utility.
691 #define AKCODECID_PROFILERCAPTURE (14) ///< Profiler capture file (.prof) as written through AK::SoundEngine::StartProfilerCapture
736 MultiPositionType_SingleSource, ///< Used for normal sounds, not expected to pass to AK::SoundEngine::SetMultiplePosition() (if done, only the first position will be used).
737 MultiPositionType_MultiSources, ///< Simulate multiple sources in one sound playing, adding volumes. For instance, all the torches on your level emitting using only one sound.
738 MultiPositionType_MultiDirections ///< Simulate one sound coming from multiple directions. Useful for repositionning sounds based on wall openings or to simulate areas like forest or rivers ( in combination with spreading in the attenuation of the sounds ).
744 /// Speaker panning type: type of panning logic when object is not 3D spatialized (i.e. when Ak3DSpatializationMode is AK_SpatializationMode_None).
747 AK_DirectSpeakerAssignment = 0, ///< No panning: route to matching channels between input and output.
752 /// 3D position type: defines what acts as the emitter position for computing spatialization against the listener. Used when Ak3DSpatializationMode is AK_SpatializationMode_PositionOnly or AK_SpatializationMode_PositionAndOrientation.
755 AK_3DPositionType_Emitter = 0, ///< 3D spatialization is computed directly from the emitter game object position.
756 AK_3DPositionType_EmitterWithAutomation = 1, ///< 3D spatialization is computed from the emitter game object position, translated by user-defined automation.
757 AK_3DPositionType_ListenerWithAutomation = 2 ///< 3D spatialization is computed from the listener game object position, translated by user-defined automation.
763 AkPanningRule_Speakers = 0, ///< Left and right positioned 60 degrees apart (by default - see AK::SoundEngine::GetSpeakerAngles()).
773 AK_SpatializationMode_PositionAndOrientation = 2 ///< Spatialization based on both emitter position and emitter orientation.
781 AkBusHierarchy_IsMaster = 1 << 7 ///< Flag is set to indicate a master bus (may be used in combination with other flags).
786 /// Metering flags. Used for specifying bus metering, through AK::SoundEngine::RegisterBusVolumeCallback() or AK::IAkMixerPluginContext::SetMeteringFlags().
791 AK_EnableBusMeter_TruePeak = 1 << 1, ///< Enable computation of true peak metering (most CPU and memory intensive).
794 AK_EnableBusMeter_KPower = 1 << 4, ///< Enable computation of K-weighted power metering (used as a basis for computing loudness, as defined by ITU-R BS.1770).
804 AkPluginTypeCodec = 1, ///< Compressor/decompressor plug-in (allows support for custom audio file types).
805 AkPluginTypeSource = 2, ///< Source plug-in: creates sound by synthesis method (no input, just output).
807 //AkPluginTypeMotionDevice = 4, ///< Motion Device plug-in: feeds movement data to devices. Deprecated by Motion refactor.
808 //AkPluginTypeMotionSource = 5, ///< Motion Device source plug-in: feeds movement data to device busses. Deprecated by Motion refactor.
811 AkPluginTypeGlobalExtension = 8, ///< Global Extension plug-in: (e.g. Spatial Audio, Interactive Music)
877 AkUInt16 uAttenuation; /// Approximate _attenuation_ at this location relative to this source's maximum, in dB (absolute value).
891 #define AK_ALIGN(__declaration__, uAlignmentSize) __declaration__ ///< Default definition for declaration that might need to be aligned on some platforms. By default, no alignment will be done.
899 #define AK_UNALIGNED ///< Refers to the __unaligned compilation flag available on some platforms. Note that so far, on the tested platform this should always be placed before the pointer symbol *.
909 #define AK_ASYNC_OPEN_DEFAULT (false) ///< Refers to asynchronous file opening in default low-level IO.
913 #define AK_COMM_DEFAULT_DISCOVERY_PORT 24024 ///< Default discovery port for most platforms using IP sockets for communication.
static const AkMemPoolId AK_DEFAULT_POOL_ID
Default pool ID, same as AK_INVALID_POOL_ID.
Definition: AkTypes.h:104
AkChannelMask uInputChannels
Channels to which the above position applies.
Definition: AkTypes.h:440
bool operator==(const WwiseObjectIDext &in_rOther) const
Definition: AkTypes.h:828
Compressor/decompressor plug-in (allows support for custom audio file types).
Definition: AkTypes.h:804
Definition: AkTypes.h:824
Source plug-in: creates sound by synthesis method (no input, just output).
Definition: AkTypes.h:805
AkGameObjectID m_uListenerID
Channels of the emitter that apply to this ray.
Definition: AkTypes.h:523
Left and right positioned 60 degrees apart (by default - see AK::SoundEngine::GetSpeakerAngles()).
Definition: AkTypes.h:763
WwiseObjectID(AkUniqueID in_ID, bool in_bIsBus)
Definition: AkTypes.h:856
Definition: AkTypes.h:842
AkReal32 Occlusion() const
Get the occlusion factor for this emitter-listener pair.
Definition: AkTypes.h:491
void Set(AkReal32 in_positionX, AkReal32 in_positionY, AkReal32 in_positionZ, AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set position and orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:346
The memory manager should have been initialized at this point.
Definition: AkTypes.h:170
static const AkAuxBusID AK_INVALID_AUX_ID
Invalid auxiliary bus ID (or no Aux bus ID)
Definition: AkTypes.h:105
A pointer to audio data was not aligned to the platform's required alignment (check AkTypes....
Definition: AkTypes.h:185
Positioning information for a sound, with specified subset of its channels.
Definition: AkTypes.h:437
void * pInMemory
Pointer to the in-memory file. If not NULL, the source will be read from memory. Set szFile and idFil...
Definition: AkTypes.h:217
Channel configuration is not supported in the current execution context.
Definition: AkTypes.h:174
AkReal32 fControlValue
Value in the range [0.0f:1.0f], send level to auxiliary bus.
Definition: AkTypes.h:568
Plugin is not registered. Make sure to implement a AK::PluginRegistration class for it and use AK_STA...
Definition: AkTypes.h:184
AkExternalSourceInfo(AkOSChar *in_pszFileName, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by streaming file name.
Definition: AkTypes.h:245
The bank load failed because the bank is already loaded.
Definition: AkTypes.h:166
Definition: AkTypes.h:820
AkOSChar * szFile
File path for the source. If not NULL, the source will be streaming from disk. Set pInMemory to NULL....
Definition: AkTypes.h:216
static const AkUInt32 AK_SOUNDBANK_VERSION
Version of the soundbank reader.
Definition: AkTypes.h:123
Detecting incompatibility between Custom platform of banks and custom platform of connected applicati...
Definition: AkTypes.h:179
AkUInt32 AkChannelMask
Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig....
Definition: AkTypes.h:90
Spatialization based on emitter position only.
Definition: AkTypes.h:772
AkReal32 fGameDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
Definition: AkTypes.h:515
CreatePool will use AK::AllocHook() to allocate the memory block.
Definition: AkTypes.h:601
Block management type: Fixed-size blocks. Get blocks through GetBlock/ReleaseBlock API....
Definition: AkTypes.h:604
Definition: AkTypes.h:795
Global Extension plug-in: (e.g. Spatial Audio, Interactive Music)
Definition: AkTypes.h:811
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:564
AkMeteringFlags
Metering flags. Used for specifying bus metering, through AK::SoundEngine::RegisterBusVolumeCallback(...
Definition: AkTypes.h:787
AkExternalSourceInfo(void *in_pInMemory, AkUInt32 in_uiMemorySize, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by memory.
Definition: AkTypes.h:231
The language is invalid (applies to the Low-Level I/O).
Definition: AkTypes.h:143
IAkSoftwareCodec *(* AkCreateFileSourceCallback)(void *in_pCtx)
Registered file source creation function prototype.
Definition: AkTypes.h:716
3D spatialization is computed from the emitter game object position, translated by user-defined autom...
Definition: AkTypes.h:756
AkUInt16 uAttenuation
Position of this point in samples at the source rate.
Definition: AkTypes.h:877
Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
Definition: AkTypes.h:457
The specified device ID does not match with any of the output devices that the sound engine is curren...
Definition: AkTypes.h:189
AkUInt32 iExternalSrcCookie
Cookie identifying the source, given by hashing the name of the source given in the project....
Definition: AkTypes.h:214
void SetOrientation(const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:390
Simulate multiple sources in one sound playing, adding volumes. For instance, all the torches on your...
Definition: AkTypes.h:737
Specified ID doesn't match a valid hardware device: either the device doesn't exist or is disabled.
Definition: AkTypes.h:165
AkGameObjectID ListenerID() const
Get listener ID associated with the emitter-listener pair.
Definition: AkTypes.h:508
Enable computation of K-weighted power metering (used as a basis for computing loudness,...
Definition: AkTypes.h:794
AkReal32 fDryMixGain
Angle between position vector and listener orientation.
Definition: AkTypes.h:514
void __cdecl FreeHook(void *in_pMemAddress)
AkReal32 Obstruction() const
Get the obstruction factor for this emitter-listener pair.
Definition: AkTypes.h:494
AkFileID idFile
File ID. If not zero, the source will be streaming from disk. This ID can be anything....
Definition: AkTypes.h:219
Flag is set to indicate a master bus (may be used in combination with other flags).
Definition: AkTypes.h:781
CreatePool will not allocate memory. You need to allocate the buffer yourself.
Definition: AkTypes.h:600
The item could not be added because it was already in the list.
Definition: AkTypes.h:146
It is not possible to add itself as its own child.
Definition: AkTypes.h:144
AkRamp operator *(const AkRamp &in_rLhs, const AkRamp &in_rRhs)
Definition: AkTypes.h:581
IAkSoftwareCodec *(* AkCreateBankSourceCallback)(void *in_pCtx)
Registered bank source node creation function prototype.
Definition: AkTypes.h:718
Used for normal sounds, not expected to pass to AK::SoundEngine::SetMultiplePosition() (if done,...
Definition: AkTypes.h:736
AkReal32 fOcclusion
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send conn...
Definition: AkTypes.h:517
Spatialization based on both emitter position and emitter orientation.
Definition: AkTypes.h:773
Enable computation of true peak metering (most CPU and memory intensive).
Definition: AkTypes.h:791
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:334
Ak3DPositionType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
Definition: AkTypes.h:753
The bank version is not compatible with the current bank reader.
Definition: AkTypes.h:163
AkUInt32 uNumSamplesPerFrame
Number of samples per audio frame (256, 512, 1024 or 2048).
Definition: AkTypes.h:203
static const AkUInt32 AK_DEFAULT_SWITCH_STATE
Switch selected if no switch has been set yet.
Definition: AkTypes.h:102
3D spatialization is computed from the listener game object position, translated by user-defined auto...
Definition: AkTypes.h:757
void *__cdecl AllocHook(size_t in_size)
Balance-Fade-Height: Traditional "box" or "car"-like panner.
Definition: AkTypes.h:748
No panning: route to matching channels between input and output.
Definition: AkTypes.h:747
void SetOrientation(AkReal32 in_orientFrontX, AkReal32 in_orientFrontY, AkReal32 in_orientFrontZ, AkReal32 in_orientTopX, AkReal32 in_orientTopY, AkReal32 in_orientTopZ)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:400
AkReal32 GetGainForConnectionType(AkConnectionType in_eType) const
Get the emitter-listener-pair-specific gain (due to distance and cone attenuation),...
Definition: AkTypes.h:497
The stream manager should have been initialized at this point.
Definition: AkTypes.h:171
static const AkArgumentValueID AK_FALLBACK_ARGUMENTVALUE_ID
Fallback argument value ID.
Definition: AkTypes.h:109
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:98
Flag is set to indicate the secondary bus hierarchy.
Definition: AkTypes.h:780
3D spatialization is computed directly from the emitter game object position.
Definition: AkTypes.h:755
bool bSpatialized
Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
Definition: AkTypes.h:535
Plugin DLL could not be loaded, either because it is not found or one dependency is missing.
Definition: AkTypes.h:180
The machine does not support SSE instructions (required on PC).
Definition: AkTypes.h:172
A play request was rejected due to the MIDI filter parameters.
Definition: AkTypes.h:178
void SetPosition(AkReal32 in_x, AkReal32 in_y, AkReal32 in_z)
Set position.
Definition: AkTypes.h:378
The Init bank was not loaded yet, the sound engine isn't completely ready yet.
Definition: AkTypes.h:188
AkReal32 fListenerAngle
Angle between position vector and emitter orientation.
Definition: AkTypes.h:513
static const AkPriority AK_DEFAULT_BANK_IO_PRIORITY
Default bank load I/O priority.
Definition: AkTypes.h:119
AkSpeakerPanningType
Speaker panning type: type of panning logic when object is not 3D spatialized (i.e....
Definition: AkTypes.h:745
Definition: AkTypes.h:212
AkReal32 fScalingFactor
Listener position (see AK::SoundEngine::SetPosition()).
Definition: AkTypes.h:534
Update this value to reflect last curve available for fades.
Definition: AkTypes.h:554
WwiseObjectID(AkUniqueID in_ID, AkNodeType in_eNodeType)
Definition: AkTypes.h:862
Definition: AkTypes.h:821
AkReal32 fUserDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send conn...
Definition: AkTypes.h:516
AkGameObjectID listenerID
Game object ID of the listener associated with this send. Use AK_INVALID_GAME_OBJECT as a wildcard to...
Definition: AkTypes.h:566
static const AkReal32 AK_DEFAULT_BANK_THROUGHPUT
Default bank load throughput (1 Mb/ms)
Definition: AkTypes.h:120
OpenSL returned an error. Check error log for more details.
Definition: AkTypes.h:183
AkExternalSourceInfo(AkFileID in_idFile, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by streaming file ID.
Definition: AkTypes.h:258
Simulate one sound coming from multiple directions. Useful for repositionning sounds based on wall op...
Definition: AkTypes.h:738
AkCodecID idCodec
Codec ID for the file. One of the audio formats defined in AkTypes.h (AKCODECID_XXX)
Definition: AkTypes.h:215