Table of Contents

Wwise SDK 2019.2.6
AkTypes.h
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkTypes.h
29 
30 /// \file
31 /// Data type definitions.
32 
33 #ifndef _AK_DATA_TYPES_H_
34 #define _AK_DATA_TYPES_H_
35 
36 // Platform-specific section.
37 //----------------------------------------------------------------------------------------------------
38 #include <AK/AkPlatforms.h>
39 
40 
41 //----------------------------------------------------------------------------------------------------
42 
43 #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
44 
45 #ifndef NULL
46  #ifdef __cplusplus
47  #define NULL 0
48  #else
49  #define NULL ((void *)0)
50  #endif
51 #endif
52 
53 #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
54 #define AK_POINTER_64
55 #endif // #if defined(AK_CPU_X86_64) || defined(AK_CPU_ARM_64)
56 
57 typedef AkUInt32 AkUniqueID; ///< Unique 32-bit ID
58 typedef AkUInt32 AkStateID; ///< State ID
59 typedef AkUInt32 AkStateGroupID; ///< State group ID
60 typedef AkUInt32 AkPlayingID; ///< Playing ID
61 typedef AkInt32 AkTimeMs; ///< Time in ms
62 typedef AkUInt16 AkPortNumber; ///< Port number
63 typedef AkReal32 AkPitchValue; ///< Pitch value
64 typedef AkReal32 AkVolumeValue; ///< Volume value( also apply to LFE )
65 typedef AkUInt64 AkGameObjectID; ///< Game object ID
66 typedef AkReal32 AkLPFType; ///< Low-pass filter type
67 typedef AkInt32 AkMemPoolId; ///< Memory pool ID
68 typedef AkUInt32 AkPluginID; ///< Source or effect plug-in ID
69 typedef AkUInt32 AkCodecID; ///< Codec plug-in ID
70 typedef AkUInt32 AkAuxBusID; ///< Auxilliary bus ID
71 typedef AkInt16 AkPluginParamID; ///< Source or effect plug-in parameter ID
72 typedef AkInt8 AkPriority; ///< Priority
73 typedef AkUInt16 AkDataCompID; ///< Data compression format ID
74 typedef AkUInt16 AkDataTypeID; ///< Data sample type ID
75 typedef AkUInt8 AkDataInterleaveID; ///< Data interleaved state ID
76 typedef AkUInt32 AkSwitchGroupID; ///< Switch group ID
77 typedef AkUInt32 AkSwitchStateID; ///< Switch ID
78 typedef AkUInt32 AkRtpcID; ///< Real time parameter control ID
79 typedef AkReal32 AkRtpcValue; ///< Real time parameter control value
80 typedef AkUInt32 AkBankID; ///< Run time bank ID
81 typedef AkUInt32 AkFileID; ///< Integer-type file identifier
82 typedef AkUInt32 AkDeviceID; ///< I/O device ID
83 typedef AkUInt32 AkTriggerID; ///< Trigger ID
84 typedef AkUInt32 AkArgumentValueID; ///< Argument value ID
85 typedef AkUInt32 AkChannelMask; ///< Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig.h.
86 typedef AkUInt32 AkModulatorID; ///< Modulator ID
87 typedef AkUInt32 AkAcousticTextureID; ///< Acoustic Texture ID
88 typedef AkUInt32 AkImageSourceID; ///< Image Source ID
89 typedef AkUInt64 AkOutputDeviceID; ///< Audio Output device ID
90 
91 // Constants.
92 static const AkPluginID AK_INVALID_PLUGINID = (AkPluginID)-1; ///< Invalid FX ID
93 static const AkGameObjectID AK_INVALID_GAME_OBJECT = (AkGameObjectID)-1; ///< Invalid game object (may also mean all game objects)
94 static const AkUniqueID AK_INVALID_UNIQUE_ID = 0; ///< Invalid unique 32-bit ID
95 static const AkRtpcID AK_INVALID_RTPC_ID = AK_INVALID_UNIQUE_ID;///< Invalid RTPC ID
96 static const AkPlayingID AK_INVALID_PLAYING_ID = AK_INVALID_UNIQUE_ID;///< Invalid playing ID
97 static const AkUInt32 AK_DEFAULT_SWITCH_STATE = 0; ///< Switch selected if no switch has been set yet
98 static const AkMemPoolId AK_INVALID_POOL_ID = -1; ///< Invalid pool ID
99 static const AkMemPoolId AK_DEFAULT_POOL_ID = -1; ///< Default pool ID, same as AK_INVALID_POOL_ID
100 static const AkAuxBusID AK_INVALID_AUX_ID = AK_INVALID_UNIQUE_ID;///< Invalid auxiliary bus ID (or no Aux bus ID)
101 static const AkFileID AK_INVALID_FILE_ID = (AkFileID)-1; ///< Invalid file ID
102 static const AkDeviceID AK_INVALID_DEVICE_ID = (AkDeviceID)-1; ///< Invalid streaming device ID
103 static const AkBankID AK_INVALID_BANK_ID = AK_INVALID_UNIQUE_ID;///< Invalid bank ID
104 static const AkArgumentValueID AK_FALLBACK_ARGUMENTVALUE_ID = 0; ///< Fallback argument value ID
105 static const AkChannelMask AK_INVALID_CHANNELMASK = 0; ///< Invalid channel mask
106 static const AkUInt32 AK_INVALID_OUTPUT_DEVICE_ID = AK_INVALID_UNIQUE_ID;///< Invalid Device ID
107 
108 // Priority.
109 static const AkPriority AK_DEFAULT_PRIORITY = 50; ///< Default sound / I/O priority
110 static const AkPriority AK_MIN_PRIORITY = 0; ///< Minimal priority value [0,100]
111 static const AkPriority AK_MAX_PRIORITY = 100; ///< Maximal priority value [0,100]
112 
113 // Default bank I/O settings.
114 static const AkPriority AK_DEFAULT_BANK_IO_PRIORITY = AK_DEFAULT_PRIORITY; ///< Default bank load I/O priority
115 static const AkReal32 AK_DEFAULT_BANK_THROUGHPUT = 1*1024*1024/1000.f; ///< Default bank load throughput (1 Mb/ms)
116 
117 // Bank version
118 static const AkUInt32 AK_SOUNDBANK_VERSION = 135; ///< Version of the soundbank reader
119 
120 /// Standard function call result.
121 enum AKRESULT
122 {
123  AK_NotImplemented = 0, ///< This feature is not implemented.
124  AK_Success = 1, ///< The operation was successful.
125  AK_Fail = 2, ///< The operation failed.
126  AK_PartialSuccess = 3, ///< The operation succeeded partially.
127  AK_NotCompatible = 4, ///< Incompatible formats
128  AK_AlreadyConnected = 5, ///< The stream is already connected to another node.
129  AK_InvalidFile = 7, ///< An unexpected value causes the file to be invalid.
130  AK_AudioFileHeaderTooLarge = 8, ///< The file header is too large.
131  AK_MaxReached = 9, ///< The maximum was reached.
132  AK_InvalidID = 14, ///< The ID is invalid.
133  AK_IDNotFound = 15, ///< The ID was not found.
134  AK_InvalidInstanceID = 16, ///< The InstanceID is invalid.
135  AK_NoMoreData = 17, ///< No more data is available from the source.
136  AK_InvalidStateGroup = 20, ///< The StateGroup is not a valid channel.
137  AK_ChildAlreadyHasAParent = 21, ///< The child already has a parent.
138  AK_InvalidLanguage = 22, ///< The language is invalid (applies to the Low-Level I/O).
139  AK_CannotAddItseflAsAChild = 23, ///< It is not possible to add itself as its own child.
140  AK_InvalidParameter = 31, ///< Something is not within bounds.
141  AK_ElementAlreadyInList = 35, ///< The item could not be added because it was already in the list.
142  AK_PathNotFound = 36, ///< This path is not known.
143  AK_PathNoVertices = 37, ///< Stuff in vertices before trying to start it
144  AK_PathNotRunning = 38, ///< Only a running path can be paused.
145  AK_PathNotPaused = 39, ///< Only a paused path can be resumed.
146  AK_PathNodeAlreadyInList = 40, ///< This path is already there.
147  AK_PathNodeNotInList = 41, ///< This path is not there.
148  AK_DataNeeded = 43, ///< The consumer needs more.
149  AK_NoDataNeeded = 44, ///< The consumer does not need more.
150  AK_DataReady = 45, ///< The provider has available data.
151  AK_NoDataReady = 46, ///< The provider does not have available data.
152  AK_InsufficientMemory = 52, ///< Memory error.
153  AK_Cancelled = 53, ///< The requested action was cancelled (not an error).
154  AK_UnknownBankID = 54, ///< Trying to load a bank using an ID which is not defined.
155  AK_BankReadError = 56, ///< Error while reading a bank.
156  AK_InvalidSwitchType = 57, ///< Invalid switch type (used with the switch container)
157  AK_FormatNotReady = 63, ///< Source format not known yet.
158  AK_WrongBankVersion = 64, ///< The bank version is not compatible with the current bank reader.
159  AK_FileNotFound = 66, ///< File not found.
160  AK_DeviceNotReady = 67, ///< Specified ID doesn't match a valid hardware device: either the device doesn't exist or is disabled.
161  AK_BankAlreadyLoaded = 69, ///< The bank load failed because the bank is already loaded.
162  AK_RenderedFX = 71, ///< The effect on the node is rendered.
163  AK_ProcessNeeded = 72, ///< A routine needs to be executed on some CPU.
164  AK_ProcessDone = 73, ///< The executed routine has finished its execution.
165  AK_MemManagerNotInitialized = 74, ///< The memory manager should have been initialized at this point.
166  AK_StreamMgrNotInitialized = 75, ///< The stream manager should have been initialized at this point.
167  AK_SSEInstructionsNotSupported = 76,///< The machine does not support SSE instructions (required on PC).
168  AK_Busy = 77, ///< The system is busy and could not process the request.
169  AK_UnsupportedChannelConfig = 78, ///< Channel configuration is not supported in the current execution context.
170  AK_PluginMediaNotAvailable = 79, ///< Plugin media is not available for effect.
171  AK_MustBeVirtualized = 80, ///< Sound was Not Allowed to play.
172  AK_CommandTooLarge = 81, ///< SDK command is too large to fit in the command queue.
173  AK_RejectedByFilter = 82, ///< A play request was rejected due to the MIDI filter parameters.
174  AK_InvalidCustomPlatformName= 83, ///< Detecting incompatibility between Custom platform of banks and custom platform of connected application
175  AK_DLLCannotLoad = 84, ///< Plugin DLL could not be loaded, either because it is not found or one dependency is missing.
176  AK_DLLPathNotFound = 85, ///< Plugin DLL search path could not be found.
177  AK_NoJavaVM = 86, ///< No Java VM provided in AkInitSettings.
178  AK_OpenSLError = 87, ///< OpenSL returned an error. Check error log for more details.
179  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.
180  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)
181  AK_DeviceNotCompatible = 90, ///< Incompatible Audio device.
182  AK_DuplicateUniqueID = 91, ///< Two Wwise objects share the same ID.
183  AK_InitBankNotLoaded = 92, ///< The Init bank was not loaded yet, the sound engine isn't completely ready yet.
184  AK_DeviceNotFound = 93, ///< The specified device ID does not match with any of the output devices that the sound engine is currently using.
185  AK_PlayingIDNotFound = 94, ///< Calling a function with a playing ID that is not known.
186  AK_InvalidFloatValue = 95, ///< One parameter has a invalid float value such as NaN, INF or FLT_MAX.
187  AK_FileFormatMismatch = 96, ///< Media file format unexpected
188 };
189 
190 /// Game sync group type
191 enum AkGroupType
192 {
193  // should stay set as Switch = 0 and State = 1
194  AkGroupType_Switch = 0, ///< Type switch
195  AkGroupType_State = 1 ///< Type state
196 };
197 
198 /// Configured audio settings
200 {
201  AkUInt32 uNumSamplesPerFrame; ///< Number of samples per audio frame (256, 512, 1024 or 2048).
202  AkUInt32 uNumSamplesPerSecond; ///< Number of samples per second.
203 };
204 
205 enum AkAudioDeviceState
206 {
207  AkDeviceState_Unknown = 0, ///< The audio device state is unknown or invalid.
208  AkDeviceState_Active = 1 << 0, ///< The audio device is active That is, the audio adapter that connects to the endpoint device is present and enabled.
209  AkDeviceState_Disabled = 1 << 1, ///< The audio device is disabled.
210  AkDeviceState_NotPresent = 1 << 2, ///< The audio device is not present because the audio adapter that connects to the endpoint device has been removed from the system.
211  AkDeviceState_Unplugged = 1 << 3, ///< The audio device is unplugged.
212  AkDeviceState_All = AkDeviceState_Active | AkDeviceState_Disabled | AkDeviceState_NotPresent | AkDeviceState_Unplugged, ///< Includes audio devices in all states.
213 };
214 
216 {
217  AkUInt32 idDevice; ///< Device ID for Wwise. This is the same as what is returned from AK::GetDeviceID and AK::GetDeviceIDFromName. Use it to specify the main device in AkPlatformInitSettings.idAudioDevice or in AK::SoundEngine::AddSecondaryOutput.
218  AkOSChar deviceName[AK_MAX_PATH]; ///< The user-friendly name for the device.
219  AkAudioDeviceState deviceStateMask = AkDeviceState_Unknown; ///< Bitmask used to filter the device based on their state.
220  bool isDefaultDevice = false; ///< Identify default device. Always false when not supported.
221 };
222 
223 /// This structure allows the game to provide audio files to fill the external sources. See \ref AK::SoundEngine::PostEvent
224 /// You can specify a streaming file or a file in-memory, regardless of the "Stream" option in the Wwise project.
225 /// \akwarning
226 /// 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).
227 /// \endakwarning
229 {
230  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
231  AkCodecID idCodec; ///< Codec ID for the file. One of the audio formats defined in AkTypes.h (AKCODECID_XXX)
232  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).
233  void* pInMemory; ///< Pointer to the in-memory file. If not NULL, the source will be read from memory. Set szFile and idFile to NULL.
234  AkUInt32 uiMemorySize; ///< Size of the data pointed by pInMemory
235  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.
236 
237  /// Default constructor.
239  : iExternalSrcCookie( 0 )
240  , idCodec( 0 )
241  , szFile( 0 )
242  , pInMemory( 0 )
243  , uiMemorySize( 0 )
244  , idFile( 0 ) {}
245 
246  /// Constructor: specify source by memory.
248  void* in_pInMemory, ///< Pointer to the in-memory file.
249  AkUInt32 in_uiMemorySize, ///< Size of data.
250  AkUInt32 in_iExternalSrcCookie, ///< Cookie.
251  AkCodecID in_idCodec ///< Codec ID.
252  )
253  : iExternalSrcCookie( in_iExternalSrcCookie )
254  , idCodec( in_idCodec )
255  , szFile( 0 )
256  , pInMemory( in_pInMemory )
257  , uiMemorySize( in_uiMemorySize )
258  , idFile( 0 ) {}
259 
260  /// Constructor: specify source by streaming file name.
262  AkOSChar * in_pszFileName, ///< File name.
263  AkUInt32 in_iExternalSrcCookie, ///< Cookie.
264  AkCodecID in_idCodec ///< Codec ID.
265  )
266  : iExternalSrcCookie( in_iExternalSrcCookie )
267  , idCodec( in_idCodec )
268  , szFile( in_pszFileName )
269  , pInMemory( 0 )
270  , uiMemorySize( 0 )
271  , idFile( 0 ) {}
272 
273  /// Constructor: specify source by streaming file ID.
275  AkFileID in_idFile, ///< File ID.
276  AkUInt32 in_iExternalSrcCookie, ///< Cookie.
277  AkCodecID in_idCodec ///< Codec ID.
278  )
279  : iExternalSrcCookie( in_iExternalSrcCookie )
280  , idCodec( in_idCodec )
281  , szFile( 0 )
282  , pInMemory( 0 )
283  , uiMemorySize( 0 )
284  , idFile( in_idFile ) {}
285 };
286 
287 /// Nature of the connection binding an input to a bus.
288 enum AkConnectionType
289 {
290  ConnectionType_Direct = 0x0, ///< Direct (main, dry) connection.
291  ConnectionType_GameDefSend = 0x1, ///< Connection by a game-defined send.
292  ConnectionType_UserDefSend = 0x2, ///< Connection by a user-defined send.
293  ConnectionType_ReflectionsSend = 0x3, ///< Connection by a early reflections send.
294 };
295 
296 /// 3D vector.
297 struct AkVector
298 {
299  inline AkVector operator+(const AkVector& b) const
300  {
301  AkVector v;
302 
303  v.X = X + b.X;
304  v.Y = Y + b.Y;
305  v.Z = Z + b.Z;
306 
307  return v;
308  }
309 
310  inline void Zero()
311  {
312  X = 0; Y = 0; Z = 0;
313  }
314 
315  AkReal32 X; ///< X Position
316  AkReal32 Y; ///< Y Position
317  AkReal32 Z; ///< Z Position
318 };
319 
320 /// Position and orientation of game objects.
322 {
323 public:
324  //
325  // Getters.
326  //
327 
328  /// Get position vector.
329  inline const AkVector & Position() const
330  {
331  return position;
332  }
333 
334  /// Get orientation front vector.
335  inline const AkVector & OrientationFront() const
336  {
337  return orientationFront;
338  }
339 
340  /// Get orientation top vector.
341  inline const AkVector & OrientationTop() const
342  {
343  return orientationTop;
344  }
345 
346  //
347  // Setters.
348  //
349 
350  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
351  inline void Set(
352  const AkVector & in_position, ///< Position vector.
353  const AkVector & in_orientationFront, ///< Orientation front
354  const AkVector & in_orientationTop ///< Orientation top
355  )
356  {
357  position = in_position;
358  orientationFront = in_orientationFront;
359  orientationTop = in_orientationTop;
360  }
361 
362  /// Set position and orientation. Orientation front and top should be orthogonal and normalized.
363  inline void Set(
364  AkReal32 in_positionX, ///< Position x
365  AkReal32 in_positionY, ///< Position y
366  AkReal32 in_positionZ, ///< Position z
367  AkReal32 in_orientFrontX, ///< Orientation front x
368  AkReal32 in_orientFrontY, ///< Orientation front y
369  AkReal32 in_orientFrontZ, ///< Orientation front z
370  AkReal32 in_orientTopX, ///< Orientation top x
371  AkReal32 in_orientTopY, ///< Orientation top y
372  AkReal32 in_orientTopZ ///< Orientation top z
373  )
374  {
375  position.X = in_positionX;
376  position.Y = in_positionY;
377  position.Z = in_positionZ;
378  orientationFront.X = in_orientFrontX;
379  orientationFront.Y = in_orientFrontY;
380  orientationFront.Z = in_orientFrontZ;
381  orientationTop.X = in_orientTopX;
382  orientationTop.Y = in_orientTopY;
383  orientationTop.Z = in_orientTopZ;
384  }
385 
386  /// Set position.
387  inline void SetPosition(
388  const AkVector & in_position ///< Position vector.
389  )
390  {
391  position = in_position;
392  }
393 
394  /// Set position.
395  inline void SetPosition(
396  AkReal32 in_x, ///< x
397  AkReal32 in_y, ///< y
398  AkReal32 in_z ///< z
399  )
400  {
401  position.X = in_x;
402  position.Y = in_y;
403  position.Z = in_z;
404  }
405 
406  /// Set orientation. Orientation front and top should be orthogonal and normalized.
407  inline void SetOrientation(
408  const AkVector & in_orientationFront, ///< Orientation front
409  const AkVector & in_orientationTop ///< Orientation top
410  )
411  {
412  orientationFront = in_orientationFront;
413  orientationTop = in_orientationTop;
414  }
415 
416  /// Set orientation. Orientation front and top should be orthogonal and normalized.
417  inline void SetOrientation(
418  AkReal32 in_orientFrontX, ///< Orientation front x
419  AkReal32 in_orientFrontY, ///< Orientation front y
420  AkReal32 in_orientFrontZ, ///< Orientation front z
421  AkReal32 in_orientTopX, ///< Orientation top x
422  AkReal32 in_orientTopY, ///< Orientation top y
423  AkReal32 in_orientTopZ ///< Orientation top z
424  )
425  {
426  orientationFront.X = in_orientFrontX;
427  orientationFront.Y = in_orientFrontY;
428  orientationFront.Z = in_orientFrontZ;
429  orientationTop.X = in_orientTopX;
430  orientationTop.Y = in_orientTopY;
431  orientationTop.Z = in_orientTopZ;
432  }
433 
434 private:
435  AkVector orientationFront; ///< Orientation of the listener
436  AkVector orientationTop; ///< Top orientation of the listener
437  AkVector position; ///< Position of the listener
438 };
439 
440 /// Positioning information for a sound.
442 
443 /// Positioning information for a listener.
445 
446 /// Obstruction/occlusion pair for a position
448 {
449  AkReal32 occlusion; ///< OcclusionLevel: [0.0f..1.0f]
450  AkReal32 obstruction; ///< ObstructionLevel: [0.0f..1.0f]
451 };
452 
453 /// Positioning information for a sound, with specified subset of its channels.
455 {
456  AkTransform position; ///< Emitter position.
457  AkChannelMask uInputChannels; ///< Channels to which the above position applies.
458 };
459 
460 /// Polar coordinates.
462 {
463  AkReal32 r; ///< Norm/distance
464  AkReal32 theta; ///< Azimuth
465 };
466 
467 /// Spherical coordinates.
469 {
470  AkReal32 phi; ///< Elevation
471 };
472 
473 /// Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
475 {
476 public:
477  /// Constructor.
479  : fDistance(0.f)
480  , fEmitterAngle(0.f)
481  , fListenerAngle(0.f)
482  , fDryMixGain(1.f)
483  , fGameDefAuxMixGain(1.f)
484  , fUserDefAuxMixGain(1.f)
485  , fOcclusion(0.f)
486  , fObstruction(0.f)
487  , fSpread(0.f)
488  , fFocus(0.f)
489  , uEmitterChannelMask(0xFFFFFFFF)
490  , m_uListenerID(0)
491  {
492  }
493  /// Destructor.
495 
496  /// Get distance.
497  inline AkReal32 Distance() const { return fDistance; }
498 
499  /// Get the absolute angle, in radians between 0 and pi, of the emitter's orientation relative to
500  /// the line that joins the emitter and the listener.
501  inline AkReal32 EmitterAngle() const { return fEmitterAngle; }
502 
503  /// Get the absolute angle, in radians between 0 and pi, of the listener's orientation relative to
504  /// the line that joins the emitter and the listener
505  inline AkReal32 ListenerAngle() const { return fListenerAngle; }
506 
507  /// Get the occlusion factor for this emitter-listener pair
508  inline AkReal32 Occlusion() const { return fOcclusion; }
509 
510  /// Get the obstruction factor for this emitter-listener pair
511  inline AkReal32 Obstruction() const { return fObstruction; }
512 
513  /// Get the emitter-listener-pair-specific gain (due to distance and cone attenuation), linear [0,1], for a given connection type.
514  inline AkReal32 GetGainForConnectionType(AkConnectionType in_eType) const
515  {
516  if (in_eType == ConnectionType_Direct)
517  return fDryMixGain;
518  else if (in_eType == ConnectionType_GameDefSend)
519  return fGameDefAuxMixGain;
520  else if (in_eType == ConnectionType_UserDefSend)
521  return fUserDefAuxMixGain;
522  else
523  return 1.0f;
524  }
525 
526  /// Get listener ID associated with the emitter-listener pair.
527  inline AkGameObjectID ListenerID() const { return m_uListenerID; }
528 
529  AkTransform emitter; /// Emitter position.
530  AkReal32 fDistance; /// Distance between emitter and listener.
531  AkReal32 fEmitterAngle; /// Angle between position vector and emitter orientation.
532  AkReal32 fListenerAngle; /// Angle between position vector and listener orientation.
533  AkReal32 fDryMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
534  AkReal32 fGameDefAuxMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send connections.
535  AkReal32 fUserDefAuxMixGain; /// Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send connections.
536  AkReal32 fOcclusion; /// Emitter-listener-pair-specific occlusion factor
537  AkReal32 fObstruction; /// Emitter-listener-pair-specific obstruction factor
538  AkReal32 fSpread; /// Emitter-listener-pair-specific spread
539  AkReal32 fFocus; /// Emitter-listener-pair-specific focus
540  AkChannelMask uEmitterChannelMask; /// Channels of the emitter that apply to this ray.
541 protected:
542  AkGameObjectID m_uListenerID; /// Listener game object ID.
543 };
544 
545 /// Listener information.
546 struct AkListener
547 {
549  : fScalingFactor( 1.0f )
550  , bSpatialized( true )
551  {}
552  AkListenerPosition position; /// Listener position (see AK::SoundEngine::SetPosition()).
553  AkReal32 fScalingFactor; /// Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
554  bool bSpatialized; /// Whether listener is spatialized or not (see AK::SoundEngine::SetListenerSpatialization()).
555 };
556 
557 // If you modify AkCurveInterpolation, don't forget to modify WAAPI validation schema accordingly.
558 
559 /// Curve interpolation types
560 enum AkCurveInterpolation
561 {
562 //DONT GO BEYOND 15! (see below for details)
563 //Curves from 0 to LastFadeCurve NEED TO BE A MIRROR IMAGE AROUND LINEAR (eg. Log3 is the inverse of Exp3)
564  AkCurveInterpolation_Log3 = 0, ///< Log3
565  AkCurveInterpolation_Sine = 1, ///< Sine
566  AkCurveInterpolation_Log1 = 2, ///< Log1
567  AkCurveInterpolation_InvSCurve = 3, ///< Inversed S Curve
568  AkCurveInterpolation_Linear = 4, ///< Linear (Default)
569  AkCurveInterpolation_SCurve = 5, ///< S Curve
570  AkCurveInterpolation_Exp1 = 6, ///< Exp1
571  AkCurveInterpolation_SineRecip = 7, ///< Reciprocal of sine curve
572  AkCurveInterpolation_Exp3 = 8, ///< Exp3
573  AkCurveInterpolation_LastFadeCurve = 8, ///< Update this value to reflect last curve available for fades
574  AkCurveInterpolation_Constant = 9 ///< Constant ( not valid for fading values )
575 //DONT GO BEYOND 15! The value is stored on 5 bits,
576 //but we can use only 4 bits for the actual values, keeping
577 //the 5th bit at 0 to void problems when the value is
578 //expanded to 32 bits.
579 };
580 #define AKCURVEINTERPOLATION_NUM_STORAGE_BIT 5 ///< Internal storage restriction, for internal use only.
581 
582 /// Auxiliary bus sends information per game object per given auxiliary bus.
584 {
585  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).
586  AkAuxBusID auxBusID; ///< Auxiliary bus ID.
587  AkReal32 fControlValue; ///< Represents the attenuation or amplification factor applied to the volume of the sound going through the auxiliary bus. A value in the range [0.0f:1.0f[ will attenuate the sound, the sound being completely attenuated at 0.0f and unchanged at 1.0f. A value greater than 1.0f will amplify the sound by a factor equal to this value.
588 };
589 
590 /// Volume ramp specified by end points "previous" and "next".
591 struct AkRamp
592 {
593  AkRamp() : fPrev( 1.f ), fNext( 1.f ) {}
594  AkRamp( AkReal32 in_fPrev, AkReal32 in_fNext ) : fPrev( in_fPrev ), fNext( in_fNext ) {}
595  AkRamp & operator*=(const AkRamp& in_rRhs) { fPrev *= in_rRhs.fPrev; fNext *= in_rRhs.fNext; return *this; }
596 
597  AkReal32 fPrev;
598  AkReal32 fNext;
599 };
600 inline AkRamp operator*(const AkRamp& in_rLhs, const AkRamp& in_rRhs)
601 {
602  AkRamp result(in_rLhs);
603  result *= in_rRhs;
604  return result;
605 }
606 
607 // ---------------------------------------------------------------
608 // Languages
609 // ---------------------------------------------------------------
610 #define AK_MAX_LANGUAGE_NAME_SIZE (32)
611 
612 // ---------------------------------------------------------------
613 // File Type ID Definitions
614 // ---------------------------------------------------------------
615 
616 // These correspond to IDs specified in the conversion plug-ins' XML
617 // files. Audio sources persist them to "remember" their format.
618 // DO NOT CHANGE THEM without talking to someone in charge of persistence!
619 
620 // Company ID for plugin development.
621 #define AKCOMPANYID_PLUGINDEV_MIN (64)
622 #define AKCOMPANYID_PLUGINDEV_MAX (255)
623 
624 // Vendor ID.
625 #define AKCOMPANYID_AUDIOKINETIC (0) ///< Audiokinetic inc.
626 #define AKCOMPANYID_AUDIOKINETIC_EXTERNAL (1) ///< Audiokinetic inc.
627 #define AKCOMPANYID_MCDSP (256) ///< McDSP
628 #define AKCOMPANYID_WAVEARTS (257) ///< WaveArts
629 #define AKCOMPANYID_PHONETICARTS (258) ///< Phonetic Arts
630 #define AKCOMPANYID_IZOTOPE (259) ///< iZotope
631 #define AKCOMPANYID_CRANKCASEAUDIO (261) ///< Crankcase Audio
632 #define AKCOMPANYID_IOSONO (262) ///< IOSONO
633 #define AKCOMPANYID_AUROTECHNOLOGIES (263) ///< Auro Technologies
634 #define AKCOMPANYID_DOLBY (264) ///< Dolby
635 #define AKCOMPANYID_TWOBIGEARS (265) ///< Two Big Ears
636 #define AKCOMPANYID_OCULUS (266) ///< Oculus
637 #define AKCOMPANYID_BLUERIPPLESOUND (267) ///< Blue Ripple Sound
638 #define AKCOMPANYID_ENZIEN (268) ///< Enzien Audio
639 #define AKCOMPANYID_KROTOS (269) ///< Krotos (Dehumanizer)
640 #define AKCOMPANYID_NURULIZE (270) ///< Nurulize
641 #define AKCOMPANYID_SUPERPOWERED (271) ///< Super Powered
642 #define AKCOMPANYID_GOOGLE (272) ///< Google
643 //#define AKCOMPANYID_NVIDIA (273) ///< NVIDIA // Commented out to avoid redefinition, provider is already defining it.
644 //#define AKCOMPANYID_RESERVED (274) ///< Reserved // Commented out to avoid redefinition, provider is already defining it.
645 //#define AKCOMPANYID_MICROSOFT (275) ///< Microsoft // Commented out to avoid redefinition, provider is already defining it.
646 //#define AKCOMPANYID_YAMAHA (276) ///< YAMAHA // Commented out to avoid redefinition, provider is already defining it.
647 #define AKCOMPANYID_VISISONICS (277) ///< Visisonics
648 
649 // File/encoding types of Audiokinetic.
650 #define AKCODECID_BANK (0) ///< Bank encoding
651 #define AKCODECID_PCM (1) ///< PCM encoding
652 #define AKCODECID_ADPCM (2) ///< ADPCM encoding
653 #define AKCODECID_XMA (3) ///< XMA encoding
654 #define AKCODECID_VORBIS (4) ///< Vorbis encoding
655 #define AKCODECID_WIIADPCM (5) ///< ADPCM encoding on the Wii
656 #define AKCODECID_PCMEX (7) ///< Standard PCM WAV file parser for Wwise Authoring
657 #define AKCODECID_EXTERNAL_SOURCE (8) ///< External Source (unknown encoding)
658 #define AKCODECID_XWMA (9) ///< xWMA encoding
659 #define AKCODECID_AAC (10) ///< AAC encoding (only available on Apple devices) -- see AkAACFactory.h
660 #define AKCODECID_FILE_PACKAGE (11) ///< File package files generated by the File Packager utility.
661 #define AKCODECID_ATRAC9 (12) ///< ATRAC-9 encoding
662 #define AKCODECID_VAG (13) ///< VAG/HE-VAG encoding
663 #define AKCODECID_PROFILERCAPTURE (14) ///< Profiler capture file (.prof) as written through AK::SoundEngine::StartProfilerCapture
664 #define AKCODECID_ANALYSISFILE (15) ///< Analysis file
665 #define AKCODECID_MIDI (16) ///< MIDI file
666 #define AKCODECID_OPUSNX (17) ///< OpusNX encoding
667 #define AKCODECID_CAF (18) ///< CAF file
668 #define AKCODECID_AKOPUS (19) ///< Opus encoding, 2018.1 to 2019.2
669 #define AKCODECID_AKOPUS_WEM (20) ///< Opus encoding, wrapped in WEM
670 
671 #define AKPLUGINID_METER (129) ///< Meter Plugin
672 #define AKPLUGINID_RECORDER (132) ///< Recorder Plugin
673 
674 #define AKEXTENSIONID_SPATIALAUDIO (800) ///< Spatial Audio
675 #define AKEXTENSIONID_INTERACTIVEMUSIC (801) ///< Interactive Music
676 #define AKEXTENSIONID_EVENTMGRTHREAD (900) ///< Profiling: Event Manager
677 
678 //The following are internally defined
679 #define AK_WAVE_FORMAT_VAG 0xFFFB
680 #define AK_WAVE_FORMAT_AT9 0xFFFC
681 #define AK_WAVE_FORMAT_VORBIS 0xFFFF
682 #define AK_WAVE_FORMAT_AAC 0xAAC0
683 #define AK_WAVE_FORMAT_OPUSNX 0x3039
684 #define AK_WAVE_FORMAT_OPUS 0x3040
685 #define AK_WAVE_FORMAT_OPUS_WEM 0x3041
686 #define WAVE_FORMAT_XMA2 0x166
687 
688 //-----------------------------------------------------------------------------
689 // Codecs
690 //-----------------------------------------------------------------------------
691 
692 class IAkSoftwareCodec;
693 class IAkFileCodec;
694 class IAkGrainCodec;
695 /// Registered file source creation function prototype.
696 AK_CALLBACK( IAkSoftwareCodec*, AkCreateFileSourceCallback )( void* in_pCtx );
697 /// Registered bank source node creation function prototype.
698 AK_CALLBACK( IAkSoftwareCodec*, AkCreateBankSourceCallback )( void* in_pCtx );
699 /// Registered FileCodec creation function prototype.
700 AK_CALLBACK( IAkFileCodec*, AkCreateFileCodecCallback )();
701 /// Registered IAkGrainCodec creation function prototype.
702 AK_CALLBACK( IAkGrainCodec*, AkCreateGrainCodecCallback )();
703 
705 {
706  AkCreateFileSourceCallback pFileSrcCreateFunc; // File VPL source.
707  AkCreateBankSourceCallback pBankSrcCreateFunc; // Bank VPL source.
708  AkCreateFileCodecCallback pFileCodecCreateFunc; // FileCodec utility.
709  AkCreateGrainCodecCallback pGrainCodecCreateFunc; // GrainCodec utility.
710 };
711 
712 
713 //-----------------------------------------------------------------------------
714 // Positioning
715 //-----------------------------------------------------------------------------
716 
717 namespace AK
718 {
719  namespace SoundEngine
720  {
721  // If you modify MultiPositionType, don't forget to modify WAAPI validation schema accordingly.
722 
723  /// MultiPositionType.
724  /// \sa
725  /// - AK::SoundEngine::SetMultiplePosition()
726  /// - \ref soundengine_3dpositions_multiplepos
728  {
729  MultiPositionType_SingleSource, ///< Used for normal sounds, not expected to pass to AK::SoundEngine::SetMultiplePosition() (if done, only the first position will be used).
730  MultiPositionType_MultiSources, ///< Simulate multiple sources in one sound playing, adding volumes. For instance, all the torches on your level emitting using only one sound.
731  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 ).
732  };
733  }
734 }
735 
736 #define AK_PANNER_NUM_STORAGE_BITS 3
737 /// Speaker panning type: type of panning logic when object is not 3D spatialized (i.e. when Ak3DSpatializationMode is AK_SpatializationMode_None).
738 enum AkSpeakerPanningType
739 {
740  AK_DirectSpeakerAssignment = 0, ///< No panning: route to matching channels between input and output.
741  AK_BalanceFadeHeight = 1 ///< Balance-Fade-Height: Traditional "box" or "car"-like panner.
742 };
743 
744 #define AK_POSSOURCE_NUM_STORAGE_BITS 3
745 /// 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.
746 enum Ak3DPositionType
747 {
748  AK_3DPositionType_Emitter = 0, ///< 3D spatialization is computed directly from the emitter game object position.
749  AK_3DPositionType_EmitterWithAutomation = 1, ///< 3D spatialization is computed from the emitter game object position, translated by user-defined automation.
750  AK_3DPositionType_ListenerWithAutomation = 2 ///< 3D spatialization is computed from the listener game object position, translated by user-defined automation.
751 };
752 
753 /// Headphone / speakers panning rules
754 enum AkPanningRule
755 {
756  AkPanningRule_Speakers = 0, ///< Left and right positioned 60 degrees apart (by default - see AK::SoundEngine::GetSpeakerAngles()).
757  AkPanningRule_Headphones = 1 ///< Left and right positioned 180 degrees apart.
758 };
759 
760 #define AK_SPAT_NUM_STORAGE_BITS 3
761 /// 3D spatialization mode.
762 enum Ak3DSpatializationMode
763 {
764  AK_SpatializationMode_None = 0, ///< No spatialization
765  AK_SpatializationMode_PositionOnly = 1, ///< Spatialization based on emitter position only.
766  AK_SpatializationMode_PositionAndOrientation = 2 ///< Spatialization based on both emitter position and emitter orientation.
767 };
768 
769 /// Bus type bit field.
770 enum AkBusHierarchyFlags
771 {
772  AkBusHierarchy_Primary = 1 << 0, ///< Flag is set to indicate the primary bus hierarchy.
773  AkBusHierarchy_Secondary = 1 << 1, ///< Flag is set to indicate the secondary bus hierarchy.
774  AkBusHierarchy_IsMaster = 1 << 7 ///< Flag is set to indicate a master bus (may be used in combination with other flags).
775 };
776 
777 #define AK_MAX_BITS_METERING_FLAGS (5) // Keep in sync with AkMeteringFlags.
778 
779 /// Metering flags. Used for specifying bus metering, through AK::SoundEngine::RegisterBusVolumeCallback() or AK::IAkMixerPluginContext::SetMeteringFlags().
780 enum AkMeteringFlags
781 {
782  AK_NoMetering = 0, ///< No metering.
783  AK_EnableBusMeter_Peak = 1 << 0, ///< Enable computation of peak metering.
784  AK_EnableBusMeter_TruePeak = 1 << 1, ///< Enable computation of true peak metering (most CPU and memory intensive).
785  AK_EnableBusMeter_RMS = 1 << 2, ///< Enable computation of RMS metering.
786  // 1 << 3 is reserved.
787  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).
788  AK_EnableBusMeter_3DMeter = 1 << 5
789 };
790 
791 /// Plug-in type.
792 /// \sa
793 /// - AkPluginInfo
794 enum AkPluginType
795 {
796  AkPluginTypeNone = 0, ///< Unknown/invalid plug-in type.
797  AkPluginTypeCodec = 1, ///< Compressor/decompressor plug-in (allows support for custom audio file types).
798  AkPluginTypeSource = 2, ///< Source plug-in: creates sound by synthesis method (no input, just output).
799  AkPluginTypeEffect = 3, ///< Effect plug-in: applies processing to audio data.
800  //AkPluginTypeMotionDevice = 4, ///< Motion Device plug-in: feeds movement data to devices. Deprecated by Motion refactor.
801  //AkPluginTypeMotionSource = 5, ///< Motion Device source plug-in: feeds movement data to device busses. Deprecated by Motion refactor.
802  AkPluginTypeMixer = 6, ///< Mixer plug-in: mix voices at the bus level.
803  AkPluginTypeSink = 7, ///< Sink plug-in: implement custom sound engine end point.
804  AkPluginTypeGlobalExtension = 8, ///< Global Extension plug-in: (e.g. Spatial Audio, Interactive Music)
805  AkPluginTypeMask = 0xf ///< Plug-in type mask is 4 bits.
806 };
807 
808 ////////////////////////////////////////////////////////////////////////////////
809 // Wwise ID system
810 ////////////////////////////////////////////////////////////////////////////////
811 enum AkNodeType
812 {
813  AkNodeType_Default,
814  AkNodeType_Bus
815 };
816 
818 {
819 public:
820 
821  bool operator == ( const WwiseObjectIDext& in_rOther ) const
822  {
823  return in_rOther.id == id && in_rOther.bIsBus == bIsBus;
824  }
825 
826  AkNodeType GetType()
827  {
828  return bIsBus ? AkNodeType_Bus : AkNodeType_Default;
829  }
830 
831  AkUniqueID id;
832  bool bIsBus;
833 };
834 
836 {
838  {
839  id = AK_INVALID_UNIQUE_ID;
840  bIsBus = false;
841  }
842 
843  WwiseObjectID( AkUniqueID in_ID )
844  {
845  id = in_ID;
846  bIsBus = false;
847  }
848 
849  WwiseObjectID( AkUniqueID in_ID, bool in_bIsBus )
850  {
851  id = in_ID;
852  bIsBus = in_bIsBus;
853  }
854 
855  WwiseObjectID( AkUniqueID in_ID, AkNodeType in_eNodeType )
856  {
857  id = in_ID;
858  bIsBus = in_eNodeType == AkNodeType_Bus;
859  }
860 };
861 
862 /// Public data structures for converted file format.
863 namespace AkFileParser
864 {
865 #pragma pack(push, 1)
866  /// Analyzed envelope point.
868  {
869  AkUInt32 uPosition; /// Position of this point in samples at the source rate.
870  AkUInt16 uAttenuation; /// Approximate _attenuation_ at this location relative to this source's maximum, in dB (absolute value).
871  };
872 #pragma pack(pop)
873 }
874 
875 #ifndef AK_OS_STRUCT_ALIGN
876 #define AK_OS_STRUCT_ALIGN 4 ///< OS Structures need to be aligned at 4 bytes.
877 #endif
878 
879 #ifndef AK_64B_OS_STRUCT_ALIGN
880 #define AK_64B_OS_STRUCT_ALIGN 8 ///< OS Structures need to be aligned at 8 bytes.
881 #endif
882 
883 #ifndef AK_ALIGN
884 #if defined(SWIG)
885 #define AK_ALIGN( _declaration_, _alignment_ ) _declaration_
886 #else
887 #if defined(_MSC_VER)
888 #define AK_ALIGN( _declaration_, _alignment_ ) __declspec( align( _alignment_ ) ) _declaration_
889 #else
890 #define AK_ALIGN( _declaration_, _alignment_ ) _declaration_ __attribute__( ( aligned( _alignment_ ) ) )
891 #endif // _MSC_VER
892 #endif // SWIG
893 #endif // AK_ALIGN
894 
895 #if !defined(AK_ENDIANNESS_LITTLE) && !defined(AK_ENDIANNESS_BIG)
896 #define AK_ENDIANNESS_LITTLE
897 #endif
898 
899 #ifndef AK_UNALIGNED
900 #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 *.
901 #endif
902 
903 #if __cplusplus <= 199711L
904 #define AK_FINAL
905 #else
906 #define AK_FINAL final ///< Refers to the C++11 final keyword
907 #endif
908 
909 #ifndef AK_ASYNC_OPEN_DEFAULT
910 #define AK_ASYNC_OPEN_DEFAULT (false) ///< Refers to asynchronous file opening in default low-level IO.
911 #endif
912 
913 #ifndef AK_COMM_DEFAULT_DISCOVERY_PORT
914 #define AK_COMM_DEFAULT_DISCOVERY_PORT 24024 ///< Default discovery port for most platforms using IP sockets for communication.
915 #endif
916 
917 #ifndef AK_CAPTURE_TYPE_FLOAT
918 typedef AkInt16 AkCaptureType; ///< Default value: capture type is short.
919 #endif
920 
921 #define AkRegister
922 
923 #endif //_AK_DATA_TYPES_H_
AkEmitterListenerPair()
Constructor.
Definition: AkTypes.h:478
AkAudioDeviceState deviceStateMask
Bitmask used to filter the device based on their state.
Definition: AkTypes.h:219
AkGameObjectID m_uListenerID
Channels of the emitter that apply to this ray.
Definition: AkTypes.h:542
MultiPositionType
Definition: AkTypes.h:727
AkUniqueID id
Definition: AkTypes.h:831
AkNodeType GetType()
Definition: AkTypes.h:826
AkReal32 fControlValue
Represents the attenuation or amplification factor applied to the volume of the sound going through t...
Definition: AkTypes.h:587
void SetPosition(AkReal32 in_x, AkReal32 in_y, AkReal32 in_z)
Set position.
Definition: AkTypes.h:395
AkExternalSourceInfo(AkFileID in_idFile, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by streaming file ID.
Definition: AkTypes.h:274
AkRamp & operator*=(const AkRamp &in_rRhs)
Definition: AkTypes.h:595
AkReal32 Occlusion() const
Get the occlusion factor for this emitter-listener pair.
Definition: AkTypes.h:508
void Zero()
Definition: AkTypes.h:310
Audiokinetic namespace.
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:583
AkReal32 fEmitterAngle
Distance between emitter and listener.
Definition: AkTypes.h:531
Obstruction/occlusion pair for a position.
Definition: AkTypes.h:447
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:233
AkCodecID idCodec
Codec ID for the file. One of the audio formats defined in AkTypes.h (AKCODECID_XXX)
Definition: AkTypes.h:231
AkReal32 fPrev
Definition: AkTypes.h:597
AkReal32 phi
Elevation.
Definition: AkTypes.h:470
AkReal32 Distance() const
Get distance.
Definition: AkTypes.h:497
bool operator==(const WwiseObjectIDext &in_rOther) const
Definition: AkTypes.h:821
bool isDefaultDevice
Identify default device. Always false when not supported.
Definition: AkTypes.h:220
const AkVector & Position() const
Get position vector.
Definition: AkTypes.h:329
AkOSChar * szFile
File path for the source. If not NULL, the source will be streaming from disk. Set pInMemory to NULL....
Definition: AkTypes.h:232
const AkVector & OrientationFront() const
Get orientation front vector.
Definition: AkTypes.h:335
AkReal32 fSpread
Emitter-listener-pair-specific obstruction factor.
Definition: AkTypes.h:538
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:363
@ MultiPositionType_MultiDirections
Simulate one sound coming from multiple directions. Useful for repositionning sounds based on wall op...
Definition: AkTypes.h:731
const AkVector & OrientationTop() const
Get orientation top vector.
Definition: AkTypes.h:341
AkRamp()
Definition: AkTypes.h:593
AkReal32 r
Norm/distance.
Definition: AkTypes.h:463
WwiseObjectID(AkUniqueID in_ID, bool in_bIsBus)
Definition: AkTypes.h:849
AkReal32 fDistance
Emitter position.
Definition: AkTypes.h:530
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:351
AkExternalSourceInfo(AkOSChar *in_pszFileName, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by streaming file name.
Definition: AkTypes.h:261
AkReal32 fObstruction
Emitter-listener-pair-specific occlusion factor.
Definition: AkTypes.h:537
Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
Definition: AkTypes.h:474
@ MultiPositionType_SingleSource
Used for normal sounds, not expected to pass to AK::SoundEngine::SetMultiplePosition() (if done,...
Definition: AkTypes.h:729
AkReal32 fGameDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for direct connections.
Definition: AkTypes.h:534
@ MultiPositionType_MultiSources
Simulate multiple sources in one sound playing, adding volumes. For instance, all the torches on your...
Definition: AkTypes.h:730
WwiseObjectID(AkUniqueID in_ID, AkNodeType in_eNodeType)
Definition: AkTypes.h:855
AkUInt32 iExternalSrcCookie
Cookie identifying the source, given by hashing the name of the source given in the project....
Definition: AkTypes.h:230
AkReal32 fNext
Definition: AkTypes.h:598
AkReal32 EmitterAngle() const
Definition: AkTypes.h:501
AkReal32 Y
Y Position.
Definition: AkTypes.h:316
AkListenerPosition position
Definition: AkTypes.h:552
Configured audio settings.
Definition: AkTypes.h:199
AkVector operator+(const AkVector &b) const
Definition: AkTypes.h:299
AkGameObjectID ListenerID() const
Get listener ID associated with the emitter-listener pair.
Definition: AkTypes.h:527
AkReal32 X
X Position.
Definition: AkTypes.h:315
Spherical coordinates.
Definition: AkTypes.h:468
AkUInt32 uPosition
Definition: AkTypes.h:869
AkReal32 Obstruction() const
Get the obstruction factor for this emitter-listener pair.
Definition: AkTypes.h:511
Positioning information for a sound, with specified subset of its channels.
Definition: AkTypes.h:454
Volume ramp specified by end points "previous" and "next".
Definition: AkTypes.h:591
AkReal32 Z
Z Position.
Definition: AkTypes.h:317
AkReal32 obstruction
ObstructionLevel: [0.0f..1.0f].
Definition: AkTypes.h:450
WwiseObjectID(AkUniqueID in_ID)
Definition: AkTypes.h:843
AkExternalSourceInfo(void *in_pInMemory, AkUInt32 in_uiMemorySize, AkUInt32 in_iExternalSrcCookie, AkCodecID in_idCodec)
Constructor: specify source by memory.
Definition: AkTypes.h:247
void SetOrientation(const AkVector &in_orientationFront, const AkVector &in_orientationTop)
Set orientation. Orientation front and top should be orthogonal and normalized.
Definition: AkTypes.h:407
AkRamp(AkReal32 in_fPrev, AkReal32 in_fNext)
Definition: AkTypes.h:594
Polar coordinates.
Definition: AkTypes.h:461
AkOSChar deviceName[AK_MAX_PATH]
The user-friendly name for the device.
Definition: AkTypes.h:218
AkReal32 GetGainForConnectionType(AkConnectionType in_eType) const
Get the emitter-listener-pair-specific gain (due to distance and cone attenuation),...
Definition: AkTypes.h:514
AkUInt32 uNumSamplesPerFrame
Number of samples per audio frame (256, 512, 1024 or 2048).
Definition: AkTypes.h:201
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:417
bool bSpatialized
Listener scaling factor (see AK::SoundEngine::SetListenerScalingFactor()).
Definition: AkTypes.h:554
bool bIsBus
Definition: AkTypes.h:832
void SetPosition(const AkVector &in_position)
Set position.
Definition: AkTypes.h:387
AkReal32 fDryMixGain
Angle between position vector and listener orientation.
Definition: AkTypes.h:533
AkReal32 fOcclusion
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for user-defined send conn...
Definition: AkTypes.h:536
AkExternalSourceInfo()
Default constructor.
Definition: AkTypes.h:238
AkReal32 fListenerAngle
Angle between position vector and emitter orientation.
Definition: AkTypes.h:532
AkFileID idFile
File ID. If not zero, the source will be streaming from disk. This ID can be anything....
Definition: AkTypes.h:235
AkChannelMask uEmitterChannelMask
Emitter-listener-pair-specific focus.
Definition: AkTypes.h:540
AkReal32 theta
Azimuth.
Definition: AkTypes.h:464
AkTransform emitter
Definition: AkTypes.h:529
AkListener()
Definition: AkTypes.h:548
Public data structures for converted file format.
Definition: AkTypes.h:863
AkUInt16 uAttenuation
Position of this point in samples at the source rate.
Definition: AkTypes.h:870
AkReal32 fUserDefAuxMixGain
Emitter-listener-pair-specific gain (due to distance and cone attenuation) for game-defined send conn...
Definition: AkTypes.h:535
~AkEmitterListenerPair()
Destructor.
Definition: AkTypes.h:494
AkGameObjectID listenerID
Game object ID of the listener associated with this send. Use AK_INVALID_GAME_OBJECT as a wildcard to...
Definition: AkTypes.h:585
WwiseObjectID()
Definition: AkTypes.h:837
AkCreateBankSourceCallback pBankSrcCreateFunc
Definition: AkTypes.h:707
3D vector.
Definition: AkTypes.h:297
AkCreateFileSourceCallback pFileSrcCreateFunc
Definition: AkTypes.h:706
AkChannelMask uInputChannels
Channels to which the above position applies.
Definition: AkTypes.h:457
AkReal32 fScalingFactor
Listener position (see AK::SoundEngine::SetPosition()).
Definition: AkTypes.h:553
AkReal32 ListenerAngle() const
Definition: AkTypes.h:505
AkUInt32 uNumSamplesPerSecond
Number of samples per second.
Definition: AkTypes.h:202
Listener information.
Definition: AkTypes.h:546
AkTransform position
Emitter position.
Definition: AkTypes.h:456
AkReal32 fFocus
Emitter-listener-pair-specific spread.
Definition: AkTypes.h:539
AkReal32 occlusion
OcclusionLevel: [0.0f..1.0f].
Definition: AkTypes.h:449
Position and orientation of game objects.
Definition: AkTypes.h:321
AkCreateGrainCodecCallback pGrainCodecCreateFunc
Definition: AkTypes.h:709
AkAuxBusID auxBusID
Auxiliary bus ID.
Definition: AkTypes.h:586
AkUInt32 uiMemorySize
Size of the data pointed by pInMemory.
Definition: AkTypes.h:234
AkCreateFileCodecCallback pFileCodecCreateFunc
Definition: AkTypes.h:708
AkUInt32 idDevice
Device ID for Wwise. This is the same as what is returned from AK::GetDeviceID and AK::GetDeviceIDFro...
Definition: AkTypes.h:217
Analyzed envelope point.
Definition: AkTypes.h:867