Version
Wwise SDK 2021.1.10
AkSoundEngine.h
Go to the documentation of this file.
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: v2021.1.10 Build: 7883
25  Copyright (c) 2006-2022 Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkSoundEngine.h
29 
30 /// \file
31 /// The main sound engine interface.
32 
33 
34 #ifndef _AK_SOUNDENGINE_H_
35 #define _AK_SOUNDENGINE_H_
36 
41 
42 #ifdef AK_WIN
45 
46 #elif defined (AK_MAC_OS_X)
49 
50 #elif defined (AK_IOS)
53 
54 #elif defined(AK_XBOXGC) // Gaming.Xbox platform
57 
58 #elif defined (AK_XBOXONE)
61 
62 #elif defined( AK_LUMIN )
63 #include <AK/SoundEngine/Platforms/Lumin/AkLuminSoundEngine.h>
64 #include <AK/SoundEngine/Platforms/Lumin/AkPlatformContext.h>
65 
66 #elif defined( AK_ANDROID )
69 
70 #elif defined (AK_PS4)
73 
74 #elif defined (AK_PS5)
77 
78 #elif defined( AK_GGP )
81 
82 #elif defined( AK_LINUX_DESKTOP )
85 
86 #elif defined( AK_EMSCRIPTEN )
87 #include <AK/SoundEngine/Platforms/Emscripten/AkEmscriptenSoundEngine.h>
88 #include <AK/SoundEngine/Platforms/Emscripten/AkPlatformContext.h>
89 
90 #elif defined( AK_QNX )
91 #include <AK/SoundEngine/Platforms/QNX/AkQNXSoundEngine.h>
92 #include <AK/SoundEngine/Platforms/QNX/AkPlatformContext.h>
93 
94 #elif defined( AK_NX )
97 
98 #else
99 #error AkSoundEngine.h: Undefined platform
100 #endif
101 
102 #ifndef AK_ASSERT_HOOK
103  /// Function called on assert handling, optional
104  /// \sa
105  /// - AkInitSettings
107  const char * in_pszExpression, ///< Expression
108  const char * in_pszFileName, ///< File Name
109  int in_lineNumber ///< Line Number
110  );
111  #define AK_ASSERT_HOOK
112 #endif
113 
114 /// Callback function prototype for User Music notifications
115 /// It is useful for reacting to user music playback.
116 ///
117 /// \sa
118 /// - \ref AkGlobalCallbackFunc
119 /// - \ref AkPlatformInitSettings
120 /// - \ref background_music_and_dvr
121 ///
123  bool in_bBackgroundMusicMuted, ///< Flag indicating whether the busses tagged as "background music" in the project are muted or not.
124  void* in_pCookie ///< User-provided data, e.g. a user structure.
125  );
126 
127 /// Platform-independent initialization settings of output devices.
129 {
132  idDevice(0),
134  channelConfig(){};
135 
136  AkOutputSettings(const char* in_szDeviceShareSet, AkUniqueID in_idDevice = AK_INVALID_UNIQUE_ID, AkChannelConfig in_channelConfig = AkChannelConfig(), AkPanningRule in_ePanning = AkPanningRule_Speakers);
137 
138 #ifdef AK_SUPPORT_WCHAR
139  AkOutputSettings(const wchar_t* in_szDeviceShareSet, AkUniqueID in_idDevice = AK_INVALID_UNIQUE_ID, AkChannelConfig in_channelConfig = AkChannelConfig(), AkPanningRule in_ePanning = AkPanningRule_Speakers);
140 #endif
141 
142  AkUniqueID audioDeviceShareset; ///< Unique ID of a custom audio device to be used. Custom audio devices are defined in the Audio Device Shareset section of the Wwise project.
143  ///< If you want to output normally through the output device defined on the Master Bus in your project, leave this field to its default value (AK_INVALID_UNIQUE_ID, or value 0).
144  ///< Typical usage: AkInitSettings.eOutputSettings.audioDeviceShareset = AK::SoundEngine::GetIDFromString("InsertYourAudioDeviceSharesetNameHere");
145  /// \sa <tt>\ref AK::SoundEngine::GetIDFromString()</tt>
146  /// \sa \ref soundengine_plugins_audiodevices
147  /// \sa \ref integrating_secondary_outputs
148  /// \sa \ref default_audio_devices
149 
150  AkUInt32 idDevice; ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
151  ///< - PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
152  ///< - XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
153  ///< - Windows: Use AK::GetDeviceID or AK::GetDeviceIDFromName to get the correct ID. Leave to 0 for the default Windows device as seen in Audio Properties.
154  ///< - All other outputs: use 0 to select the default for the selected audio device type (shareset)
155 
156  AkPanningRule ePanningRule; ///< Rule for 3D panning of signals routed to a stereo bus. In AkPanningRule_Speakers mode, the angle of the front loudspeakers
157  ///< (uSpeakerAngles[0]) is used. In AkPanningRule_Headphones mode, the speaker angles are superseded with constant power panning
158  ///< between two virtual microphones spaced 180 degrees apart.
159 
160  AkChannelConfig channelConfig; ///< Channel configuration for this output. Call AkChannelConfig::Clear() to let the engine use the default output configuration.
161  ///< Hardware might not support the selected configuration.
162 };
163 
164 /// Possible values for the floor plane axis used in the Game Object 3D Viewer in Wwise
166 {
171 };
172 
173 /// The execution context for a task.
175 {
176  AkUInt32 uIdxThread; ///< The current thread index [0, AkTaskSchedulerDesc::uNumSchedulerWorkerThreads[.
177 };
178 
179 /// Task function: process the [in_uIdxBegin,in_uIdxEnd[ range of items in the in_pData array.
180 typedef void(*AkParallelForFunc)(void* in_pData, AkUInt32 in_uIdxBegin, AkUInt32 in_uIdxEnd, AkTaskContext in_ctx, void* in_pUserData);
181 
182 /// Description of the client task scheduler.
184 {
185  /// Execute in_func in parallel over the [in_uIdxBegin,in_uIdxEnd[ range of items in the in_pData array,
186  /// and wait for the work to finish.
187  typedef void(*ParallelForFunc)(
188  void * in_pData, ///< A pointer to a data array.
189  AkUInt32 in_uIdxBegin, ///< The first element of data to process.
190  AkUInt32 in_uIdxEnd, ///< The one past the last element of data to process.
191  AkUInt32 in_uTileSize, ///< The desired maximum tile size in which to subdivide the data.
192  AkParallelForFunc in_func, ///< The data processing function.
193  void * in_pUserData, ///< User data to be passed into 'func'.
194  const char * in_szDebugName); ///< Debug name for the workload.
195 
196  ParallelForFunc fcnParallelFor; ///< ParallelForFunc callback.
197  AkUInt32 uNumSchedulerWorkerThreads; ///< The number of worker threads in the schduler.
198 };
199 
200 /// Platform-independent initialization settings of the sound engine
201 /// \sa
202 /// - <tt>AK::SoundEngine::Init()</tt>
203 /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
204 /// - \ref soundengine_integration_init_advanced
206 {
207  AkAssertHook pfnAssertHook; ///< External assertion handling function (optional)
208 
209  AkUInt32 uMaxNumPaths; ///< Maximum number of paths for positioning
210  AkUInt32 uCommandQueueSize; ///< Size of the command queue, in bytes
211  bool bEnableGameSyncPreparation; ///< Sets to true to enable AK::SoundEngine::PrepareGameSync usage.
212  AkUInt32 uContinuousPlaybackLookAhead; ///< Number of quanta ahead when continuous containers should instantiate a new voice before which next sounds should start playing. This look-ahead time allows I/O to occur, and is especially useful to reduce the latency of continuous containers with trigger rate or sample-accurate transitions.
213  ///< Default is 1 audio quantum, also known as an audio frame. Its size is equal to AkInitSettings::uNumSamplesPerFrame / AkPlatformInitSettings::uSampleRate. For many platforms the default values - which can be overridden - are respectively 1,024 samples and 48 kHz. This gives a default 21.3 ms for an audio quantum, which is adequate if you have a RAM-based streaming device that completes transfers within 20 ms. With 1 look-ahead quantum, voices spawned by continuous containers are more likely to be ready when they are required to play, thereby improving the overall precision of sound scheduling. If your device completes transfers in 30 ms instead, you might consider increasing this value to 2 because it will grant new voices 2 audio quanta (~43 ms) to fetch data.
214 
215  AkUInt32 uNumSamplesPerFrame; ///< Number of samples per audio frame (256, 512, 1024, or 2048).
216 
217  AkUInt32 uMonitorQueuePoolSize; ///< Size of the monitoring queue, in bytes. This parameter is not used in Release build.
218 
219  AkOutputSettings settingsMainOutput; ///< Main output device settings.
220  AkUInt32 uMaxHardwareTimeoutMs; ///< Amount of time to wait for HW devices to trigger an audio interrupt. If there is no interrupt after that time, the sound engine will revert to silent mode and continue operating until the HW finally comes back. Default value: 2000 (2 seconds)
221 
222  bool bUseSoundBankMgrThread; ///< Use a separate thread for loading sound banks. Allows asynchronous operations.
223  bool bUseLEngineThread; ///< Use a separate thread for processing audio. If set to false, audio processing will occur in RenderAudio(). \ref goingfurther_eventmgrthread
224 
225  AkBackgroundMusicChangeCallbackFunc BGMCallback; ///< Application-defined audio source change event callback function.
226  void* BGMCallbackCookie; ///< Application-defined user data for the audio source change event callback function.
227  AkOSChar * szPluginDLLPath; ///< When using DLLs for plugins, specify their path. Leave NULL if DLLs are in the same folder as the game executable.
228 
229  AkFloorPlane eFloorPlane; ///< Floor plane axis for 3D game object viewing.
230  AkReal32 fGameUnitsToMeters; ///< The number of game units in a meter.
231  AkTaskSchedulerDesc taskSchedulerDesc; ///< The defined client task scheduler that AkSoundEngine will use to schedule internal tasks.
232 
233  AkUInt32 uBankReadBufferSize; ///< The number of bytes read by the BankReader when new data needs to be loaded from disk during serialization. Increasing this trades memory usage for larger, but fewer, file-read events during bank loading.
234 
235  AkReal32 fDebugOutOfRangeLimit; ///< Debug setting: Only used when bDebugOutOfRangeCheckEnabled is true. This defines the maximum values samples can have. Normal audio must be contained within +1/-1. This limit should be set higher to allow temporary or short excursions out of range. Default is 16.
236  bool bDebugOutOfRangeCheckEnabled; ///< Debug setting: Enable checks for out-of-range (and NAN) floats in the processing code. This incurs a small performance hit, but can be enabled in most scenarios. Will print error messages in the log if invalid values are found at various point in the pipeline. Contact AK Support with the new error messages for more information.
237 };
238 
239 /// Necessary settings for setting externally-loaded sources
241 {
242  AkUniqueID sourceID; ///< Source ID (available in the SoundBank content files)
243  AkUInt8* pMediaMemory; ///< Pointer to the data to be set for the source
244  AkUInt32 uMediaSize; ///< Size, in bytes, of the data to be set for the source
245 };
246 
247 /// Return values for GetSourcePlayPositions.
249 {
250  AkUniqueID audioNodeID; ///< Audio Node ID of playing item
251  AkUniqueID mediaID; ///< Media ID of playing item. (corresponds to 'ID' attribute of 'File' element in SoundBank metadata file)
252  AkTimeMs msTime; ///< Position of the source (in ms) associated with that playing item
253  AkUInt32 samplePosition; ///< Position of the source (in samples) associated with that playing item
254  AkUInt32 updateBufferTick; ///< Value of GetBufferTick() at the time the position was updated
255 };
256 
257 /// Audiokinetic namespace
258 namespace AK
259 {
260  class IReadBytes;
261  class IWriteBytes;
262 
263  /// Audiokinetic sound engine namespace
264  /// \remarks The functions in this namespace are thread-safe, unless stated otherwise.
265  namespace SoundEngine
266  {
267  ///////////////////////////////////////////////////////////////////////
268  /// @name Initialization
269  //@{
270 
271  /// Query whether or not the sound engine has been successfully initialized.
272  /// \warning This function is not thread-safe. It should not be called at the same time as \c SoundEngine::Init() or \c SoundEngine::Term().
273  /// \return \c True if the sound engine has been initialized, \c False otherwise.
274  /// \sa
275  /// - \ref soundengine_integration_init_advanced
276  /// - <tt>AK::SoundEngine::Init()</tt>
277  /// - <tt>AK::SoundEngine::Term()</tt>
279 
280  /// Initialize the sound engine.
281  /// \warning This function is not thread-safe.
282  /// \remark The initial settings should be initialized using <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
283  /// and <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt> to fill the structures with their
284  /// default settings. This is not mandatory, but it helps avoid backward compatibility problems.
285  ///
286  /// \return
287  /// - AK_Success if the initialization was successful
288  /// - AK_MemManagerNotInitialized if the memory manager is not available or not properly initialized
289  /// - AK_StreamMgrNotInitialized if the stream manager is not available or not properly initialized
290  /// - AK_SSEInstructionsNotSupported if the machine does not support SSE instruction (only on the PC)
291  /// - AK_InsufficientMemory or AK_Fail if there is not enough memory available to initialize the sound engine properly
292  /// - AK_InvalidParameter if some parameters are invalid
293  /// - AK_Fail if the sound engine is already initialized, or if the provided settings result in insufficient
294  /// resources for the initialization.
295  /// \sa
296  /// - \ref soundengine_integration_init_advanced
297  /// - <tt>AK::SoundEngine::Term()</tt>
298  /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
299  /// - <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt>
301  AkInitSettings * in_pSettings, ///< Initialization settings (can be NULL, to use the default values)
302  AkPlatformInitSettings * in_pPlatformSettings ///< Platform-specific settings (can be NULL, to use the default values)
303  );
304 
305  /// Gets the default values of the platform-independent initialization settings.
306  /// \warning This function is not thread-safe.
307  /// \sa
308  /// - \ref soundengine_integration_init_advanced
309  /// - <tt>AK::SoundEngine::Init()</tt>
310  /// - <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt>
312  AkInitSettings & out_settings ///< Returned default platform-independent sound engine settings
313  );
314 
315  /// Gets the default values of the platform-specific initialization settings.
316  ///
317  /// Windows Specific:
318  /// When initializing for Windows platform, the HWND value returned in the
319  /// AkPlatformInitSettings structure is the foreground HWND at the moment of the
320  /// initialization of the sound engine and may not be the correct one for your need.
321  /// Each game must specify the HWND that will be passed to DirectSound initialization.
322  /// It is required that each game provides the correct HWND to be used or it could cause
323  /// one of the following problem:
324  /// - Random Sound engine initialization failure.
325  /// - Audio focus to be located on the wrong window.
326  ///
327  /// \warning This function is not thread-safe.
328  /// \sa
329  /// - \ref soundengine_integration_init_advanced
330  /// - <tt>AK::SoundEngine::Init()</tt>
331  /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
333  AkPlatformInitSettings & out_platformSettings ///< Returned default platform-specific sound engine settings
334  );
335 
336  /// Terminates the sound engine.
337  /// If some sounds are still playing or events are still being processed when this function is
338  /// called, they will be stopped.
339  /// \warning This function is not thread-safe.
340  /// \warning Before calling Term, you must ensure that no other thread is accessing the sound engine.
341  /// \sa
342  /// - \ref soundengine_integration_init_advanced
343  /// - <tt>AK::SoundEngine::Init()</tt>
344  AK_EXTERNAPIFUNC( void, Term )();
345 
346  /// Gets the configured audio settings.
347  /// Call this function to get the configured audio settings.
348  ///
349  /// \warning This function is not thread-safe.
350  /// \warning Call this function only after the sound engine has been properly initialized.
352  AkAudioSettings & out_audioSettings ///< Returned audio settings
353  );
354 
355  /// Gets the output speaker configuration of the specified output.
356  /// Call this function to get the speaker configuration of the output (which may not correspond
357  /// to the physical output format of the platform, in the case of downmixing provided by the platform itself).
358  /// You may initialize the sound engine with a user-specified configuration, but the resulting
359  /// configuration is determined by the sound engine, based on the platform, output type and
360  /// platform settings (for e.g. system menu or control panel option).
361  /// If the speaker configuration of the output is object-based, the speaker configuration of the
362  /// main mix is returned. To query more information on object-based output devices, see AK::SoundEngine::GetOutputDeviceConfiguration.
363  ///
364  /// It is recommended to call GetSpeakerConfiguration anytime after receiving a callback from RegisterAudioDeviceStatusCallback to know if the channel configuration has changed.
365  ///
366  /// \warning Call this function only after the sound engine has been properly initialized.
367  /// If you are initializing the sound engine with AkInitSettings::bUseLEngineThread to false, it is required to call RenderAudio() at least once before calling this function to complete the sound engine initialization.
368  /// The Init.bnk must be loaded prior to this call.
369  /// \return The output configuration. An empty AkChannelConfig not AkChannelConfig::IsValid() if device does not exist or if the Init.bnk was not loaded yet.
370  /// \sa
371  /// - AkSpeakerConfig.h
372  /// - AkOutputSettings
373  /// - <tt>AK::SoundEngine::GetOutputDeviceConfiguration()</tt>
375  AkOutputDeviceID in_idOutput = 0 ///< Output ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
376  );
377 
378  /// Gets the configuration of the specified output device.
379  /// Call this function to get the channel configuration of the output device as well as its 3D audio capabilities.
380  /// If the configuration of the output device is object-based (io_channelConfig.eConfigType == AK_ChannelConfigType_Objects),
381  /// io_capabilities can be inspected to determine the channel configuration of the main mix (Ak3DAudioSinkCapabilities::channelConfig),
382  /// whether or not the output device uses a passthrough mix (Ak3DAudioSinkCapabilities::bPassthrough) and the maximum number of objects
383  /// that can play simultaneously on this output device (Ak3DAudioSinkCapabilities::uMax3DAudioObjects). Note that if
384  /// Ak3DAudioSinkCapabilities::bMultiChannelObjects is false, multi-channel objects will be split into multiple mono objects
385  /// before being sent to the output device.
386  ///
387  /// \warning Call this function only after the sound engine has been properly initialized. If you are initializing the sound engine with AkInitSettings::bUseLEngineThread to false, it is required to call RenderAudio() at least once before calling this function to complete the sound engine initialization.
388  /// \return AK_Success if a device was found for in_idOutput, returns AK_Fail otherwise.
389  /// \sa
390  /// - AkSpeakerConfig.h
391  /// - AkOutputSettings
392  /// - <tt>AK::SoundEngine::GetSpeakerConfiguration()</tt>
394  AkOutputDeviceID in_idOutput,
395  AkChannelConfig& io_channelConfig,
396  Ak3DAudioSinkCapabilities& io_capabilities
397  );
398 
399  /// Gets the panning rule of the specified output.
400  /// \warning Call this function only after the sound engine has been properly initialized.
401  /// \return One of the supported configuration:
402  /// - AkPanningRule_Speakers
403  /// - AkPanningRule_Headphone
404  /// \sa
405  /// - AkSpeakerConfig.h
407  AkPanningRule & out_ePanningRule, ///< Returned panning rule (AkPanningRule_Speakers or AkPanningRule_Headphone) for given output.
408  AkOutputDeviceID in_idOutput = 0 ///< Output ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
409  );
410 
411  /// Sets the panning rule of the specified output.
412  /// This may be changed anytime once the sound engine is initialized.
413  /// \warning This function posts a message through the sound engine's internal message queue, whereas GetPanningRule() queries the current panning rule directly.
414  /// \aknote
415  /// The specified panning rule will only impact the sound if the processing format is downmixing to Stereo in the mixing process. It
416  /// will not impact the output if the audio stays in 5.1 until the end, for example.
417  /// \endaknote
419  AkPanningRule in_ePanningRule, ///< Panning rule.
420  AkOutputDeviceID in_idOutput = 0 ///< Output ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
421  );
422 
423  /// Gets speaker angles of the specified device. Speaker angles are used for 3D positioning of sounds over standard configurations.
424  /// Note that the current version of Wwise only supports positioning on the plane.
425  /// The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180].
426  /// Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles.
427  /// Angles must be set in ascending order.
428  /// You may call this function with io_pfSpeakerAngles set to NULL to get the expected number of angle values in io_uNumAngles,
429  /// in order to allocate your array correctly. You may also obtain this number by calling
430  /// AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ).
431  /// If io_pfSpeakerAngles is not NULL, the array is filled with up to io_uNumAngles.
432  /// Typical usage:
433  /// - AkUInt32 uNumAngles;
434  /// - GetSpeakerAngles( NULL, uNumAngles, AkOutput_Main );
435  /// - AkReal32 * pfSpeakerAngles = AkAlloca( uNumAngles * sizeof(AkReal32) );
436  /// - GetSpeakerAngles( pfSpeakerAngles, uNumAngles, AkOutput_Main );
437  /// \aknote
438  /// On most platforms, the angle set on the plane consists of 3 angles, to account for 7.1.
439  /// - When panning to stereo (speaker mode, see <tt>AK::SoundEngine::SetPanningRule()</tt>), only angle[0] is used, and 3D sounds in the back of the listener are mirrored to the front.
440  /// - When panning to 5.1, the front speakers use angle[0], and the surround speakers use (angle[2] - angle[1]) / 2.
441  /// \endaknote
442  /// \warning Call this function only after the sound engine has been properly initialized.
443  /// \return AK_Success if device exists.
444  /// \sa SetSpeakerAngles()
446  AkReal32 * io_pfSpeakerAngles, ///< Returned array of loudspeaker pair angles, in degrees relative to azimuth [0,180]. Pass NULL to get the required size of the array.
447  AkUInt32 & io_uNumAngles, ///< Returned number of angles in io_pfSpeakerAngles, which is the minimum between the value that you pass in, and the number of angles corresponding to AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ), or just the latter if io_pfSpeakerAngles is NULL.
448  AkReal32 & out_fHeightAngle, ///< Elevation of the height layer, in degrees relative to the plane [-90,90].
449  AkOutputDeviceID in_idOutput = 0 ///< Output ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
450  );
451 
452  /// Sets speaker angles of the specified device. Speaker angles are used for 3D positioning of sounds over standard configurations.
453  /// Note that the current version of Wwise only supports positioning on the plane.
454  /// The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180].
455  /// Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles.
456  /// Angles must be set in ascending order.
457  /// Note:
458  /// - This function requires that the minimum speaker angle is at least 5 degrees; as well as the subsequent speaker pairs are at least 5 degrees apart.
459  /// Typical usage:
460  /// - Initialize the sound engine and/or add secondary output(s).
461  /// - Get number of speaker angles and their value into an array using GetSpeakerAngles().
462  /// - Modify the angles and call SetSpeakerAngles().
463  /// This function posts a message to the audio thread through the command queue, so it is thread safe. However the result may not be immediately read with GetSpeakerAngles().
464  /// \warning This function only applies to configurations (or subset of these configurations) that are standard and whose speakers are on the plane (2D).
465  /// \return
466  /// - AK_Success if successful.
467  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
468  /// - AK_InsufficientMemory if there wasn't enough memory in the message queue
469  /// \sa GetSpeakerAngles()
471  const AkReal32 * in_pfSpeakerAngles, ///< Array of loudspeaker pair angles, in degrees relative to azimuth [0,180].
472  AkUInt32 in_uNumAngles, ///< Number of elements in in_pfSpeakerAngles. It must correspond to AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ) (the value returned by GetSpeakerAngles()).
473  AkReal32 in_fHeightAngle, ///< Elevation of the height layer, in degrees relative to the plane [-90,90].
474  AkOutputDeviceID in_idOutput = 0 ///< Output ID to set the bus on. As returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
475  );
476 
477  /// Allows the game to set the volume threshold to be used by the sound engine to determine if a voice must go virtual.
478  /// This may be changed anytime once the sound engine was initialized.
479  /// If this function is not called, the used value will be the value specified in the platform specific project settings.
480  /// \return
481  /// - AK_Success if successful
482  /// - AK_InvalidParameter if the threshold was not between 0 and -96.3 dB.
483  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
485  AkReal32 in_fVolumeThresholdDB ///< Volume Threshold, must be a value between 0 and -96.3 dB
486  );
487 
488  /// Allows the game to set the maximum number of non virtual voices to be played simultaneously.
489  /// This may be changed anytime once the sound engine was initialized.
490  /// If this function is not called, the used value will be the value specified in the platform specific project settings.
491  /// \return
492  /// - AK_InvalidParameter if the threshold was not between 1 and MaxUInt16.
493  /// - AK_Success if successful
495  AkUInt16 in_maxNumberVoices ///< Maximum number of non-virtual voices.
496  );
497 
498  //@}
499 
500  ////////////////////////////////////////////////////////////////////////
501  /// @name Rendering Audio
502  //@{
503 
504  /// Processes all commands in the sound engine's command queue.
505  /// This method has to be called periodically (usually once per game frame).
506  /// \sa
507  /// - \ref concept_events
508  /// - \ref soundengine_events
509  /// - <tt>AK::SoundEngine::PostEvent()</tt>
510  /// \return Always returns AK_Success
512  bool in_bAllowSyncRender = true ///< When AkInitSettings::bUseLEngineThread is false, RenderAudio may generate an audio buffer -- unless in_bAllowSyncRender is set to false. Use in_bAllowSyncRender=false when calling RenderAudio from a Sound Engine callback.
513  );
514 
515  //@}
516 
517  ////////////////////////////////////////////////////////////////////////
518  /// @name Component Registration
519  //@{
520 
521  /// Query interface to global plug-in context used for plug-in registration/initialization.
522  /// \return Global plug-in context.
524 
525  /// Registers a plug-in with the sound engine and sets the callback functions to create the
526  /// plug-in and its parameter node.
527  /// \aknote
528  /// This function is deprecated. Registration is now automatic if you link plug-ins statically. If plug-ins are dynamic libraries (such as DLLs or SOs), use \c RegisterPluginDLL.
529  /// \endaknote
530  /// \sa
531  /// - \ref register_effects
532  /// - \ref plugin_xml
533  /// \return AK_Success if successful, AK_InvalidParameter if invalid parameters were provided or Ak_Fail otherwise. Possible reasons for an AK_Fail result are:
534  /// - Insufficient memory to register the plug-in
535  /// - Plug-in ID already registered
536  /// \remarks
537  /// Codecs and plug-ins must be registered before loading banks that use them.\n
538  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
539  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
540  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
541  /// posting the event will fail.
543  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
544  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
545  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
546  AkCreatePluginCallback in_pCreateFunc, ///< Pointer to the plug-in's creation function
547  AkCreateParamCallback in_pCreateParamFunc, ///< Pointer to the plug-in's parameter node creation function
548  AkGetDeviceListCallback in_pGetDeviceList = NULL ///< Optional pointer to the plug-in's device enumeration function. Specify for a sink plug-in to support \ref AK::SoundEngine::GetDeviceList.
549  );
550 
551  /// Loads a plug-in dynamic library and registers it with the sound engine.
552  /// With dynamic linking, all plugins are automatically registered.
553  /// The plug-in DLL must be in the OS-specific library path or in the same location as the executable. If not, set AkInitSettings.szPluginDLLPath.
554  /// \return
555  /// - Ak_Success if successful.
556  /// - AK_FileNotFound if the DLL is not found in the OS path or if it has extraneous dependencies not found.
557  /// - AK_InsufficientMemory if the system ran out of resources while loading the dynamic library
558  /// - AK_NotCompatible if the file was found but is not binary-compatible with the system's expected executable format
559  /// - AK_InvalidFile if the symbol g_pAKPluginList is not exported by the dynamic library
560  /// - AK_Fail if an unexpected system error was encountered
562  const AkOSChar* in_DllName, ///< Name of the DLL to load, without "lib" prefix or extension.
563  const AkOSChar* in_DllPath = NULL ///< Optional path to the DLL. Will override szPLuginDLLPath that was set in AkInitSettings.
564  );
565 
566  /// Registers a codec type with the sound engine and set the callback functions to create the
567  /// codec's file source and bank source nodes.
568  /// \aknote
569  /// This function is deprecated. Registration is now automatic if you link plugins statically. If plugins are dynamic libraries (such as DLLs or SOs), use RegisterPluginDLL.
570  /// \endaknote
571  /// \sa
572  /// - \ref register_effects
573  /// \return AK_Success if successful, AK_InvalidParameter if invalid parameters were provided, or Ak_Fail otherwise. Possible reasons for an AK_Fail result are:
574  /// - Insufficient memory to register the codec
575  /// - Codec ID already registered
576  /// \remarks
577  /// Codecs and plug-ins must be registered before loading banks that use them.\n
578  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
579  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
580  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
581  /// posting the Event will fail.
583  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
584  AkUInt32 in_ulCodecID, ///< Codec identifier (as declared in the plug-in description XML file)
585  AkCreateFileSourceCallback in_pFileCreateFunc, ///< Pointer to the codec's file source node creation function
586  AkCreateBankSourceCallback in_pBankCreateFunc ///< Pointer to the codec's bank source node creation function
587  );
588 
589  /// Registers a global callback function. This function will be called from the audio rendering thread, at the
590  /// location specified by in_eLocation. This function will also be called from the thread calling
591  /// AK::SoundEngine::Term with in_eLocation set to AkGlobalCallbackLocation_Term.
592  /// For example, in order to be called at every audio rendering pass, and once during teardown for releasing resources, you would call
593  /// RegisterGlobalCallback(myCallback, AkGlobalCallbackLocation_BeginRender | AkGlobalCallbackLocation_Term, myCookie, AkPluginTypeNone, 0, 0);
594  /// \remarks
595  /// A Plugin Type, Company ID and Plugin ID can be provided to this function to enable timing in the performance monitor.
596  /// If the callback is being timed, it will contribute to the Total Plug-in CPU measurement, and also appear in the Plug-ins tab of the Advanced Profiler by plug-in type and ID.
597  /// It is illegal to call this function while already inside of a global callback.
598  /// This function might stall for several milliseconds before returning.
599  /// \sa
600  /// - <tt>AK::SoundEngine::UnregisterGlobalCallback()</tt>
601  /// - AkGlobalCallbackFunc
602  /// - AkGlobalCallbackLocation
604  AkGlobalCallbackFunc in_pCallback, ///< Function to register as a global callback.
605  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender, ///< Callback location defined in AkGlobalCallbackLocation. Bitwise OR multiple locations if needed.
606  void * in_pCookie = NULL, ///< User cookie.
607  AkPluginType in_eType = AkPluginTypeNone, ///< Plug-in type (for example, source or effect). AkPluginTypeNone for no timing.
608  AkUInt32 in_ulCompanyID = 0, ///< Company identifier (as declared in the plug-in description XML file). 0 for no timing.
609  AkUInt32 in_ulPluginID = 0 ///< Plug-in identifier (as declared in the plug-in description XML file). 0 for no timing.
610  );
611 
612  /// Unregisters a global callback function, previously registered using RegisterGlobalCallback.
613  /// \remarks
614  /// It is legal to call this function while already inside of a global callback, If it is unregistering itself and not
615  /// another callback.
616  /// This function might stall for several milliseconds before returning.
617  /// \sa
618  /// - <tt>AK::SoundEngine::RegisterGlobalCallback()</tt>
619  /// - AkGlobalCallbackFunc
620  /// - AkGlobalCallbackLocation
622  AkGlobalCallbackFunc in_pCallback, ///< Function to unregister as a global callback.
623  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender ///< Must match in_eLocation as passed to RegisterGlobalCallback for this callback.
624  );
625 
626  /// Registers a resource monitor callback function that gets all of the resource usage data contained in the
627  /// AkResourceMonitorDataSummary structure. This includes general information about the system, such as CPU usage,
628  /// active Voices, and Events. This function will be called from the audio rendering thread at the end of each frame.
629  /// \remarks
630  /// If the callback is being timed, it will contribute to the Total Plug-in CPU measurement, and also appear in the Plug-ins tab of the Advanced Profiler by plug-in type and ID.
631  /// It is illegal to call this function while already inside of a resource callback.
632  /// This function might stall for several milliseconds before returning.
633  /// This function will return AK_Fail in Release
634  /// \sa
635  /// - <tt>AK::SoundEngine::UnregisterResourceMonitorCallback()</tt>
636  /// - AkResourceMonitorCallbackFunc
638  AkResourceMonitorCallbackFunc in_pCallback ///< Function to register as a resource monitor callback.
639  );
640 
641  /// Unregisters a resource monitor callback function, previously registered using RegisterResourceMonitorCallback.
642  /// \remarks
643  /// It is legal to call this function while already inside of a resource monitor callback, If it is unregistering itself and not
644  /// another callback.
645  /// This function might stall for several milliseconds before returning.
646  /// \sa
647  /// - <tt>AK::SoundEngine::RegisterResourceMonitorCallback()</tt>
648  /// - AkResourceMonitorCallbackFunc
650  AkResourceMonitorCallbackFunc in_pCallback ///< Function to unregister as a resource monitor callback.
651  );
652 
653  /// Registers a callback for the Audio Device status changes.
654  /// The callback will be called from the audio thread
655  /// Can be called prior to AK::SoundEngine::Init
656  /// \sa AK::SoundEngine::AddOutput
658  AK::AkDeviceStatusCallbackFunc in_pCallback ///< Function to register as a status callback.
659  );
660 
661  /// Unregisters the callback for the Audio Device status changes, registered by RegisterAudioDeviceStatusCallback
663  //@}
664 
665 #ifdef AK_SUPPORT_WCHAR
666  ////////////////////////////////////////////////////////////////////////
667  /// @name Getting ID from strings
668  //@{
669 
670  /// Universal converter from Unicode string to ID for the sound engine.
671  /// This function will hash the name based on a algorithm ( provided at : /AK/Tools/Common/AkFNVHash.h )
672  /// Note:
673  /// This function does return a AkUInt32, which is totally compatible with:
674  /// AkUniqueID, AkStateGroupID, AkStateID, AkSwitchGroupID, AkSwitchStateID, AkRtpcID, and so on...
675  /// \sa
676  /// - <tt>AK::SoundEngine::PostEvent</tt>
677  /// - <tt>AK::SoundEngine::SetRTPCValue</tt>
678  /// - <tt>AK::SoundEngine::SetSwitch</tt>
679  /// - <tt>AK::SoundEngine::SetState</tt>
680  /// - <tt>AK::SoundEngine::PostTrigger</tt>
681  /// - <tt>AK::SoundEngine::SetGameObjectAuxSendValues</tt>
682  /// - <tt>AK::SoundEngine::LoadBank</tt>
683  /// - <tt>AK::SoundEngine::UnloadBank</tt>
684  /// - <tt>AK::SoundEngine::PrepareEvent</tt>
685  /// - <tt>AK::SoundEngine::PrepareGameSyncs</tt>
686  AK_EXTERNAPIFUNC( AkUInt32, GetIDFromString )( const wchar_t* in_pszString );
687 #endif //AK_SUPPORT_WCHAR
688 
689  /// Universal converter from string to ID for the sound engine.
690  /// This function will hash the name based on a algorithm ( provided at : /AK/Tools/Common/AkFNVHash.h )
691  /// Note:
692  /// This function does return a AkUInt32, which is totally compatible with:
693  /// AkUniqueID, AkStateGroupID, AkStateID, AkSwitchGroupID, AkSwitchStateID, AkRtpcID, and so on...
694  /// \sa
695  /// - <tt>AK::SoundEngine::PostEvent</tt>
696  /// - <tt>AK::SoundEngine::SetRTPCValue</tt>
697  /// - <tt>AK::SoundEngine::SetSwitch</tt>
698  /// - <tt>AK::SoundEngine::SetState</tt>
699  /// - <tt>AK::SoundEngine::PostTrigger</tt>
700  /// - <tt>AK::SoundEngine::SetGameObjectAuxSendValues</tt>
701  /// - <tt>AK::SoundEngine::LoadBank</tt>
702  /// - <tt>AK::SoundEngine::UnloadBank</tt>
703  /// - <tt>AK::SoundEngine::PrepareEvent</tt>
704  /// - <tt>AK::SoundEngine::PrepareGameSyncs</tt>
705  AK_EXTERNAPIFUNC( AkUInt32, GetIDFromString )( const char* in_pszString );
706 
707  //@}
708 
709  ////////////////////////////////////////////////////////////////////////
710  /// @name Event Management
711  //@{
712 
713  /// Asynchronously posts an Event to the sound engine (by event ID).
714  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
715  /// An array of wave file sources can be provided to resolve External Sources triggered by the event.
716  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed
717  /// \remarks
718  /// If used, the array of external sources should contain the information for each external source triggered by the
719  /// event. When triggering an event with multiple external sources, you need to differentiate each source
720  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
721  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
722  /// (therefore have a unique cookie) in order to tell them apart when filling the AkExternalSourceInfo structures.
723  /// \endaknote
724  /// \sa
725  /// - \ref concept_events
726  /// - \ref integrating_external_sources
727  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
728  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
729  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
731  AkUniqueID in_eventID, ///< Unique ID of the event
732  AkGameObjectID in_gameObjectID, ///< Associated game object ID
733  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
734  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
735  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
736  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
737  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
738  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID///< Optional (advanced users only) Specify the playing ID to target with the event. Will Cause active actions in this event to target an existing Playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any for normal playback.
739  );
740 
741 #ifdef AK_SUPPORT_WCHAR
742  /// Posts an Event to the sound engine (by Event name), using callbacks.
743  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
744  /// An array of wave file sources can be provided to resolve External Sources triggered by the event.
745  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed
746  /// \remarks
747  /// If used, the array of external sources should contain the information for each external source triggered by the
748  /// event. When triggering an event with multiple external sources, you need to differentiate each source
749  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
750  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
751  /// (therefore have a unique cookie) in order to tell them appart when filling the AkExternalSourceInfo structures.
752  /// \endaknote
753  /// \sa
754  /// - \ref concept_events
755  /// - \ref integrating_external_sources
756  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
757  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
758  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
760  const wchar_t* in_pszEventName, ///< Name of the event
761  AkGameObjectID in_gameObjectID, ///< Associated game object ID
762  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
763  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
764  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information.
765  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
766  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
767  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID///< Optional (advanced users only) Specify the playing ID to target with the event. Will Cause active actions in this event to target an existing Playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any for normal playback.
768  );
769 #endif //AK_SUPPORT_WCHAR
770 
771  /// Posts an Event to the sound engine (by Event name), using callbacks.
772  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
773  /// An array of Wave file sources can be provided to resolve External Sources triggered by the event. P
774  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed
775  /// \remarks
776  /// If used, the array of external sources should contain the information for each external source triggered by the
777  /// event. When triggering an Event with multiple external sources, you need to differentiate each source
778  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
779  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
780  /// (therefore have a unique cookie) in order to tell them apart when filling the AkExternalSourceInfo structures.
781  /// \endaknote
782  /// \sa
783  /// - \ref concept_events
784  /// - \ref integrating_external_sources
785  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
786  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
787  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
789  const char* in_pszEventName, ///< Name of the event
790  AkGameObjectID in_gameObjectID, ///< Associated game object ID
791  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
792  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
793  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information.
794  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
795  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
796  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID///< Optional (advanced users only) Specify the playing ID to target with the event. Will Cause active actions in this event to target an existing Playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any for normal playback.
797  );
798 
799  // If you modify AkActionOnEventType, don't forget to modify the WAAPI validation schema accordingly.
800 
801  /// AkActionOnEventType
802  /// \sa
803  /// - <tt>AK::SoundEngine::ExecuteActionOnEvent()</tt>
805  {
806  AkActionOnEventType_Stop = 0, ///< Stop
807  AkActionOnEventType_Pause = 1, ///< Pause
808  AkActionOnEventType_Resume = 2, ///< Resume
809  AkActionOnEventType_Break = 3, ///< Break
810  AkActionOnEventType_ReleaseEnvelope = 4 ///< Release envelope
811  };
812 
813  /// Executes an action on all nodes that are referenced in the specified event in an action of type play.
814  /// \sa
815  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
817  AkUniqueID in_eventID, ///< Unique ID of the event
818  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
819  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
820  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
821  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
822  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
823  );
824 
825 #ifdef AK_SUPPORT_WCHAR
826  /// Executes an action on all nodes that are referenced in the specified event in an action of type play.
827  /// \sa
828  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
830  const wchar_t* in_pszEventName, ///< Name of the event
831  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
832  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
833  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
834  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
835  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
836  );
837 #endif //AK_SUPPORT_WCHAR
838 
839  /// Executes an Action on all nodes that are referenced in the specified Event in an Action of type Play.
840  /// \sa
841  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
843  const char* in_pszEventName, ///< Name of the event
844  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
845  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
846  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
847  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
848  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
849  );
850 
851 
852  /// Executes a number of MIDI Events on all nodes that are referenced in the specified Event in an Action of type Play.
853  /// The time at which a MIDI Event is posted is determined by in_bAbsoluteOffsets. If false, each MIDI event will be
854  /// posted in AkMIDIPost::uOffset samples from the start of the current frame. If true, each MIDI event will be posted
855  /// at the absolute time AkMIDIPost::uOffset samples.
856  /// To obtain the current absolute time, see AK::SoundEngine::GetSampleTick.
857  /// The duration of a sample can be determined from the sound engine's audio settings, via a call to AK::SoundEngine::GetAudioSettings.
858  /// If a playing ID is specified then that playing ID must be active. Otherwise a new playing ID will be assigned.
859  /// \sa
860  /// - <tt>AK::SoundEngine::GetAudioSettings</tt>
861  /// - <tt>AK::SoundEngine::GetSampleTick</tt>
862  /// - <tt>AK::SoundEngine::StopMIDIOnEvent</tt>
863  /// - \ref soundengine_midi_event_playing_id
865  AkUniqueID in_eventID, ///< Unique ID of the Event
866  AkGameObjectID in_gameObjectID, ///< Associated game object ID
867  AkMIDIPost* in_pPosts, ///< MIDI Events to post
868  AkUInt16 in_uNumPosts, ///< Number of MIDI Events to post
869  bool in_bAbsoluteOffsets = false, ///< Set to true when AkMIDIPost::uOffset are absolute, false when relative to current frame
870  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
871  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
872  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
873  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
874  );
875 
876  /// Stops MIDI notes on all nodes that are referenced in the specified event in an action of type play,
877  /// with the specified Game Object. Invalid parameters are interpreted as wildcards. For example, calling
878  /// this function with in_eventID set to AK_INVALID_UNIQUE_ID will stop all MIDI notes for Game Object
879  /// in_gameObjectID.
880  /// \sa
881  /// - <tt>AK::SoundEngine::PostMIDIOnEvent</tt>
882  /// - \ref soundengine_midi_event_playing_id
884  AkUniqueID in_eventID = AK_INVALID_UNIQUE_ID, ///< Unique ID of the Event
885  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
886  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
887  );
888 
889 
890  /// Starts streaming the first part of all streamed files referenced by an Event into a cache buffer. Caching streams are serviced when no other streams require the
891  /// available bandwidth. The files will remain cached until UnpinEventInStreamCache is called, or a higher priority pinned file needs the space and the limit set by
892  /// uMaxCachePinnedBytes is exceeded.
893  /// \remarks The amount of data from the start of the file that will be pinned to cache is determined by the prefetch size. The prefetch size is set via the authoring tool and stored in the sound banks.
894  /// \remarks It is possible to override the prefetch size stored in the sound bank via the low level IO. For more information see <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> and AkFileSystemFlags.
895  /// \remarks If this function is called additional times with the same event, then the priority of the caching streams are updated. Note however that priority is passed down to the stream manager
896  /// on a file-by-file basis, and if another event is pinned to cache that references the same file but with a different priority, then the first priority will be updated with the most recent value.
897  /// \remarks If the event references files that are chosen based on a State Group (via a switch container), all files in all states will be cached. Those in the current active state
898  /// will get cached with active priority, while all other files will get cached with inactive priority.
899  /// \remarks in_uInactivePriority is only relevant for events that reference switch containers that are assigned to State Groups. This parameter is ignored for all other events, including events that only reference
900  /// switch containers that are assigned to Switch Groups. Files that are chosen based on a Switch Group have a different switch value per game object, and are all effectively considered active by the pin-to-cache system.
901  /// \sa
902  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
903  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
904  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
905  /// - AkFileSystemFlags
907  AkUniqueID in_eventID, ///< Unique ID of the event
908  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
909  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
910  );
911 
912 #ifdef AK_SUPPORT_WCHAR
913  /// Starts streaming the first part of all streamed files referenced by an event into a cache buffer. Caching streams are serviced when no other streams require the
914  /// available bandwidth. The files will remain cached until UnpinEventInStreamCache is called, or a higher priority pinned file needs the space and the limit set by
915  /// uMaxCachePinnedBytes is exceeded.
916  /// \remarks The amount of data from the start of the file that will be pinned to cache is determined by the prefetch size. The prefetch size is set via the authoring tool and stored in the sound banks.
917  /// \remarks It is possible to override the prefetch size stored in the sound bank via the low level IO. For more information see <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> and AkFileSystemFlags.
918  /// \remarks If this function is called additional times with the same event, then the priority of the caching streams are updated. Note however that priority is passed down to the stream manager
919  /// on a file-by-file basis, and if another event is pinned to cache that references the same file but with a different priority, then the first priority will be updated with the most recent value.
920  /// \remarks If the event references files that are chosen based on a State Group (via a Switch Container), all files in all states will be cached. Those in the current active state
921  /// will get cached with active priority, while all other files will get cached with inactive priority.
922  /// \remarks in_uInactivePriority is only relevant for events that reference switch containers that are assigned to State Groups. This parameter is ignored for all other events, including events that only reference
923  /// switch containers that are assigned to Switch Groups. Files that are chosen based on a Switch Group have a different switch value per game object, and are all effectively considered active by the pin-to-cache system.
924  /// \sa
925  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
926  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
927  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
928  /// - AkFileSystemFlags
930  const wchar_t* in_pszEventName, ///< Name of the event
931  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
932  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
933  );
934 #endif //AK_SUPPORT_WCHAR
935 
936  /// Starts streaming the first part of all streamed files referenced by an event into a cache buffer. Caching streams are serviced when no other streams require the
937  /// available bandwidth. The files will remain cached until UnpinEventInStreamCache is called, or a higher priority pinned file needs the space and the limit set by
938  /// uMaxCachePinnedBytes is exceeded.
939  /// \remarks The amount of data from the start of the file that will be pinned to cache is determined by the prefetch size. The prefetch size is set via the authoring tool and stored in the sound banks.
940  /// \remarks It is possible to override the prefetch size stored in the sound bank via the low level IO. For more information see <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> and AkFileSystemFlags.
941  /// \remarks If this function is called additional times with the same event, then the priority of the caching streams are updated. Note however that priority is passed down to the stream manager
942  /// on a file-by-file basis, and if another event is pinned to cache that references the same file but with a different priority, then the first priority will be updated with the most recent value.
943  /// \remarks If the event references files that are chosen based on a State Group (via a switch container), all files in all states will be cached. Those in the current active state
944  /// will get cached with active priority, while all other files will get cached with inactive priority.
945  /// \remarks in_uInactivePriority is only relevant for events that reference switch containers that are assigned to State Groups. This parameter is ignored for all other events, including events that only reference
946  /// switch containers that are assigned to Switch Groups. Files that are chosen based on a Switch Group have a different switch value per game object, and are all effectively considered active by the pin-to-cache system.
947  /// \sa
948  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
949  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
950  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
951  /// - AkFileSystemFlags
953  const char* in_pszEventName, ///< Name of the event
954  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
955  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
956  );
957 
958  /// Releases the set of files that were previously requested to be pinned into cache via <tt>AK::SoundEngine::PinEventInStreamCache()</tt>. The file may still remain in stream cache
959  /// after <tt>AK::SoundEngine::UnpinEventInStreamCache()</tt> is called, until the memory is reused by the streaming memory manager in accordance with to its cache management algorithm.
960  /// \sa
961  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
962  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
964  AkUniqueID in_eventID ///< Unique ID of the event
965  );
966 
967 #ifdef AK_SUPPORT_WCHAR
968  /// Releases the set of files that were previously requested to be pinned into cache via <tt>AK::SoundEngine::PinEventInStreamCache()</tt>. The file may still remain in stream cache
969  /// after <tt>AK::SoundEngine::UnpinEventInStreamCache()</tt> is called, until the memory is reused by the streaming memory manager in accordance with to its cache management algorithm.
970  /// \sa
971  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
972  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
974  const wchar_t* in_pszEventName ///< Name of the event
975  );
976 #endif //AK_SUPPORT_WCHAR
977 
978  /// Releases the set of files that were previously requested to be pinned into cache via <tt>AK::SoundEngine::PinEventInStreamCache()</tt>. The file may still remain in stream cache
979  /// after <tt>AK::SoundEngine::UnpinEventInStreamCache()</tt> is called, until the memory is reused by the streaming memory manager in accordance with to its cache management algorithm.
980  /// \sa
981  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
982  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
984  const char* in_pszEventName ///< Name of the event
985  );
986 
987  /// Returns information about an Event that was requested to be pinned into cache via <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
988  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
989  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
990  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see \c AkDeviceSettings
991  /// \sa
992  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
993  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
994  /// - AkDeviceSettings
996  AkUniqueID in_eventID, ///< Unique ID of the event
997  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
998  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
999  );
1000 
1001  /// Returns information about an Event that was requested to be pinned into cache via \c <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
1002  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
1003  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
1004  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see AkDeviceSettings
1005  /// \sa
1006  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1007  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1008  /// - AkDeviceSettings
1010  const char* in_pszEventName, ///< Name of the event
1011  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
1012  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
1013  );
1014 
1015 #ifdef AK_SUPPORT_WCHAR
1016  /// Returns information about an Event that was requested to be pinned into cache via \c <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
1017  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
1018  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
1019  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see AkDeviceSettings
1020  /// \sa
1021  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1022  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1023  /// - AkDeviceSettings
1025  const wchar_t* in_pszEventName, ///< Name of the event
1026  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
1027  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
1028  );
1029 #endif
1030 
1031  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1032  ///
1033  /// Notes:
1034  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1035  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1036  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1037  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1038  /// the sound that is currently playing is the first sound of the sequence.
1039  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1040  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1041  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1042  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1043  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1044  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1045  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1046  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1047  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1048  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1049  /// the audio thread consumes it (after a call to RenderAudio()).
1050  ///
1051  /// Notes specific to Music Segments:
1052  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1053  /// value to seek within the Pre-Entry.
1054  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1055  /// in order to restart them if required.
1056  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1057  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1058  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1059  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1060  /// the exact position of a segment. Also, the segment will be silent during that time
1061  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1062  /// also informs you about the remaining look-ahead time.
1063  ///
1064  /// Notes specific to Music Switch Containers:
1065  /// - Seeking triggers a music transition towards the current (or target) segment.
1066  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1067  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1068  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1069  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1070  ///
1071  /// \sa
1072  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1073  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1074  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1075  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1077  AkUniqueID in_eventID, ///< Unique ID of the event
1078  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1079  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1080  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1081  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1082  );
1083 
1084 #ifdef AK_SUPPORT_WCHAR
1085  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1086  ///
1087  /// Notes:
1088  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1089  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1090  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1091  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1092  /// the sound that is currently playing is the first sound of the sequence.
1093  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1094  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1095  /// value to seek within the Pre-Entry.
1096  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1097  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1098  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1099  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1100  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1101  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1102  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1103  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1104  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1105  /// the audio thread consumes it (after a call to RenderAudio()).
1106  ///
1107  /// Notes specific to Music Segments:
1108  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1109  /// value to seek within the Pre-Entry.
1110  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1111  /// in order to restart them if required.
1112  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1113  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1114  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1115  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1116  /// the exact position of a segment. Also, the segment will be silent during that time
1117  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1118  /// also informs you about the remaining look-ahead time.
1119  ///
1120  /// Notes specific to Music Switch Containers:
1121  /// - Seeking triggers a music transition towards the current (or target) segment.
1122  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1123  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1124  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1125  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1126  ///
1127  /// \sa
1128  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1129  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1130  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1131  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1133  const wchar_t* in_pszEventName, ///< Name of the event
1134  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1135  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1136  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1137  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1138  );
1139 #endif //AK_SUPPORT_WCHAR
1140 
1141  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1142  ///
1143  /// Notes:
1144  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1145  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1146  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1147  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1148  /// the sound that is currently playing is the first sound of the sequence.
1149  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1150  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1151  /// value to seek within the Pre-Entry.
1152  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1153  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1154  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1155  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1156  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1157  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1158  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1159  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1160  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1161  /// the audio thread consumes it (after a call to RenderAudio()).
1162  ///
1163  /// Notes specific to Music Segments:
1164  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1165  /// value to seek within the Pre-Entry.
1166  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1167  /// in order to restart them if required.
1168  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1169  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1170  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1171  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1172  /// the exact position of a segment. Also, the segment will be silent during that time
1173  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1174  /// also informs you about the remaining look-ahead time.
1175  ///
1176  /// Notes specific to Music Switch Containers:
1177  /// - Seeking triggers a music transition towards the current (or target) segment.
1178  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1179  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1180  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1181  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1182  ///
1183  /// \sa
1184  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1185  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1186  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1187  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1189  const char* in_pszEventName, ///< Name of the event
1190  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1191  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1192  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1193  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1194  );
1195 
1196  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1197  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1198  ///
1199  /// Notes:
1200  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1201  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1202  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1203  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1204  /// the sound that is currently playing is the first sound of the sequence.
1205  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1206  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1207  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1208  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1209  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1210  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1211  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1212  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1213  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1214  /// the audio thread consumes it (after a call to RenderAudio()).
1215  ///
1216  /// Notes specific to Music Segments:
1217  /// - With Music Segments, \c in_fPercent is relative to the Entry Cue, and the segment's duration is the
1218  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1219  /// post-exit of a segment using this method. Use absolute values instead.
1220  /// - Music Segments cannot be looped. You may want to listen to the \c AK_EndOfEvent notification
1221  /// in order to restart them if required.
1222  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1223  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1224  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1225  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1226  /// the exact position of a segment. Also, the segment will be silent during the time that period
1227  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1228  /// also informs you about the remaining look-ahead time.
1229  ///
1230  /// Notes specific to Music Switch Containers:
1231  /// - Seeking triggers a music transition towards the current (or target) segment.
1232  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1233  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1234  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1235  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1236  ///
1237  /// \sa
1238  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1239  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1240  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1241  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1243  AkUniqueID in_eventID, ///< Unique ID of the event
1244  AkGameObjectID in_gameObjectID , ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1245  AkReal32 in_fPercent, ///< Desired position where playback should restart, expressed in a percentage of the file's total duration, between 0 and 1.f (see note above about infinite looping sounds)
1246  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1247  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1248  );
1249 
1250 #ifdef AK_SUPPORT_WCHAR
1251  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1252  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1253  ///
1254  /// Notes:
1255  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1256  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1257  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1258  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1259  /// the sound that is currently playing is the first sound of the sequence.
1260  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1261  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1262  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1263  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1264  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1265  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1266  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1267  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1268  /// the audio thread consumes it (after a call to RenderAudio()).
1269  ///
1270  /// Notes specific to Music Segments:
1271  /// - With Music Segments, \c in_fPercent is relative to the Entry Cue, and the segment's duration is the
1272  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1273  /// post-exit of a segment using this method. Use absolute values instead.
1274  /// - Music Segments cannot be looped. You may want to listen to the \c AK_EndOfEvent notification
1275  /// in order to restart them if required.
1276  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1277  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1278  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1279  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1280  /// the exact position of a segment. Also, the segment will be silent during the time that period
1281  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1282  /// also informs you about the remaining look-ahead time.
1283  ///
1284  /// Notes specific to Music Switch Containers:
1285  /// - Seeking triggers a music transition towards the current (or target) segment.
1286  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1287  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1288  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1289  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1290  ///
1291  /// \sa
1292  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1293  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1294  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1295  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1297  const wchar_t* in_pszEventName, ///< Name of the event
1298  AkGameObjectID in_gameObjectID , ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1299  AkReal32 in_fPercent , ///< Desired position where playback should restart, expressed in a percentage of the file's total duration, between 0 and 1.f (see note above about infinite looping sounds)
1300  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1301  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1302  );
1303 #endif //AK_SUPPORT_WCHAR
1304 
1305  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1306  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1307  ///
1308  /// Notes:
1309  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1310  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1311  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1312  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1313  /// the sound that is currently playing is the first sound of the sequence.
1314  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1315  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1316  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1317  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1318  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1319  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1320  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1321  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1322  /// the audio thread consumes it (after a call to RenderAudio()).
1323  ///
1324  /// Notes specific to Music Segments:
1325  /// - With Music Segments, in_fPercent is relative to the Entry Cue, and the segment's duration is the
1326  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1327  /// post-exit of a segment using this method. Use absolute values instead.
1328  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1329  /// in order to restart them if required.
1330  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1331  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1332  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1333  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1334  /// the exact position of a segment. Also, the segment will be silent during the time that period
1335  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1336  /// also informs you about the remaining look-ahead time.
1337  ///
1338  /// Notes specific to Music Switch Containers:
1339  /// - Seeking triggers a music transition towards the current (or target) segment.
1340  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1341  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1342  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1343  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1344  ///
1345  /// \sa
1346  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1347  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1348  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1349  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1351  const char* in_pszEventName, ///< Name of the event
1352  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1353  AkReal32 in_fPercent, ///< Desired position where playback should restart, expressed in a percentage of the file's total duration, between 0 and 1.f (see note above about infinite looping sounds)
1354  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see notes above).
1355  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Specify the playing ID for the seek to be applied to. Will result in the seek happening only on active actions of the playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any, to seek on all active actions of this event ID.
1356  );
1357 
1358  /// Cancels all Event callbacks associated with a specific callback cookie.\n
1359  /// \sa
1360  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1362  void * in_pCookie ///< Callback cookie to be cancelled
1363  );
1364 
1365  /// Cancels all Event callbacks associated with a specific game object.\n
1366  /// \sa
1367  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1369  AkGameObjectID in_gameObjectID ///< ID of the game object to be cancelled
1370  );
1371 
1372  /// Cancels all Event callbacks for a specific playing ID.
1373  /// \sa
1374  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1376  AkPlayingID in_playingID ///< Playing ID of the event that must not use callbacks
1377  );
1378 
1379  /// Gets the current position of the source associated with this playing ID, obtained from PostEvent(). If more than one source is playing,
1380  /// the first to play is returned.
1381  /// Notes:
1382  /// - You need to pass AK_EnableGetSourcePlayPosition to PostEvent() in order to use this function, otherwise
1383  /// it returns AK_Fail, even if the playing ID is valid.
1384  /// - The source's position is updated at every audio frame, and the time at which this occurs is stored.
1385  /// When you call this function from your thread, you therefore query the position that was updated in the previous audio frame.
1386  /// If in_bExtrapolate is true (default), the returned position is extrapolated using the elapsed time since last
1387  /// sound engine update and the source's playback rate.
1388  /// \return AK_Success if successful.
1389  /// It returns AK_InvalidParameter if the provided pointer is not valid.
1390  /// It returns AK_Fail if the playing ID is invalid (not playing yet, or finished playing).
1391  /// \sa
1392  /// - \ref soundengine_query_pos
1393  /// - \ref concept_events
1395  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1396  AkTimeMs* out_puPosition, ///< Position of the source (in ms) associated with the specified playing ID
1397  bool in_bExtrapolate = true ///< Position is extrapolated based on time elapsed since last sound engine update.
1398  );
1399 
1400  /// Gets the current position of the sources associated with this playing ID, obtained from PostEvent().
1401  /// Notes:
1402  /// - You need to pass AK_EnableGetSourcePlayPosition to PostEvent() in order to use this function, otherwise
1403  /// it returns AK_Fail, even if the playing ID is valid.
1404  /// - The source's position is updated at every audio frame, and the time at which this occurs is stored.
1405  /// When you call this function from your thread, you therefore query the position that was updated in the previous audio frame.
1406  /// If in_bExtrapolate is true (default), the returned position is extrapolated using the elapsed time since last
1407  /// sound engine update and the source's playback rate.
1408  /// - If 0 is passed in for the number of entries (*in_pcPositions == 0) then only the number of positions will be returned and the
1409  /// position array (out_puPositions) will not be updated.
1410  /// - The io_pcPositions pointer must be non-NULL.
1411  /// out_puPositions may be NULL if *io_pcPositions == 0, otherwise it must be non-NULL.
1412  /// \return AK_Success if successful.
1413  /// It returns AK_InvalidParameter if the provided pointers are not valid.
1414  /// It returns AK_Fail if the playing ID is invalid (not playing yet, or finished playing).
1415  /// \sa
1416  /// - \ref soundengine_query_pos
1417  /// - \ref concept_events
1419  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1420  AkSourcePosition* out_puPositions, ///< Audio Node IDs and positions of sources associated with the specified playing ID
1421  AkUInt32 * io_pcPositions, ///< Number of entries in out_puPositions. Needs to be set to the size of the array: it is adjusted to the actual number of returned entries
1422  bool in_bExtrapolate = true ///< Position is extrapolated based on time elapsed since last sound engine update
1423  );
1424 
1425  /// Gets the stream buffering of the sources associated with this playing ID, obtained from PostEvent().
1426  /// Notes:
1427  /// - You need to pass AK_EnableGetSourceStreamBuffering to PostEvent() in order to use this function, otherwise
1428  /// it returns AK_Fail, even if the playing ID is valid.
1429  /// - The sources stream buffering is updated at every audio frame. If there are multiple sources associated with this playing ID,
1430  /// the value returned corresponds to the least buffered source.
1431  /// - The returned buffering status out_bIsBuffering will be true If any of the sources associated with the playing ID are actively being buffered.
1432  /// It will be false if all of them have reached the end of file, or have reached a state where they are buffered enough and streaming is temporarily idle.
1433  /// - Purely in-memory sources are excluded from this database. If all sources are in-memory, GetSourceStreamBuffering() will return AK_Fail.
1434  /// - The returned buffering amount and state is not completely accurate with some hardware-accelerated codecs. In such cases, the amount of stream buffering is generally underestimated.
1435  /// On the other hand, it is not guaranteed that the source will be ready to produce data at the next audio frame even if out_bIsBuffering has turned to false.
1436  /// \return
1437  /// - AK_Success if successful.
1438  /// - AK_Fail if the source data associated with this playing ID is not found, for example if PostEvent() was not called with AK_EnableGetSourceStreamBuffering, or if the header was not parsed.
1439  /// \sa
1440  /// - \ref concept_events
1442  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1443  AkTimeMs & out_buffering, ///< Returned amount of buffering (in ms) of the source (or one of the sources) associated with that playing ID
1444  bool & out_bIsBuffering ///< Returned buffering status of the source(s) associated with that playing ID
1445  );
1446 
1447  /// Stops the current content playing associated to the specified game object ID.
1448  /// If no game object is specified, all sounds will be stopped.
1450  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT ///< (Optional)Specify a game object to stop only playback associated to the provided game object ID.
1451  );
1452 
1453  /// Stop the current content playing associated to the specified playing ID.
1454  /// \aknote
1455  /// This function is deprecated. Please use ExecuteActionOnPlayingID() in its place.
1456  /// \endaknote
1457  /// \sa
1458  /// - <tt>AK::SoundEngine::ExecuteActionOnPlayingID()</tt>
1460  AkPlayingID in_playingID, ///< Playing ID to be stopped.
1461  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
1462  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear ///< Curve type to be used for the transition
1463  );
1464 
1465  /// Executes an Action on the content associated to the specified playing ID.
1466  /// \sa
1467  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
1469  AkActionOnEventType in_ActionType, ///< Action to execute on the specified playing ID.
1470  AkPlayingID in_playingID, ///< Playing ID on which to execute the action.
1471  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
1472  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear ///< Curve type to be used for the transition
1473  );
1474 
1475  /// Sets the random seed value. Can be used to synchronize randomness
1476  /// across instances of the Sound Engine.
1477  /// \remark This seeds the number generator used for all container randomizations;
1478  /// since it acts globally, this should be called right before any PostEvent
1479  /// call where randomness synchronization is required, and cannot guarantee
1480  /// similar results for continuous containers.
1482  AkUInt32 in_uSeed ///< Random seed.
1483  );
1484 
1485  /// Mutes/Unmutes the busses tagged as background music.
1486  /// This is automatically called for platforms that have user-music support.
1487  /// This function is provided to give the same behavior on platforms that don't have user-music support.
1489  bool in_bMute ///< Sets true to mute, false to unmute.
1490  );
1491  //@}
1492 
1493  /// Gets the state of the Background Music busses. This state is either set directly
1494  /// with \c AK::SoundEngine::MuteBackgroundMusic or by the OS, if it has User Music services.
1495  /// \return true if the background music busses are muted, false if not.
1497  //@}
1498 
1499 
1500  /// Sends custom game data to a plug-in that resides on a bus (insert Effect or mixer plug-in).
1501  /// Data will be copied and stored into a separate list.
1502  /// Previous entry is deleted when a new one is sent.
1503  /// Sets the data pointer to NULL to clear item from the list.
1504  /// \aknote The plug-in type and ID is passed and matched with plugins set on the desired bus.
1505  /// This means that you cannot send different data to various instances of the plug-in on a same bus.\endaknote
1506  /// \return AK_Success if data was sent successfully.
1508  AkUniqueID in_busID, ///< Bus ID
1509  AkGameObjectID in_busObjectID, ///< Bus Object ID. Pass AK_INVALID_GAME_OBJECT to send custom data with global scope. Game object scope supersedes global scope, as with RTPCs.
1510  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
1511  AkUInt32 in_uCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
1512  AkUInt32 in_uPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
1513  const void* in_pData, ///< The data blob
1514  AkUInt32 in_uSizeInBytes ///< Size of data
1515  );
1516  //@}
1517 
1518  ////////////////////////////////////////////////////////////////////////
1519  /// @name Game Objects
1520  //@{
1521 
1522  /// Registers a game object.
1523  /// \return
1524  /// - AK_Success if successful
1525  /// - AK_Fail if the specified AkGameObjectID is invalid (0 and -1 are invalid)
1526  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1527  /// matter how many times it has been registered.
1528  /// \sa
1529  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1530  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1531  /// - \ref concept_gameobjects
1533  AkGameObjectID in_gameObjectID ///< ID of the game object to be registered
1534  );
1535 
1536  /// Registers a game object.
1537  /// \return
1538  /// - AK_Success if successful
1539  /// - AK_Fail if the specified AkGameObjectID is invalid (0 and -1 are invalid)
1540  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1541  /// matter how many times it has been registered.
1542  /// \sa
1543  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1544  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1545  /// - \ref concept_gameobjects
1547  AkGameObjectID in_gameObjectID, ///< ID of the game object to be registered
1548  const char * in_pszObjName ///< Name of the game object (for monitoring purpose)
1549  );
1550 
1551  /// Unregisters a game object.
1552  /// \return
1553  /// - AK_Success if successful
1554  /// - AK_Fail if the specified AkGameObjectID is invalid (0 is an invalid ID)
1555  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1556  /// matter how many times it has been registered. Unregistering a game object while it is
1557  /// in use is allowed, but the control over the parameters of this game object is lost.
1558  /// For example, say a sound associated with this game object is a 3D moving sound. This sound will
1559  /// stop moving when the game object is unregistered, and there will be no way to regain control over the game object.
1560  /// \sa
1561  /// - <tt>AK::SoundEngine::RegisterGameObj()</tt>
1562  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1563  /// - \ref concept_gameobjects
1565  AkGameObjectID in_gameObjectID ///< ID of the game object to be unregistered. Use
1566  /// AK_INVALID_GAME_OBJECT to unregister all game objects.
1567  );
1568 
1569  /// Unregister all game objects, or all game objects with a particular matching set of property flags.
1570  /// This function to can be used to unregister all game objects.
1571  /// \return
1572  /// - AK_Success if successful
1573  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1574  /// matter how many times it has been registered. Unregistering a game object while it is
1575  /// in use is allowed, but the control over the parameters of this game object is lost.
1576  /// For example, if a sound associated with this game object is a 3D moving sound, it will
1577  /// stop moving once the game object is unregistered, and there will be no way to recover
1578  /// the control over this game object.
1579  /// \sa
1580  /// - <tt>AK::SoundEngine::RegisterGameObj()</tt>
1581  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1582  /// - \ref concept_gameobjects
1584  );
1585 
1586  /// Sets the position of a game object.
1587  /// \warning The object's orientation vector (in_Position.Orientation) must be normalized.
1588  /// \return
1589  /// - AK_Success when successful
1590  /// - AK_InvalidParameter if parameters are not valid.
1591  /// \sa
1592  /// - \ref soundengine_3dpositions
1594  AkGameObjectID in_GameObjectID, ///< Game Object identifier
1595  const AkSoundPosition & in_Position ///< Position to set; in_Position.Orientation must be normalized.
1596  );
1597 
1598  /// Sets multiple positions to a single game object.
1599  /// Setting multiple positions on a single game object is a way to simulate multiple emission sources while using the resources of only one voice.
1600  /// This can be used to simulate wall openings, area sounds, or multiple objects emitting the same sound in the same area.
1601  /// \aknote Calling <tt>AK::SoundEngine::SetMultiplePositions()</tt> with only one position is the same as calling <tt>AK::SoundEngine::SetPosition()</tt> \endaknote
1602  /// \return
1603  /// - AK_Success when successful
1604  /// - AK_InvalidParameter if parameters are not valid.
1605  /// \sa
1606  /// - \ref soundengine_3dpositions
1607  /// - \ref soundengine_3dpositions_multiplepos
1608  /// - \ref AK::SoundEngine::MultiPositionType
1610  AkGameObjectID in_GameObjectID, ///< Game Object identifier.
1611  const AkSoundPosition * in_pPositions, ///< Array of positions to apply.
1612  AkUInt16 in_NumPositions, ///< Number of positions specified in the provided array.
1613  MultiPositionType in_eMultiPositionType = MultiPositionType_MultiDirections ///< \ref AK::SoundEngine::MultiPositionType
1614  );
1615 
1616  /// Sets multiple positions to a single game object, with flexible assignment of input channels.
1617  /// Setting multiple positions on a single game object is a way to simulate multiple emission sources while using the resources of only one voice.
1618  /// This can be used to simulate wall openings, area sounds, or multiple objects emitting the same sound in the same area.
1619  /// \aknote Calling <tt>AK::SoundEngine::SetMultiplePositions()</tt> with only one position is the same as calling <tt>AK::SoundEngine::SetPosition()</tt> \endaknote
1620  /// \return
1621  /// - AK_Success when successful
1622  /// - AK_InvalidParameter if parameters are not valid.
1623  /// \sa
1624  /// - \ref soundengine_3dpositions
1625  /// - \ref soundengine_3dpositions_multiplepos
1626  /// - \ref AK::SoundEngine::MultiPositionType
1628  AkGameObjectID in_GameObjectID, ///< Game Object identifier.
1629  const AkChannelEmitter * in_pPositions, ///< Array of positions to apply, each using its own channel mask.
1630  AkUInt16 in_NumPositions, ///< Number of positions specified in the provided array.
1631  MultiPositionType in_eMultiPositionType = MultiPositionType_MultiDirections ///< \ref AK::SoundEngine::MultiPositionType
1632  );
1633 
1634  /// Sets the scaling factor of a Game Object.
1635  /// Modify the attenuation computations on this Game Object to simulate sounds with a larger or smaller area of effect.
1636  /// \return
1637  /// - AK_Success when successful
1638  /// - AK_InvalidParameter if the scaling factor specified was 0 or negative.
1639  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
1641  AkGameObjectID in_GameObjectID, ///< Game object identifier
1642  AkReal32 in_fAttenuationScalingFactor ///< Scaling Factor, 1 means 100%, 0.5 means 50%, 2 means 200%, and so on.
1643  );
1644 
1645  //@}
1646 
1647  ////////////////////////////////////////////////////////////////////////
1648  /// @name Bank Management
1649  //@{
1650 
1651  /// Unload all currently loaded banks.
1652  /// It also internally calls ClearPreparedEvents() since at least one bank must have been loaded to allow preparing events.
1653  /// \return
1654  /// - AK_Success if successful
1655  /// - AK_Fail if the sound engine was not correctly initialized or if there is not enough memory to handle the command
1656  /// \sa
1657  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1658  /// - <tt>AK::SoundEngine::LoadBank()</tt>
1659  /// - \ref soundengine_banks
1661 
1662  /// Sets the I/O settings of the bank load and prepare event processes.
1663  /// The sound engine uses default values unless explicitly set by calling this method.
1664  /// \warning This function must be called before loading banks.
1665  /// \return
1666  /// - AK_Success if successful
1667  /// - AK_Fail if the sound engine was not correctly initialized
1668  /// - AK_InvalidParameter if some parameters are invalid
1669  /// \sa
1670  /// - \ref soundengine_banks
1671  /// - \ref streamingdevicemanager
1673  AkReal32 in_fThroughput, ///< Average throughput of bank data streaming (bytes/ms) (the default value is AK_DEFAULT_BANK_THROUGHPUT)
1674  AkPriority in_priority ///< Priority of bank streaming (the default value is AK_DEFAULT_PRIORITY)
1675  );
1676 
1677 #ifdef AK_SUPPORT_WCHAR
1678  /// Load a bank synchronously (by Unicode string).\n
1679  /// The bank name is passed to the Stream Manager.
1680  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1681  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1682  /// The function returns when the request has been completely processed.
1683  /// \return
1684  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1685  /// You may use this ID with UnloadBank().
1686  /// - AK_Success: Load or unload successful.
1687  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
1688  /// - AK_BankReadError: I/O error.
1689  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1690  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1691  /// - AK_InvalidFile: File specified could not be opened.
1692  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1693  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1694  /// \remarks
1695  /// - The initialization bank must be loaded first.
1696  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1697  /// initialization bank. If you need to load SoundBanks from a different project, you
1698  /// must first unload ALL banks, including the initialization bank, then load the
1699  /// initialization bank from the other project, and finally load banks from that project.
1700  /// - Codecs and plug-ins must be registered before loading banks that use them.
1701  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1702  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1703  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1704  /// posting the event will fail.
1705  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1706  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1707  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1708  /// your implementation of the Stream Manager, or in the Low-Level I/O module if you use the default Stream Manager's implementation.
1709  /// \sa
1710  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1711  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1712  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
1713  /// - \ref soundengine_banks
1714  /// - \ref integrating_elements_plugins
1715  /// - \ref streamingdevicemanager
1716  /// - \ref streamingmanager_lowlevel
1717  /// - \ref sdk_bank_training
1719  const wchar_t* in_pszString, ///< Name of the bank to load
1720  AkBankID & out_bankID ///< Returned bank ID
1721  );
1722 #endif //AK_SUPPORT_WCHAR
1723 
1724  /// Loads a bank synchronously.\n
1725  /// The bank name is passed to the Stream Manager.
1726  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1727  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1728  /// The function returns when the request has been completely processed.
1729  /// \return
1730  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1731  /// You may use this ID with UnloadBank().
1732  /// - AK_Success: Load or unload successful.
1733  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
1734  /// - AK_BankReadError: I/O error.
1735  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1736  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1737  /// - AK_InvalidFile: File specified could not be opened.
1738  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1739  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1740  /// \remarks
1741  /// - The initialization bank must be loaded first.
1742  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1743  /// initialization bank. If you need to load SoundBanks from a different project, you
1744  /// must first unload ALL banks, including the initialization bank, then load the
1745  /// initialization bank from the other project, and finally load banks from that project.
1746  /// - Codecs and plug-ins must be registered before loading banks that use them.
1747  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1748  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1749  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1750  /// posting the event will fail.
1751  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1752  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1753  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1754  /// your implementation of the Stream Manager, or in the Low-Level I/O module if you use the default Stream Manager's implementation.
1755  /// \sa
1756  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1757  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1758  /// - <tt>AK::SoundEngine::GetIDFromString</tt>
1759  /// - \ref soundengine_banks
1760  /// - \ref integrating_elements_plugins
1761  /// - \ref streamingdevicemanager
1762  /// - \ref streamingmanager_lowlevel
1763  /// - \ref sdk_bank_training
1765  const char* in_pszString, ///< Name of the bank to load
1766  AkBankID & out_bankID ///< Returned bank ID
1767  );
1768 
1769  /// Loads a bank synchronously (by ID).\n
1770  /// \aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
1771  /// The bank ID is passed to the Stream Manager.
1772  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1773  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1774  /// The function returns when the request has been completely processed.
1775  /// \return
1776  /// - AK_Success: Load or unload successful.
1777  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
1778  /// - AK_BankReadError: I/O error.
1779  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1780  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1781  /// - AK_InvalidFile: File specified could not be opened.
1782  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1783  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1784  /// \remarks
1785  /// - The initialization bank must be loaded first.
1786  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1787  /// initialization bank. If you need to load SoundBanks from a different project, you
1788  /// must first unload ALL banks, including the initialization bank, then load the
1789  /// initialization bank from the other project, and finally load banks from that project.
1790  /// - Codecs and plug-ins must be registered before loading banks that use them.
1791  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1792  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1793  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1794  /// posting the event will fail.
1795  /// \sa
1796  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1797  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1798  /// - \ref soundengine_banks
1799  /// - \ref integrating_elements_plugins
1800  /// - \ref sdk_bank_training
1802  AkBankID in_bankID ///< Bank ID of the bank to load
1803  );
1804 
1805  /// Loads a bank synchronously (from in-memory data, in-place).\n
1806  ///
1807  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
1808  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
1809  ///
1810  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
1811  /// in a buffer and pass its address to the sound engine.
1812  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
1813  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1814  /// The function returns when the request has been completely processed.
1815  /// \return
1816  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
1817  /// ID with UnloadBank().
1818  /// - AK_Success: Load or unload successful.
1819  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
1820  /// - AK_BankReadError: I/O error.
1821  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1822  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1823  /// - AK_InvalidFile: File specified could not be opened.
1824  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1825  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1826  /// \remarks
1827  /// - The initialization bank must be loaded first.
1828  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1829  /// initialization bank. If you need to load SoundBanks from a different project, you
1830  /// must first unload ALL banks, including the initialization bank, then load the
1831  /// initialization bank from the other project, and finally load banks from that project.
1832  /// - Codecs and plug-ins must be registered before loading banks that use them.
1833  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1834  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1835  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1836  /// posting the event will fail.
1837  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
1838  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
1839  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
1840  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
1841  /// \sa
1842  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1843  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1844  /// - \ref soundengine_banks
1845  /// - \ref integrating_elements_plugins
1846  /// - \ref sdk_bank_training
1848  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
1849  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
1850  AkBankID & out_bankID ///< Returned bank ID
1851  );
1852 
1853  /// Loads a bank synchronously (from in-memory data, out-of-place).\n
1854  ///
1855  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
1856  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
1857  ///
1858  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
1859  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly
1860  /// allocated memory.
1861  /// In-memory loading is out-of-place: the buffer can be release as soon as the function returns. The advantage of using this
1862  /// over the in-place version is that there is no duplication of bank structures.
1863  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1864  /// The function returns when the request has been completely processed.
1865  /// \return
1866  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
1867  /// ID with UnloadBank().
1868  /// - AK_Success: Load or unload successful.
1869  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
1870  /// - AK_BankReadError: I/O error.
1871  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1872  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1873  /// - AK_InvalidFile: File specified could not be opened.
1874  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1875  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1876  /// \remarks
1877  /// - The initialization bank must be loaded first.
1878  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1879  /// initialization bank. If you need to load SoundBanks from a different project, you
1880  /// must first unload ALL banks, including the initialization bank, then load the
1881  /// initialization bank from the other project, and finally load banks from that project.
1882  /// - Codecs and plug-ins must be registered before loading banks that use them.
1883  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1884  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1885  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1886  /// posting the event will fail.
1887  /// \sa
1888  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1889  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1890  /// - \ref soundengine_banks
1891  /// - \ref integrating_elements_plugins
1892  /// - \ref sdk_bank_training
1894  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is not stored in sound engine, memory can be released after return)
1895  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
1896  AkBankID & out_bankID ///< Returned bank ID
1897  );
1898 
1899  /// Synchronously decodes Vorbis-encoded and Opus-encoded (Software version) media in a SoundBank. The file should already be read in memory before the decode operation. The out_pDecodedBankPtr can then be used with variants of LoadBank that load from in-memory data.
1900  /// \n
1901  /// CPU usage, RAM size, storage size and Internet bandwidth must be accounted for when developing a game, especially when it is aimed at mobile platforms. The DecodeBank function makes it possible to decode media at load time instead of decoding them every time they are played.
1903  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to decode (pointer is not stored in sound engine, memory can be released after return)
1904  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to decode
1905  AkMemPoolId in_uPoolForDecodedBank, ///< Memory pool to allocate decoded bank into. Specify AK_INVALID_POOL_ID and out_pDecodedBankPtr=NULL to obtain decoded bank size without performing the decode operation. Pass AK_INVALID_POOL_ID and out_pDecodedBankPtr!=NULL to decode bank into specified pointer.
1906  void * & out_pDecodedBankPtr, ///< Decoded bank memory location.
1907  AkUInt32 & out_uDecodedBankSize ///< Decoded bank memory size.
1908  );
1909 
1910 #ifdef AK_SUPPORT_WCHAR
1911  /// Loads a bank asynchronously (by Unicode string).\n
1912  /// The bank name is passed to the Stream Manager.
1913  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1914  /// A bank load request will be posted to the Bank Manager consumer thread.
1915  /// The function returns immediately.
1916  /// \return
1917  /// AK_Success if the scheduling was successful, AK_Fail otherwise.
1918  /// Use a callback to be notified when completed, and get the status of the request.
1919  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1920  /// You may use this ID with UnloadBank().
1921  /// \remarks
1922  /// - The initialization bank must be loaded first.
1923  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1924  /// initialization bank. If you need to load SoundBanks from a different project, you
1925  /// must first unload ALL banks, including the initialization bank, then load the
1926  /// initialization bank from the other project, and finally load banks from that project.
1927  /// - Codecs and plug-ins must be registered before loading banks that use them.
1928  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1929  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1930  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1931  /// posting the event will fail.
1932  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1933  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1934  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1935  /// your implementation of the Stream Manager (<tt>AK::IAkStreamMgr::CreateStd()</tt>), or in the Low-Level I/O module
1936  /// (<tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>) if you use the default Stream Manager's implementation.
1937  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
1938  // as AkFileSystemFlags::pCustomParam.
1939  /// \sa
1940  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1941  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1942  /// - AkBankCallbackFunc
1943  /// - \ref soundengine_banks
1944  /// - \ref integrating_elements_plugins
1945  /// - \ref streamingdevicemanager
1946  /// - \ref streamingmanager_lowlevel
1947  /// - \ref sdk_bank_training
1949  const wchar_t* in_pszString, ///< Name/path of the bank to load
1950  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
1951  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function, and also to <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> as AkFileSystemFlags::pCustomParam)
1952  AkBankID & out_bankID ///< Returned bank ID
1953  );
1954 #endif //AK_SUPPORT_WCHAR
1955 
1956  /// Loads a bank asynchronously.\n
1957  /// The bank name is passed to the Stream Manager.
1958  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1959  /// A bank load request will be posted to the Bank Manager consumer thread.
1960  /// The function returns immediately.
1961  /// \return
1962  /// AK_Success if the scheduling was successful, AK_Fail otherwise.
1963  /// Use a callback to be notified when completed, and get the status of the request.
1964  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1965  /// You may use this ID with UnloadBank().
1966  /// \remarks
1967  /// - The initialization bank must be loaded first.
1968  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1969  /// initialization bank. If you need to load SoundBanks from a different project, you
1970  /// must first unload ALL banks, including the initialization bank, then load the
1971  /// initialization bank from the other project, and finally load banks from that project.
1972  /// - Codecs and plug-ins must be registered before loading banks that use them.
1973  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1974  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1975  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1976  /// posting the Event will fail.
1977  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1978  /// Therefore, \c in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1979  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1980  /// your implementation of the Stream Manager (<tt>AK::IAkStreamMgr::CreateStd()</tt>), or in the Low-Level I/O module
1981  /// (<tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>) if you use the default Stream Manager's implementation.
1982  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
1983  // as <tt>AkFileSystemFlags::pCustomParam</tt>.
1984  /// \sa
1985  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1986  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1987  /// - AkBankCallbackFunc
1988  /// - \ref soundengine_banks
1989  /// - \ref integrating_elements_plugins
1990  /// - \ref streamingdevicemanager
1991  /// - \ref streamingmanager_lowlevel
1992  /// - \ref sdk_bank_training
1994  const char* in_pszString, ///< Name/path of the bank to load
1995  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
1996  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function, and also to <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> as AkFileSystemFlags::pCustomParam)
1997  AkBankID & out_bankID ///< Returned bank ID
1998  );
1999 
2000  /// Loads a bank asynchronously (by ID).\n
2001  /// \aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2002  /// The bank ID is passed to the Stream Manager.
2003  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2004  /// A bank load request will be posted to the Bank Manager consumer thread.
2005  /// The function returns immediately.
2006  /// \return
2007  /// AK_Success if the scheduling was successful, AK_Fail otherwise.
2008  /// Use a callback to be notified when completed, and get the status of the request.
2009  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2010  /// You may use this ID with \c UnloadBank().
2011  /// \remarks
2012  /// - The initialization bank must be loaded first.
2013  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2014  /// initialization bank. If you need to load SoundBanks from a different project, you
2015  /// must first unload ALL banks, including the initialization bank, then load the
2016  /// initialization bank from the other project, and finally load banks from that project.
2017  /// - Codecs and plug-ins must be registered before loading banks that use them.
2018  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2019  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2020  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2021  /// posting the event will fail.
2022  /// - The file path should be resolved in your implementation of the Stream Manager, or in the Low-Level I/O module if
2023  /// you use the default Stream Manager's implementation. The ID overload of <tt>AK::IAkStreamMgr::CreateStd()</tt> and <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> are called.
2024  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
2025  // as AkFileSystemFlags::pCustomParam.
2026  /// \sa
2027  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2028  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2029  /// - AkBankCallbackFunc
2030  /// - \ref soundengine_banks
2031  /// - \ref integrating_elements_plugins
2032  /// - \ref sdk_bank_training
2034  AkBankID in_bankID, ///< Bank ID of the bank to load
2035  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2036  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function, and also to <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt> as AkFileSystemFlags::pCustomParam)
2037  );
2038 
2039  /// Loads a bank asynchronously (from in-memory data, in-place).\n
2040  ///
2041  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
2042  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
2043  ///
2044  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
2045  /// in a buffer and pass its address to the sound engine.
2046  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
2047  /// A bank load request will be posted to the Bank Manager consumer thread.
2048  /// The function returns immediately.
2049  /// \return
2050  /// AK_Success if the scheduling was successful, AK_Fail otherwise, or AK_InvalidParameter if memory alignment is not correct.
2051  /// Use a callback to be notified when completed, and get the status of the request.
2052  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2053  /// You may use this ID with UnloadBank().
2054  /// \remarks
2055  /// - The initialization bank must be loaded first.
2056  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2057  /// initialization bank. If you need to load SoundBanks from a different project, you
2058  /// must first unload ALL banks, including the initialization bank, then load the
2059  /// initialization bank from the other project, and finally load banks from that project.
2060  /// - Codecs and plug-ins must be registered before loading banks that use them.
2061  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2062  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2063  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2064  /// posting the event will fail.
2065  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
2066  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
2067  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
2068  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
2069  /// \sa
2070  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2071  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2072  /// - AkBankCallbackFunc
2073  /// - \ref soundengine_banks
2074  /// - \ref integrating_elements_plugins
2075  /// - \ref sdk_bank_training
2077  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
2078  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2079  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2080  void * in_pCookie, ///< Callback cookie
2081  AkBankID & out_bankID ///< Returned bank ID
2082  );
2083 
2084  /// Loads a bank asynchronously (from in-memory data, out-of-place).\n
2085  ///
2086  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
2087  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
2088  ///
2089  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
2090  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly allocated
2091  /// memory.
2092  /// In-memory loading is out-of-place: the buffer can be released after the callback function is called. The advantage of using this
2093  /// over the in-place version is that there is no duplication of bank structures.
2094  /// A bank load request will be posted to the Bank Manager consumer thread.
2095  /// The function returns immediately.
2096  /// \return
2097  /// AK_Success if the scheduling was successful, AK_Fail otherwise, or AK_InvalidParameter if memory alignment is not correct.
2098  /// Use a callback to be notified when completed, and get the status of the request.
2099  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2100  /// You may use this ID with UnloadBank().
2101  /// \remarks
2102  /// - The initialization bank must be loaded first.
2103  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2104  /// initialization bank. If you need to load SoundBanks from a different project, you
2105  /// must first unload ALL banks, including the initialization bank, then load the
2106  /// initialization bank from the other project, and finally load banks from that project.
2107  /// - Codecs and plug-ins must be registered before loading banks that use them.
2108  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2109  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2110  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2111  /// posting the event will fail.
2112  /// \sa
2113  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2114  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2115  /// - AkBankCallbackFunc
2116  /// - \ref soundengine_banks
2117  /// - \ref integrating_elements_plugins
2118  /// - \ref sdk_bank_training
2120  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is not stored in sound engine, memory can be released after callback)
2121  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2122  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2123  void * in_pCookie, ///< Callback cookie
2124  AkBankID & out_bankID ///< Returned bank ID
2125  );
2126 
2127 #ifdef AK_SUPPORT_WCHAR
2128  /// Unloads a bank synchronously (by Unicode string).\n
2129  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2130  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2131  /// \remarks
2132  /// - The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2133  /// then it calls the synchronous version of UnloadBank() by ID.
2134  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2135  /// not the name of the file (if you changed it), nor the full path of the file.
2136  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2137  /// This means that streamed sounds or generated sounds will not be stopped.
2138  /// \sa
2139  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2140  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2141  /// - \ref soundengine_banks
2143  const wchar_t* in_pszString, ///< Name of the bank to unload
2144  const void * in_pInMemoryBankPtr ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2145  );
2146 #endif //AK_SUPPORT_WCHAR
2147 
2148  /// Unloads a bank synchronously.\n
2149  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2150  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2151  /// \remarks
2152  /// - The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2153  /// then it calls the synchronous version of UnloadBank() by ID.
2154  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2155  /// not the name of the file (if you changed it), nor the full path of the file.
2156  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2157  /// This means that streamed sounds or generated sounds will not be stopped.
2158  /// \sa
2159  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2160  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2161  /// - \ref soundengine_banks
2163  const char* in_pszString, ///< Name of the bank to unload
2164  const void * in_pInMemoryBankPtr ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2165  );
2166 
2167  /// Unloads a bank synchronously (by ID and memory pointer).\n
2168  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2169  /// \remarks
2170  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2171  /// This means that streamed sounds or generated sounds will not be stopped.
2172  /// \sa
2173  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2174  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2175  /// - \ref soundengine_banks
2177  AkBankID in_bankID, ///< ID of the bank to unload
2178  const void * in_pInMemoryBankPtr ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2179  );
2180 
2181 #ifdef AK_SUPPORT_WCHAR
2182  /// Unloads a bank asynchronously (by Unicode string).\n
2183  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2184  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2185  /// \remarks
2186  /// The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2187  /// then it calls the synchronous version of UnloadBank() by ID.
2188  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2189  /// not the name of the file (if you changed it), nor the full path of the file.
2190  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2191  /// This means that streamed sounds or generated sounds will not be stopped.
2192  /// \sa
2193  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2194  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2195  /// - AkBankCallbackFunc
2196  /// - \ref soundengine_banks
2198  const wchar_t* in_pszString, ///< Name of the bank to unload
2199  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2200  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2201  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2202  );
2203 #endif //AK_SUPPORT_WCHAR
2204 
2205  /// Unloads a bank asynchronously.\n
2206  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2207  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2208  /// \remarks
2209  /// The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2210  /// then it calls the synchronous version of UnloadBank() by ID.
2211  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2212  /// not the name of the file (if you changed it), nor the full path of the file.
2213  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2214  /// This means that streamed sounds or generated sounds will not be stopped.
2215  /// \sa
2216  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2217  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2218  /// - AkBankCallbackFunc
2219  /// - \ref soundengine_banks
2221  const char* in_pszString, ///< Name of the bank to unload
2222  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2223  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2224  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2225  );
2226 
2227  /// Unloads a bank asynchronously (by ID and memory pointer).\n
2228  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2229  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2230  /// \remarks
2231  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2232  /// This means that streamed sounds or generated sounds will not be stopped.
2233  /// \sa
2234  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2235  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2236  /// - AkBankCallbackFunc
2237  /// - \ref soundengine_banks
2239  AkBankID in_bankID, ///< ID of the bank to unload
2240  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2241  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2242  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2243  );
2244 
2245  /// Cancels all Event callbacks associated with a specific callback cookie specified while loading Banks of preparing Events.\n
2246  /// \sa
2247  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2248  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2249  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2250  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2251  /// - AkBankCallbackFunc
2253  void * in_pCookie ///< Callback cookie to be canceled
2254  );
2255 
2256  /// Preparation type.
2257  /// \sa
2258  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2259  /// - <tt>AK::SoundEngine::PrepareGameSyncs()</tt>
2260  /// - <tt>AK::SoundEngine::PrepareBank()</tt>
2262  {
2263  Preparation_Load, ///< \c PrepareEvent() will load required information to play the specified event.
2264  Preparation_Unload, ///< \c PrepareEvent() will unload required information to play the specified event.
2265  Preparation_LoadAndDecode ///< Vorbis media is decoded when loading, and an uncompressed PCM version is used for playback.
2266  };
2267 
2268  /// Parameter to be passed to <tt>AK::SoundEngine::PrepareBank()</tt>.
2269  /// Use AkBankContent_All to load both the media and structural content from the bank.
2270  /// Use AkBankContent_StructureOnly to load only the structural content, including events, from the bank and then later use the PrepareEvent() functions to load media on demand from loose files on the disk.
2271  /// \sa
2272  /// - <tt>AK::SoundEngine::PrepareBank()</tt>
2273  /// - \ref soundengine_banks_preparingbanks
2275  {
2276  AkBankContent_StructureOnly, ///< Use AkBankContent_StructureOnly to load only the structural content, including Events, and then later use the PrepareEvent() functions to load media on demand from loose files on the disk.
2277  AkBankContent_All ///< Use AkBankContent_All to load both the media and structural content.
2278  };
2279 
2280 #ifdef AK_SUPPORT_WCHAR
2281  /// This function will load the Events, structural content, and optionally, the media content from the SoundBank. If the flag AkBankContent_All is specified, PrepareBank() will load the media content from
2282  /// the bank; but, as opposed to LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using PrepareBank(), alone or in combination with PrepareEvent(),
2283  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2284  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2285  /// allowing using PrepareEvent() to load media on demand.
2286  /// \sa
2287  /// - \ref soundengine_banks_preparingbanks
2288  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2289  /// - <tt>AK::SoundEngine::PreparationType</tt>
2290  /// \remarks
2291  /// PrepareBank(), when called with the flag AkBankContent_StructureOnly, requires additional calls to PrepareEvent() to load the media for each event. PrepareEvent(), however, is unable to
2292  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2293  /// for example, a game may have a tool mode that uses PrepareEvent() to load loose files on-demand and, also, a game mode that uses LoadBank() to load the bank in entirety.
2295  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2296  const wchar_t* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2297  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2298  );
2299 #endif //AK_SUPPORT_WCHAR
2300 
2301  /// This function will load the Events, structural content, and optionally, the media content from the SoundBank. If the flag AkBankContent_All is specified, PrepareBank() will load the media content from
2302  /// the bank; but, as opposed to LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using PrepareBank(), alone or in combination with PrepareEvent(),
2303  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2304  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2305  /// allowing using PrepareEvent() to load media on demand.
2306  /// \sa
2307  /// - \ref soundengine_banks_preparingbanks
2308  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2309  /// - <tt>AK::SoundEngine::PreparationType</tt>
2310  /// \remarks
2311  /// \c PrepareBank(), when called with the flag \c AkBankContent_StructureOnly, requires additional calls to \c PrepareEvent() to load the media for each event. \c PrepareEvent(), however, is unable to
2312  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2313  /// for example, a game may have a tool mode that uses PrepareEvent() to load loose files on-demand and, also, a game mode that uses \c LoadBank() to load the bank in entirety.
2315  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2316  const char* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2317  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2318  );
2319 
2320  /// \n\aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2321  /// This function will load the events, structural content, and optionally, the media content from the SoundBank. If the flag AkBankContent_All is specified, PrepareBank() will load the media content from
2322  /// the bank, but as opposed to LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using PrepareBank(), alone or in combination with PrepareEvent(),
2323  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2324  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2325  /// allowing using PrepareEvent() to load media on demand.
2326  /// \sa
2327  /// - \ref soundengine_banks_preparingbanks
2328  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2329  /// - <tt>AK::SoundEngine::PreparationType</tt>
2330  /// \remarks
2331  /// \c PrepareBank(), when called with the flag AkBankContent_StructureOnly, requires additional calls to PrepareEvent() to load the media for each event. PrepareEvent(), however, is unable to
2332  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2333  /// for example, a game may have a tool mode that uses PrepareEvent() to load loose files on-demand and, also, a game mode that uses LoadBank() to load the bank in entirety.
2335  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2336  AkBankID in_bankID, ///< ID of the bank to Prepare/Unprepare.
2337  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2338  );
2339 
2340 #ifdef AK_SUPPORT_WCHAR
2341  /// This function will load the Events, structural content, and optionally, the media content from the SoundBank. If the flag AkBankContent_All is specified, PrepareBank() will load the media content from
2342  /// the bank, but as opposed to LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using PrepareBank(), alone or in combination with PrepareEvent(),
2343  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2344  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2345  /// allowing using PrepareEvent() to load media on demand.
2346  /// \sa
2347  /// - \ref soundengine_banks_preparingbanks
2348  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2349  /// - <tt>AK::SoundEngine::PreparationType</tt>
2350  /// \remarks
2351  /// PrepareBank(), when called with the flag AkBankContent_StructureOnly, requires additional calls to PrepareEvent() to load the media for each event. PrepareEvent(), however, is unable to
2352  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2353  /// for example, a game may have a tool mode that uses PrepareEvent() to load loose files on-demand and, also, a game mode that uses LoadBank() to load the bank in entirety.
2355  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2356  const wchar_t* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2357  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2358  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2359  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2360  );
2361 #endif //AK_SUPPORT_WCHAR
2362 
2363  /// This function will load the events, structural content, and optionally, the media content from the SoundBank. If the flag \c AkBankContent_All is specified, \c PrepareBank() will load the media content from
2364  /// the bank, but as opposed to \c LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using \c PrepareBank(), alone or in combination with PrepareEvent(),
2365  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2366  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2367  /// allowing using PrepareEvent() to load media on demand.
2368  /// \sa
2369  /// - \ref soundengine_banks_preparingbanks
2370  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2371  /// - <tt>AK::SoundEngine::PreparationType()</tt>
2372  /// \remarks
2373  /// PrepareBank(), when called with the flag AkBankContent_StructureOnly, requires additional calls to PrepareEvent() to load the media for each event. PrepareEvent(), however, is unable to
2374  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2375  /// for example, a game may have a tool mode that uses PrepareEvent() to load loose files on-demand and, also, a game mode that uses LoadBank() to load the bank in entirety.
2377  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2378  const char* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2379  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2380  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2381  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2382  );
2383 
2384  /// \n\aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2385  /// This function will load the events, structural content, and optionally, the media content from the SoundBank. If the flag AkBankContent_All is specified, \c PrepareBank() will load the media content from
2386  /// the bank, but as opposed to \c LoadBank(), the media will be loaded one media item at a time instead of in one contiguous memory block. Using \c PrepareBank(), alone or in combination with \c PrepareEvent(),
2387  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2388  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2389  /// allowing using PrepareEvent() to load media on demand.
2390  /// \sa
2391  /// - \ref soundengine_banks_preparingbanks
2392  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2393  /// - <tt>AK::SoundEngine::PreparationType()</tt>
2394  /// \remarks
2395  /// \c PrepareBank(), when called with the flag AkBankContent_StructureOnly, requires additional calls to PrepareEvent() to load the media for each event. \c PrepareEvent(), however, is unable to
2396  /// access media content contained within SoundBanks and requires that the media be available as loose files in the file system. This flag may be useful to implement multiple loading configurations;
2397  /// for example, a game may have a tool mode that uses \c PrepareEvent() to load loose files on-demand and, also, a game mode that uses \c LoadBank() to load the bank in entirety.
2399  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2400  AkBankID in_bankID, ///< ID of the bank to Prepare/Unprepare.
2401  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2402  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2403  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All ///< Structures only (including events) or all content.
2404  );
2405 
2406  /// Clear all previously prepared events.\n
2407  /// \return
2408  /// - AK_Success if successful.
2409  /// - AK_Fail if the sound engine was not correctly initialized or if there is not enough memory to handle the command.
2410  /// \remarks
2411  /// The function \c ClearBanks() also clears all prepared events.
2412  /// \sa
2413  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
2414  /// - \c <tt>AK::SoundEngine::ClearBanks()</tt>
2416 
2417 #ifdef AK_SUPPORT_WCHAR
2418  /// Prepares or unprepares Events synchronously (by Unicode string).\n
2419  /// The Events are identified by strings, and converted to IDs internally
2420  /// (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2421  /// Before invoking \c PrepareEvent(), use \c LoadBank() to explicitly load the SoundBank(s)
2422  /// that contain the Events and structures. When a request is posted to the
2423  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2424  /// successfully post the specified Events and load the required loose media files.
2425  /// \aknote Before version 2015.1, the required media files could be included
2426  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2427  /// however,\c PrepareEvent() now only looks for loose media files.
2428  /// \endaknote
2429  /// The function returns when the request is completely processed.
2430  /// \return
2431  /// - AK_Success: Prepare/un-prepare successful.
2432  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2433  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2434  /// - AK_BankReadError: I/O error.
2435  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2436  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2437  /// - AK_InvalidFile: File specified could not be opened.
2438  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2439  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2440  /// \remarks
2441  /// Whenever at least one event fails to be resolved, the actions performed for all
2442  /// other events are cancelled.
2443  /// \sa
2444  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2445  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2446  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2447  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2448  /// - \ref soundengine_banks
2449  /// - \ref sdk_bank_training
2451  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2452  const wchar_t** in_ppszString, ///< Array of event names
2453  AkUInt32 in_uNumEvent ///< Number of events in the array
2454  );
2455 #endif //AK_SUPPORT_WCHAR
2456 
2457  /// Prepares or unprepares events synchronously.\n
2458  /// The Events are identified by strings and converted to IDs internally
2459  /// (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2460  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2461  /// that contain the Events and structures. When a request is posted to the
2462  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2463  /// successfully post the specified Events and load the required loose media files.
2464  /// \aknote Before version 2015.1, the required media files could be included
2465  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2466  /// however, PrepareEvent() now only looks for loose media files.
2467  /// \endaknote
2468  /// The function returns when the request is completely processed.
2469  /// \return
2470  /// - AK_Success: Prepare/un-prepare successful.
2471  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2472  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2473  /// - AK_BankReadError: I/O error.
2474  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2475  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2476  /// - AK_InvalidFile: File specified could not be opened.
2477  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2478  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2479  /// \remarks
2480  /// Whenever at least one event fails to be resolved, the actions performed for all
2481  /// other events are cancelled.
2482  /// \aknote The use of PrepareEvent is incompatible with LoadBank, using in-memory data.
2483  /// \endaknote
2484  /// \sa
2485  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2486  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2487  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2488  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2489  /// - \ref soundengine_banks
2490  /// - \ref sdk_bank_training
2492  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2493  const char** in_ppszString, ///< Array of event names
2494  AkUInt32 in_uNumEvent ///< Number of events in the array
2495  );
2496 
2497  /// Prepares or unprepares events synchronously (by ID).
2498  /// The Events are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2499  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2500  /// that contain the Events and structures. When a request is posted to the
2501  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2502  /// successfully post the specified Events and load the required loose media files.
2503  /// \aknote Before version 2015.1, the required media files could be included
2504  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2505  /// however, PrepareEvent() now only looks for loose media files.
2506  /// \endaknote
2507  /// The function returns when the request is completely processed.
2508  /// \return
2509  /// - AK_Success: Prepare/un-prepare successful.
2510  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2511  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2512  /// - AK_BankReadError: I/O error.
2513  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2514  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2515  /// - AK_InvalidFile: File specified could not be opened.
2516  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2517  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2518  /// \remarks
2519  /// Whenever at least one event fails to be resolved, the actions performed for all
2520  /// other events are cancelled.
2521  /// \sa
2522  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2523  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2524  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2525  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2526  /// - \ref soundengine_banks
2527  /// - \ref sdk_bank_training
2529  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2530  AkUniqueID* in_pEventID, ///< Array of event IDs
2531  AkUInt32 in_uNumEvent ///< Number of event IDs in the array
2532  );
2533 
2534 #ifdef AK_SUPPORT_WCHAR
2535  /// Prepares or unprepares an event asynchronously (by Unicode string).
2536  /// The Events are identified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2537  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2538  /// that contain the Events and structures. When a request is posted to the
2539  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2540  /// successfully post the specified Events and load the required loose media files.
2541  /// \aknote Before version 2015.1, the required media files could be included
2542  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2543  /// however, \c PrepareEvent() now only looks for loose media files.
2544  /// \endaknote
2545  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2546  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2547  /// \remarks
2548  /// Whenever at least one Event fails to be resolved, the actions performed for all
2549  /// other Events are cancelled.
2550  /// \sa
2551  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2552  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2553  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2554  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2555  /// - AkBankCallbackFunc
2556  /// - \ref soundengine_banks
2557  /// - \ref sdk_bank_training
2559  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2560  const wchar_t** in_ppszString, ///< Array of event names
2561  AkUInt32 in_uNumEvent, ///< Number of events in the array
2562  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2563  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2564  );
2565 #endif //AK_SUPPORT_WCHAR
2566 
2567  /// Prepares or unprepares an event asynchronously.
2568  /// The Events are identified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2569  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2570  /// that contain the Events and structures. When a request is posted to the
2571  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2572  /// successfully post the specified Events and load the required loose media files.
2573  /// \aknote Before version 2015.1, the required media files could be included
2574  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2575  /// however, PrepareEvent() now only looks for loose media files.
2576  /// \endaknote
2577  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2578  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2579  /// \remarks
2580  /// Whenever at least one event fails to be resolved, the actions performed for all
2581  /// other events are cancelled.
2582  /// \sa
2583  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2584  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2585  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2586  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2587  /// - AkBankCallbackFunc
2588  /// - \ref soundengine_banks
2589  /// - \ref sdk_bank_training
2591  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2592  const char** in_ppszString, ///< Array of event names
2593  AkUInt32 in_uNumEvent, ///< Number of events in the array
2594  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2595  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2596  );
2597 
2598  /// Prepares or unprepares events asynchronously (by ID).\n
2599  /// The Events are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2600  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2601  /// that contain the Events and structures. When a request is posted to the
2602  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2603  /// successfully post the specified Events and load the required loose media files.
2604  /// \aknote Before version 2015.1, the required media files could be included
2605  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2606  /// however, PrepareEvent() now only looks for loose media files.
2607  /// \endaknote
2608  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2609  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2610  /// \remarks
2611  /// Whenever at least one event fails to be resolved, the actions performed for all
2612  /// other events are cancelled.
2613  /// \sa
2614  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2615  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2616  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2617  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2618  /// - AkBankCallbackFunc
2619  /// - \ref soundengine_banks
2620  /// - \ref sdk_bank_training
2622  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2623  AkUniqueID* in_pEventID, ///< Array of event IDs
2624  AkUInt32 in_uNumEvent, ///< Number of event IDs in the array
2625  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2626  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2627  );
2628 
2629  /// Indicates the location of a specific Media ID in memory
2630  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2631  /// \return AK_Success if operation was successful, AK_InvalidParameter if in_pSourceSettings is invalid, and AK_Fail otherwise.
2633  AkSourceSettings * in_pSourceSettings, ///< Array of Source Settings
2634  AkUInt32 in_uNumSourceSettings ///< Number of Source Settings in the array
2635  );
2636 
2637  /// Removes the specified source from the list of loaded media, even if this media is already in use.
2638  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2639  /// \aknote This function is unsafe and deprecated. Use TryUnsetMedia() in its place.
2640  /// Media that is still in use by the sound engine should not be unset by this function.
2641  /// If the media is still in use, this function will attempt to forcibly kill all sounds and effects referencing this media,
2642  /// and then return AK_ResourceInUse. The client should NOT presume that the memory can be safely released at this point.
2643  /// The moment at which the memory can be safely released is unknown, and the only safe course of action is to keep the memory
2644  /// alive until the sound engine is terminated.
2645  /// \endaknote
2646  /// \return
2647  /// - AK_Success: Operation was successful, and the memory can be released on the client side.
2648  /// - AK_ResourceInUse: Specified media is still in use by the sound engine, the client should not release the memory.
2649  /// - AK_InvalidParameter: in_pSourceSettings is invalid
2651  AkSourceSettings * in_pSourceSettings, ///< Array of Source Settings
2652  AkUInt32 in_uNumSourceSettings ///< Number of Source Settings in the array
2653  );
2654 
2655  /// Removes the specified source from the list of loaded media, only if this media is not already in use.
2656  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2657  /// \aknote Media that is still in use by the sound engine should not be unset.
2658  /// If this function returns AK_ResourceInUse, then the operation is a no-op and the client must not release memory for this media.
2659  /// Instead, the client should retry the TryUnsetMedia operation later with the same parameters and check for AK_Success.
2660  /// \endaknote
2661  /// If out_pUnsetResults is not null, then it is assumed to point to an array of result codes of the same length as in_pSourceSettings.
2662  /// out_pUnsetResults will be filled with either AK_Success or AK_ResourceInUse, indicating which media was still in use and not unset.
2663  /// \return
2664  /// - AK_Success: Operation was successful, and the memory can be released on the client side.
2665  /// - AK_ResourceInUse: Specified media is still in use by the sound engine, and the media was not unset. Do not release memory, and try again later.
2666  /// - AK_InvalidParameter: in_pSourceSettings is invalid
2668  AkSourceSettings* in_pSourceSettings, ///< Array of Source Settings
2669  AkUInt32 in_uNumSourceSettings, ///< Number of Source Settings in the array
2670  AKRESULT* out_pUnsetResults ///< (optional, can be null) Array of result codes
2671  );
2672 
2673 #ifdef AK_SUPPORT_WCHAR
2674  /// Prepares or unprepares game syncs synchronously (by Unicode string).\n
2675  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2676  /// The game syncs definitions must already exist in the sound engine by having
2677  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
2678  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2679  /// dependencies needed to successfully set this game sync group to one of the
2680  /// game sync values specified, and load the required banks, if applicable.
2681  /// The function returns when the request has been completely processed.
2682  /// \return
2683  /// - AK_Success: Prepare/un-prepare successful.
2684  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
2685  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2686  /// - AK_BankReadError: I/O error.
2687  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2688  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2689  /// - AK_InvalidFile: File specified could not be opened.
2690  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2691  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2692  /// \remarks
2693  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
2694  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
2695  /// so you never need to call this function.
2696  /// \sa
2697  /// - \c <tt>AK::SoundEngine::GetIDFromString()</tt>
2698  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
2699  /// - \c <tt>AK::SoundEngine::LoadBank()</tt>
2700  /// - \c AkInitSettings
2701  /// - \ref soundengine_banks
2702  /// - \ref sdk_bank_training
2704  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2705  AkGroupType in_eGameSyncType, ///< The type of game sync.
2706  const wchar_t* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
2707  const wchar_t** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
2708  AkUInt32 in_uNumGameSyncs ///< The number of game sync in the string array.
2709  );
2710 #endif //AK_SUPPORT_WCHAR
2711 
2712  /// Prepares or unprepares game syncs synchronously.\n
2713  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2714  /// The game syncs definitions must already exist in the sound engine by having
2715  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
2716  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2717  /// dependencies needed to successfully set this game sync group to one of the
2718  /// game sync values specified, and load the required banks, if applicable.
2719  /// The function returns when the request has been completely processed.
2720  /// \return
2721  /// - AK_Success: Prepare/un-prepare successful.
2722  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
2723  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2724  /// - AK_BankReadError: I/O error.
2725  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2726  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2727  /// - AK_InvalidFile: File specified could not be opened.
2728  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2729  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2730  /// \remarks
2731  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
2732  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
2733  /// so you never need to call this function.
2734  /// \sa
2735  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2736  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2737  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2738  /// - AkInitSettings
2739  /// - \ref soundengine_banks
2740  /// - \ref sdk_bank_training
2742  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2743  AkGroupType in_eGameSyncType, ///< The type of game sync.
2744  const char* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
2745  const char** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
2746  AkUInt32 in_uNumGameSyncs ///< The number of game sync in the string array.
2747  );
2748 
2749  /// Prepares or unprepares game syncs synchronously (by ID).\n
2750  /// The group and game syncs are specified by ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2751  /// The game syncs definitions must already exist in the sound engine by having
2752  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
2753  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2754  /// dependencies needed to successfully set this game sync group to one of the
2755  /// game sync values specified, and load the required banks, if applicable.
2756  /// The function returns when the request has been completely processed.
2757  /// \return
2758  /// - AK_Success: Prepare/un-prepare successful.
2759  /// - AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
2760  /// - AK_InsufficientMemory: Insufficient memory to store bank data.
2761  /// - AK_BankReadError: I/O error.
2762  /// - AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2763  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2764  /// - AK_InvalidFile: File specified could not be opened.
2765  /// - AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2766  /// - AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2767  /// \remarks
2768  /// You need to call \c PrepareGameSyncs() if the sound engine was initialized with \c AkInitSettings::bEnableGameSyncPreparation
2769  /// set to \c true. When set to \c false, the sound engine automatically prepares all game syncs when preparing Events,
2770  /// so you never need to call this function.
2771  /// \sa
2772  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2773  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2774  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2775  /// - AkInitSettings
2776  /// - \ref soundengine_banks
2777  /// - \ref sdk_bank_training
2779  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2780  AkGroupType in_eGameSyncType, ///< The type of game sync.
2781  AkUInt32 in_GroupID, ///< The State Group ID or the Switch Group ID.
2782  AkUInt32* in_paGameSyncID, ///< Array of ID of the game syncs to either support or not support.
2783  AkUInt32 in_uNumGameSyncs ///< The number of game sync ID in the array.
2784  );
2785 
2786 #ifdef AK_SUPPORT_WCHAR
2787  /// Prepares or unprepares game syncs asynchronously (by Unicode string).\n
2788  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2789  /// The game syncs definitions must already exist in the sound engine by having
2790  /// explicitly loaded the bank(s) that contain them (with <tt>LoadBank()</tt>).
2791  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2792  /// dependencies needed to successfully set this game sync group to one of the
2793  /// game sync values specified, and load the required banks, if applicable.
2794  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2795  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2796  /// \remarks
2797  /// You need to call \c PrepareGameSyncs() if the sound engine was initialized with \c AkInitSettings::bEnableGameSyncPreparation
2798  /// set to \c true. When set to \c false, the sound engine automatically prepares all game syncs when preparing Events,
2799  /// so you never need to call this function.
2800  /// \sa
2801  /// - \c <tt>AK::SoundEngine::GetIDFromString()</tt>
2802  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
2803  /// - \c <tt>AK::SoundEngine::LoadBank()</tt>
2804  /// - \c AkInitSettings
2805  /// - \c AkBankCallbackFunc
2806  /// - \ref soundengine_banks
2807  /// - \ref sdk_bank_training
2809  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2810  AkGroupType in_eGameSyncType, ///< The type of game sync.
2811  const wchar_t* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
2812  const wchar_t** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
2813  AkUInt32 in_uNumGameSyncs, ///< The number of game sync in the string array.
2814  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2815  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2816  );
2817 #endif //AK_SUPPORT_WCHAR
2818 
2819  /// Prepares or unprepares game syncs asynchronously.\n
2820  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2821  /// The game syncs definitions must already exist in the sound engine by having
2822  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
2823  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2824  /// dependencies needed to successfully set this game sync group to one of the
2825  /// game sync values specified, and load the required banks, if applicable.
2826  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2827  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2828  /// \remarks
2829  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
2830  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
2831  /// so you never need to call this function.
2832  /// \sa
2833  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2834  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2835  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2836  /// - AkInitSettings
2837  /// - AkBankCallbackFunc
2838  /// - \ref soundengine_banks
2839  /// - \ref sdk_bank_training
2841  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2842  AkGroupType in_eGameSyncType, ///< The type of game sync.
2843  const char* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
2844  const char** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
2845  AkUInt32 in_uNumGameSyncs, ///< The number of game sync in the string array.
2846  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2847  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2848  );
2849 
2850  /// Prepares or un-prepare game syncs asynchronously (by ID).\n
2851  /// The group and game syncs are specified by ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2852  /// The game syncs definitions must already exist in the sound engine by having
2853  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
2854  /// A request is posted to the Bank Manager consumer thread. It will resolve all
2855  /// dependencies needed to successfully set this game sync group to one of the
2856  /// game sync values specified, and load the required banks, if applicable.
2857  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2858  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2859  /// \remarks
2860  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
2861  /// set to true. When set to false, the sound engine automatically prepares all Game Syncs when preparing Events,
2862  /// so you never need to call this function.
2863  /// \sa
2864  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2865  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2866  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2867  /// - AkInitSettings
2868  /// - AkBankCallbackFunc
2869  /// - \ref soundengine_banks
2870  /// - \ref sdk_bank_training
2872  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2873  AkGroupType in_eGameSyncType, ///< The type of game sync.
2874  AkUInt32 in_GroupID, ///< The State Group ID or the Switch Group ID.
2875  AkUInt32* in_paGameSyncID, ///< Array of ID of the Game Syncs to either support or not support.
2876  AkUInt32 in_uNumGameSyncs, ///< The number of game sync ID in the array.
2877  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2878  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2879  );
2880 
2881  //@}
2882 
2883 
2884  ////////////////////////////////////////////////////////////////////////
2885  /// @name Listeners
2886  //@{
2887 
2888  /// Sets a game object's associated listeners.
2889  /// All listeners that have previously been added via AddListener or set via SetListeners will be removed and replaced with the listeners in the array in_pListenerGameObjs.
2890  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
2891  /// \return Always returns AK_Success
2892  /// \sa
2893  /// - <tt>AK::SoundEngine::AddListener</tt>
2894  /// - <tt>AK::SoundEngine::RemoveListener</tt>
2895  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2896  /// - \ref soundengine_listeners
2898  AkGameObjectID in_emitterGameObj, ///< Emitter game object. Must have been previously registered via RegisterGameObj.
2899  const AkGameObjectID* in_pListenerGameObjs, ///< Array of listener game object IDs that will be activated for in_emitterGameObj.
2900  AkUInt32 in_uNumListeners ///< Length of array
2901  );
2902 
2903  /// Add a single listener to a game object's set of associated listeners.
2904  /// Any listeners that have previously been added or set via AddListener or SetListeners will remain as listeners and in_listenerGameObj will be added as an additional listener.
2905  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
2906  /// \sa
2907  /// - <tt>AK::SoundEngine::SetListeners</tt>
2908  /// - <tt>AK::SoundEngine::RemoveListener</tt>
2909  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2910  /// - \ref soundengine_listeners
2912  AkGameObjectID in_emitterGameObj, ///< Emitter game object. Must have been previously registered via RegisterGameObj.
2913  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be activated for in_emitterGameObj.
2914  );
2915 
2916  /// Remove a single listener from a game object's set of active listeners.
2917  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
2918  /// \sa
2919  /// - <tt>AK::SoundEngine::SetListeners</tt>
2920  /// - <tt>AK::SoundEngine::AddListener</tt>
2921  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2922  /// - \ref soundengine_listeners
2924  AkGameObjectID in_emitterGameObj, ///< Emitter game object.
2925  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be deactivated for in_emitterGameObj. Game objects must have been previously registered.
2926  );
2927 
2928  /// Sets the default set of associated listeners for game objects that have not explicitly overridden their listener sets. Upon registration, all game objects reference the default listener set, until
2929  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
2930  /// All default listeners that have previously been added via AddDefaultListener or set via SetDefaultListeners will be removed and replaced with the listeners in the array in_pListenerGameObjs.
2931  /// \return Always returns AK_Success
2932  /// \sa
2933  /// - \ref soundengine_listeners
2935  const AkGameObjectID* in_pListenerObjs, ///< Array of listener game object IDs that will be activated for subsequent registrations. Game objects must have been previously registered.
2936  AkUInt32 in_uNumListeners ///< Length of array
2937  );
2938 
2939  /// Add a single listener to the default set of listeners. Upon registration, all game objects reference the default listener set, until
2940  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
2941  /// \sa
2942  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2943  /// - <tt>AK::SoundEngine::RemoveDefaultListener</tt>
2944  /// - \ref soundengine_listeners
2946  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be added to the default set of listeners.
2947  );
2948 
2949  /// Remove a single listener from the default set of listeners. Upon registration, all game objects reference the default listener set, until
2950  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
2951  /// \sa
2952  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2953  /// - <tt>AK::SoundEngine::AddDefaultListener</tt>
2954  /// - \ref soundengine_listeners
2956  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be removed from the default set of listeners.
2957  );
2958 
2959  /// Resets the listener associations to the default listener(s), as set by <tt>SetDefaultListeners</tt>. This will also reset per-listener gains that have been set using <tt>SetGameObjectOutputBusVolume</tt>.
2960  /// \return Always returns AK_Success
2961  /// \sa
2962  /// - <tt>AK::SoundEngine::SetListeners</tt>
2963  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
2964  /// - <tt>AK::SoundEngine::SetGameObjectOutputBusVolume</tt>
2965  /// - \ref soundengine_listeners
2967  AkGameObjectID in_emitterGameObj ///< Emitter game object.
2968  );
2969 
2970  /// Sets a listener's spatialization parameters. This lets you define listener-specific
2971  /// volume offsets for each audio channel.
2972  /// If \c in_bSpatialized is false, only \c in_pVolumeOffsets is used for this listener (3D positions
2973  /// have no effect on the speaker distribution). Otherwise, \c in_pVolumeOffsets is added to the speaker
2974  /// distribution computed for this listener.
2975  /// Use helper functions of \c AK::SpeakerVolumes to manipulate the vector of volume offsets in_pVolumeOffsets.
2976  ///
2977  /// \remarks
2978  /// - If a sound is mixed into a bus that has a different speaker configuration than in_channelConfig,
2979  /// standard up/downmix rules apply.
2980  /// - Sounds with 3D Spatialization set to None will not be affected by these parameters.
2981  /// \return
2982  /// \c AK_Success if message was successfully posted to sound engine queue
2983  /// \c AK_InvalidFloatValue if the value specified was NaN or Inf
2984  /// \c AK_InsufficientMemory if there wasn't enough memory in the message queue
2985  /// \sa
2986  /// - \ref soundengine_listeners_spatial
2988  AkGameObjectID in_uListenerID, ///< Listener game object ID
2989  bool in_bSpatialized, ///< Spatialization toggle (True : enable spatialization, False : disable spatialization)
2990  AkChannelConfig in_channelConfig, ///< Channel configuration associated with volumes in_pVolumeOffsets. Ignored if in_pVolumeOffsets is NULL.
2991  AK::SpeakerVolumes::VectorPtr in_pVolumeOffsets = NULL ///< Per-speaker volume offset, in dB. See AkSpeakerVolumes.h for how to manipulate this vector.
2992  );
2993 
2994  //@}
2995 
2996 
2997  ////////////////////////////////////////////////////////////////////////
2998  /// @name Game Syncs
2999  //@{
3000 
3001  /// Sets the value of a real-time parameter control (by ID).
3002  /// With this function, you may set a game parameter value with global scope or with game object scope.
3003  /// Game object scope supersedes global scope. (Once a value is set for the game object scope, it will not be affected by changes to the global scope value.) Game parameter values set with a global scope are applied to all
3004  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3005  /// To set a game parameter value with global scope, pass \c AK_INVALID_GAME_OBJECT as the game object.
3006  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3007  /// value for \c in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3008  /// according to the interpolation curve. If you call \c <tt><tt>SetRTPCValue()</tt></tt> with <tt>in_uValueChangeDuration = 0</tt> in the
3009  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3010  /// function at every game frame, you should not use \c in_uValueChangeDuration, as it would have no effect and it is less efficient.
3011  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3012  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3013  /// \return
3014  /// \c AK_Success if the value was successfully set
3015  /// \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3016  /// \sa
3017  /// - \ref soundengine_rtpc
3018  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3020  AkRtpcID in_rtpcID, ///< ID of the game parameter
3021  AkRtpcValue in_value, ///< Value to set
3022  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3023  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3024  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3025  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3026  );
3027 
3028 #ifdef AK_SUPPORT_WCHAR
3029  /// Sets the value of a real-time parameter control (by Unicode string name).
3030  /// With this function, you may set a game parameter value to global scope or to game object scope.
3031  /// Game object scope supersedes global scope. (Once a value is set for the game object scope, it will not be affected by changes to the global scope value.) Game parameter values set with global scope are applied to all
3032  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3033  /// To set a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3034  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3035  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3036  /// according to the interpolation curve. If you call SetRTPCValue() with in_uValueChangeDuration = 0 in the
3037  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3038  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3039  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3040  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3041  /// \return
3042  /// \c AK_Success if the value was successfully set
3043  /// \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3044  /// \c AK_IDNotFound if in_pszRtpcName is NULL.
3045  /// \aknote Strings are case-insensitive. \endaknote
3046  /// \sa
3047  /// - \ref soundengine_rtpc
3049  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3050  AkRtpcValue in_value, ///< Value to set
3051  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3052  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3053  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3054  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3055  );
3056 #endif //AK_SUPPORT_WCHAR
3057 
3058  /// Sets the value of a real-time parameter control.
3059  /// With this function, you may set a game parameter value with global scope or with game object scope.
3060  /// Game object scope supersedes global scope. (Once a value is set for the game object scope, it will not be affected by changes to the global scope value.) Game parameter values set with global scope are applied to all
3061  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3062  /// To set a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3063  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3064  /// value for \c in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3065  /// according to the interpolation curve. If you call SetRTPCValue() with in_uValueChangeDuration = 0 in the
3066  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3067  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3068  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3069  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3070  /// \return
3071  /// \c AK_Success if the value was successfully set
3072  /// \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3073  /// \c AK_IDNotFound if in_pszRtpcName is NULL.
3074  /// \aknote Strings are case-insensitive. \endaknote
3075  /// \sa
3076  /// - \ref soundengine_rtpc
3078  const char* in_pszRtpcName, ///< Name of the game parameter
3079  AkRtpcValue in_value, ///< Value to set
3080  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3081  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3082  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3083  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3084  );
3085 
3086  /// Sets the value of a real-time parameter control (by ID).
3087  /// With this function, you may set a game parameter value on playing id scope.
3088  /// Playing id scope supersedes both game object scope and global scope.
3089  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3090  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3091  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3092  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3093  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3094  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3095  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3096  /// - AK_Success if successful
3097  /// - AK_PlayingIDNotFound if in_playingID is not found.
3098  /// - AK_IDNotFound if in_pszRtpcName is NULL.
3099  /// - AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3100  /// \sa
3101  /// - \ref soundengine_rtpc
3102  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3104  AkRtpcID in_rtpcID, ///< ID of the game parameter
3105  AkRtpcValue in_value, ///< Value to set
3106  AkPlayingID in_playingID, ///< Associated playing ID
3107  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3108  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3109  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when, for example, loading a level and you don't want the values to interpolate.
3110  );
3111 
3112 #ifdef AK_SUPPORT_WCHAR
3113  /// Sets the value of a real-time parameter control (by Unicode string name).
3114  /// With this function, you may set a game parameter value on playing ID scope.
3115  /// Playing id scope supersedes both game object scope and global scope.
3116  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3117  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3118  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3119  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3120  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3121  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3122  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3123  /// - AK_Success if successful
3124  /// - AK_PlayingIDNotFound if in_playingID is not found.
3125  /// - AK_IDNotFound if in_pszRtpcName is NULL.
3126  /// - AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3127  /// \sa
3128  /// - \ref soundengine_rtpc
3129  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3131  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3132  AkRtpcValue in_value, ///< Value to set
3133  AkPlayingID in_playingID, ///< Associated playing ID
3134  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3135  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3136  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when, for example, loading a level and you don't want the values to interpolate.
3137  );
3138 #endif //AK_SUPPORT_WCHAR
3139 
3140  /// Sets the value of a real-time parameter control (by string name).
3141  /// With this function, you may set a game parameter value on playing id scope.
3142  /// Playing id scope supersedes both game object scope and global scope.
3143  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3144  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3145  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3146  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3147  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3148  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3149  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3150  /// - AK_Success if successful
3151  /// - AK_PlayingIDNotFound if in_playingID is not found.
3152  /// - AK_IDNotFound if in_pszRtpcName is NULL.
3153  /// - AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3154  /// \sa
3155  /// - \ref soundengine_rtpc
3156  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3158  const char* in_pszRtpcName, ///< Name of the game parameter
3159  AkRtpcValue in_value, ///< Value to set
3160  AkPlayingID in_playingID, ///< Associated playing ID
3161  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3162  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3163  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3164  );
3165 
3166  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3167  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3168  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3169  /// game objects that were not overridden with a value with game object scope.
3170  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3171  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3172  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3173  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3174  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3175  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3176  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3177  /// \return
3178  /// \sa
3179  /// - \ref soundengine_rtpc
3180  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3181  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3183  AkRtpcID in_rtpcID, ///< ID of the game parameter
3184  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3185  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3186  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3187  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3188  );
3189 
3190 #ifdef AK_SUPPORT_WCHAR
3191  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3192  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3193  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3194  /// game objects that were not overridden with a value with game object scope.
3195  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3196  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3197  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3198  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3199  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3200  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3201  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3202  /// \return
3203  /// - AK_Success if successful
3204  /// - AK_IDNotFound if in_pszParamName is NULL.
3205  /// \aknote Strings are case-insensitive. \endaknote
3206  /// \sa
3207  /// - \ref soundengine_rtpc
3208  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3210  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3211  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3212  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3213  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3214  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3215  );
3216 #endif //AK_SUPPORT_WCHAR
3217 
3218  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3219  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3220  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3221  /// game objects that were not overridden with a value with game object scope.
3222  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3223  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3224  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3225  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3226  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3227  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3228  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3229  /// \return
3230  /// - AK_Success if successful
3231  /// - AK_IDNotFound if in_pszParamName is NULL.
3232  /// \aknote Strings are case-insensitive. \endaknote
3233  /// \sa
3234  /// - \ref soundengine_rtpc
3235  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3237  const char* in_pszRtpcName, ///< Name of the game parameter
3238  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3239  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3240  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3241  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
3242  );
3243 
3244  /// Sets the State of a Switch Group (by IDs).
3245  /// \return Always returns AK_Success
3246  /// \sa
3247  /// - \ref soundengine_switch
3248  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3250  AkSwitchGroupID in_switchGroup, ///< ID of the Switch Group
3251  AkSwitchStateID in_switchState, ///< ID of the Switch
3252  AkGameObjectID in_gameObjectID ///< Associated game object ID
3253  );
3254 
3255 #ifdef AK_SUPPORT_WCHAR
3256  /// Sets the State of a Switch Group (by Unicode string names).
3257  /// \return
3258  /// - AK_Success if successful
3259  /// - AK_IDNotFound if the switch or Switch Group name was not resolved to an existing ID\n
3260  /// Make sure that the banks were generated with the "include string" option.
3261  /// \aknote Strings are case-insensitive. \endaknote
3262  /// \sa
3263  /// - \ref soundengine_switch
3265  const wchar_t* in_pszSwitchGroup, ///< Name of the Switch Group
3266  const wchar_t* in_pszSwitchState, ///< Name of the Switch
3267  AkGameObjectID in_gameObjectID ///< Associated game object ID
3268  );
3269 #endif //AK_SUPPORT_WCHAR
3270 
3271  /// Sets the state of a Switch Group.
3272  /// \return
3273  /// - AK_Success if successful
3274  /// - AK_IDNotFound if the switch or Switch Group name was not resolved to an existing ID\n
3275  /// Make sure that the banks were generated with the "include string" option.
3276  /// \aknote Strings are case-insensitive. \endaknote
3277  /// \sa
3278  /// - \ref soundengine_switch
3280  const char* in_pszSwitchGroup, ///< Name of the Switch Group
3281  const char* in_pszSwitchState, ///< Name of the Switch
3282  AkGameObjectID in_gameObjectID ///< Associated game object ID
3283  );
3284 
3285  /// Post the specified trigger (by IDs).
3286  /// \return Always returns AK_Success
3287  /// \sa
3288  /// - \ref soundengine_triggers
3289  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3291  AkTriggerID in_triggerID, ///< ID of the trigger
3292  AkGameObjectID in_gameObjectID ///< Associated game object ID
3293  );
3294 
3295 #ifdef AK_SUPPORT_WCHAR
3296  /// Posts the specified trigger (by Unicode string name).
3297  /// \return
3298  /// - AK_Success if successful
3299  /// - AK_IDNotFound if the trigger name was not resolved to an existing ID\n
3300  /// Make sure that the banks were generated with the "include string" option.
3301  /// \aknote Strings are case-insensitive. \endaknote
3302  /// \sa
3303  /// - \ref soundengine_triggers
3305  const wchar_t* in_pszTrigger, ///< Name of the trigger
3306  AkGameObjectID in_gameObjectID ///< Associated game object ID
3307  );
3308 #endif //AK_SUPPORT_WCHAR
3309 
3310  /// Posts the specified trigger.
3311  /// \return
3312  /// - AK_Success if successful
3313  /// - AK_IDNotFound if the trigger name was not resolved to an existing ID\n
3314  /// Make sure that the banks were generated with the "include string" option.
3315  /// \aknote Strings are case-insensitive. \endaknote
3316  /// \sa
3317  /// - \ref soundengine_triggers
3319  const char* in_pszTrigger, ///< Name of the trigger
3320  AkGameObjectID in_gameObjectID ///< Associated game object ID
3321  );
3322 
3323  /// Sets the state of a State Group (by IDs).
3324  /// \return Always returns AK_Success
3325  /// \sa
3326  /// - \ref soundengine_states
3327  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3329  AkStateGroupID in_stateGroup, ///< ID of the State Group
3330  AkStateID in_state ///< ID of the state
3331  );
3332 
3333 #ifdef AK_SUPPORT_WCHAR
3334  /// Sets the state of a State Group (by Unicode string names).
3335  /// \return
3336  /// - AK_Success if successful
3337  /// - AK_IDNotFound if the state or State Group name was not resolved to an existing ID\n
3338  /// Make sure that the banks were generated with the "include string" option.
3339  /// \aknote Strings are case-insensitive. \endaknote
3340  /// \sa
3341  /// - \ref soundengine_states
3342  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3344  const wchar_t* in_pszStateGroup, ///< Name of the State Group
3345  const wchar_t* in_pszState ///< Name of the state
3346  );
3347 #endif //AK_SUPPORT_WCHAR
3348 
3349  /// Sets the state of a State Group.
3350  /// \return
3351  /// - AK_Success if successful
3352  /// - AK_IDNotFound if the state or State Group name was not resolved to an existing ID\n
3353  /// Make sure that the banks were generated with the "include string" option.
3354  /// \aknote Strings are case-insensitive. \endaknote
3355  /// \sa
3356  /// - \ref soundengine_states
3357  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3359  const char* in_pszStateGroup, ///< Name of the State Group
3360  const char* in_pszState ///< Name of the state
3361  );
3362 
3363  //@}
3364 
3365  ////////////////////////////////////////////////////////////////////////
3366  /// @name Environments
3367  //@{
3368 
3369  /// Sets the Auxiliary Busses to route the specified game object
3370  /// To clear the game object's auxiliary sends, \c in_uNumSendValues must be 0.
3371  /// \sa
3372  /// - \ref soundengine_environments
3373  /// - \ref soundengine_environments_dynamic_aux_bus_routing
3374  /// - \ref soundengine_environments_id_vs_string
3375  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3376  /// \return
3377  /// - AK_Success if successful
3378  /// - AK_InvalidParameter if a duplicated environment is found in the array
3379  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
3381  AkGameObjectID in_gameObjectID, ///< Associated game object ID
3382  AkAuxSendValue* in_aAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
3383  ///< (it may be NULL if no environment must be set)
3384  AkUInt32 in_uNumSendValues ///< The number of auxiliary busses at the pointer's address
3385  ///< (it must be 0 if no environment is set)
3386  );
3387 
3388  /// Registers a callback to allow the game to modify or override the volume to be applied at the output of an audio bus.
3389  /// The callback must be registered once per bus ID.
3390  /// Call with <tt>in_pfnCallback = NULL</tt> to unregister.
3391  /// \aknote The bus in_busID needs to be a mixing bus.\endaknote
3392  /// \aknote The callback function will not be called for the Master Audio Bus, since the output of this bus is not a bus, but is instead an Audio Device.\endaknote
3393  /// \sa
3394  /// - \ref goingfurther_speakermatrixcallback
3395  /// - \ref soundengine_environments
3396  /// - AkSpeakerVolumeMatrixCallbackInfo
3397  /// - <tt>AK::IAkMixerInputContext</tt>
3398  /// - <tt>AK::IAkMixerPluginContext</tt>
3399  /// \return
3400  /// - AK_Success if successful
3401  /// - AK_IDNotFound if the bus is not found
3402  /// - AK_InsufficientMemory if there is not enough memory to complete the operation
3404  AkUniqueID in_busID, ///< Bus ID, as obtained by GetIDFromString( bus_name ).
3405  AkBusCallbackFunc in_pfnCallback, ///< Callback function.
3406  void* in_pCookie = NULL ///< User cookie.
3407  );
3408 
3409  /// Registers a callback to be called to allow the game to access metering data from any mixing bus. You may use this to monitor loudness at any point of the mixing hierarchy
3410  /// by querying the peak, RMS, True Peak and K-weighted power (according to loudness standard ITU BS.1770). See \ref goingfurther_speakermatrixcallback for an example.
3411  /// The callback must be registered once per bus ID.
3412  /// Call with in_pfnCallback = NULL to unregister.
3413  /// \aknote The bus in_busID needs to be a mixing bus.\endaknote
3414  /// \sa
3415  /// - \ref goingfurther_speakermatrixcallback
3416  /// - AkBusMeteringCallbackFunc
3417  /// - <tt>AK::IAkMetering</tt>
3418  /// \return
3419  /// - AK_Success if successful
3420  /// - AK_IDNotFound if the bus is not found
3421  /// - AK_InsufficientMemory if there is not enough memory to complete the operation
3423  AkUniqueID in_busID, ///< Bus ID, as obtained by GetIDFromString( bus_name ).
3424  AkBusMeteringCallbackFunc in_pfnCallback, ///< Callback function.
3425  AkMeteringFlags in_eMeteringFlags, ///< Metering flags.
3426  void* in_pCookie = NULL ///< User cookie.
3427  );
3428 
3429  /// Registers a callback to be called to allow the game to access metering data from any output device. You may use this to monitor loudness as sound leaves the Wwise sound engine
3430  /// by querying the peak, RMS, True Peak and K-weighted power (according to loudness standard ITU BS.1770). See \ref goingfurther_speakermatrixcallback for an example.
3431  /// The callback must be registered once per device shareset ID.
3432  /// Call with in_pfnCallback = NULL to unregister.
3433  /// \sa
3434  /// - \ref goingfurther_speakermatrixcallback
3435  /// - AkOutputDeviceMeteringCallbackFunc
3436  /// - <tt>AK::IAkMetering</tt>
3437  /// \return
3438  /// - AK_Success if successful
3439  /// - AK_DeviceNotFound if the device is not found
3440  /// - AK_InsufficientMemory if there is not enough memory to complete the operation
3442  AkOutputDeviceID in_idOutput, ///< Output ID, as returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
3443  AkOutputDeviceMeteringCallbackFunc in_pfnCallback, ///< Callback function.
3444  AkMeteringFlags in_eMeteringFlags, ///< Metering flags.
3445  void* in_pCookie = NULL ///< User cookie.
3446  );
3447 
3448  /// Sets the Output Bus Volume (direct) to be used for the specified game object.
3449  /// The control value is a number ranging from 0.0f to 1.0f.
3450  /// Output Bus Volumes are stored per listener association, so calling this function will override the default set of listeners. The game object in_emitterObjID will now reference its own set of listeners which will
3451  /// be the same as the old set of listeners, but with the new associated gain. Future changes to the default listener set will not be picked up by this game object unless ResetListenersToDefault() is called.
3452  /// \sa
3453  /// - \ref AK::SoundEngine::ResetListenersToDefault
3454  /// - \ref soundengine_environments
3455  /// - \ref soundengine_environments_setting_dry_environment
3456  /// - \ref soundengine_environments_id_vs_string
3457  /// \return
3458  /// - AK_Success when successful
3459  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
3461  AkGameObjectID in_emitterObjID, ///< Associated emitter game object ID
3462  AkGameObjectID in_listenerObjID, ///< Associated listener game object ID. Pass AK_INVALID_GAME_OBJECT to set the Output Bus Volume for all connected listeners.
3463  AkReal32 in_fControlValue ///< A multiplier in the range [0.0f:16.0f] ( -∞ dB to +24 dB).
3464  ///< A value greater than 1.0f will amplify the sound.
3465  );
3466 
3467  /// Sets an Effect ShareSet at the specified audio node and Effect slot index.
3468  /// The target node cannot be a Bus, to set effects on a bus, use SetBusEffect() instead.
3469  /// \aknote The option "Override Parent" in
3470  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's effect will
3471  /// still be the one in use and the call to SetActorMixerEffect will have no impact.
3472  /// \endaknote
3473  /// \return Always returns AK_Success
3475  AkUniqueID in_audioNodeID, ///< Can be a member of the Actor-Mixer or Interactive Music Hierarchy (not a bus).
3476  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3477  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
3478  );
3479 
3480  /// Sets an Effect ShareSet at the specified bus and Effect slot index.
3481  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
3482  /// This adds a reference on the audio node to an existing ShareSet.
3483  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
3484  /// Bus which does not have any Effects, or removing the last Effect on a currently playing bus.
3485  /// \endaknote
3486  /// \aknote This function will replace existing Effects on the node. If the target node is not at
3487  /// the top of the hierarchy and is in the actor-mixer hierarchy, the option "Override Parent" in
3488  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
3489  /// still be the one in use and the call to SetBusEffect will have no impact.
3490  /// \endaknote
3491  /// \return Always returns AK_Success
3493  AkUniqueID in_audioNodeID, ///< Bus Short ID.
3494  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3495  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the Effect slot
3496  );
3497 
3498 #ifdef AK_SUPPORT_WCHAR
3499  /// Sets an Effect ShareSet at the specified Bus and Effect slot index.
3500  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
3501  /// This adds a reference on the audio node to an existing ShareSet.
3502  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
3503  /// bus which does not have any Effects, or removing the last Effect on a currently playing Bus.
3504  /// \endaknote
3505  /// \aknote This function will replace existing Effects on the node. If the target node is not at
3506  /// the top of the hierarchy and is in the Actor-Mixer Hierarchy, the option "Override Parent" in
3507  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
3508  /// still be the one in use and the call to \c SetBusEffect will have no impact.
3509  /// \endaknote
3510  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3512  const wchar_t* in_pszBusName, ///< Bus name
3513  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3514  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
3515  );
3516 #endif //AK_SUPPORT_WCHAR
3517 
3518  /// Sets an Effect ShareSet at the specified Bus and Effect slot index.
3519  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
3520  /// This adds a reference on the audio node to an existing ShareSet.
3521  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
3522  /// Bus which does not have any effects, or removing the last Effect on a currently playing bus.
3523  /// \endaknote
3524  /// \aknote This function will replace existing Effects on the node. If the target node is not at
3525  /// the top of the hierarchy and is in the Actor-Mixer Hierarchy, the option "Override Parent" in
3526  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
3527  /// still be the one in use and the call to SetBusEffect will have no impact.
3528  /// \endaknote
3529  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3531  const char* in_pszBusName, ///< Bus name
3532  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3533  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
3534  );
3535 
3536  /// Sets an audio device effect shareset on the specified output device and effect slot index.
3537  /// \aknote This function will replace existing effects of the audio device shareset. \endaknote
3538  /// \aknote Audio device effects support is limited to one shareset per plug-in type at any time. \endaknote
3539  /// \aknote Monitor errors are reported in the Wwise Capture Log if the effect cannot be set on the output device. \endaknote
3540  /// \returns Always returns AK_Success.
3542  AkOutputDeviceID in_outputDeviceID, ///< Output ID, as returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
3543  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3544  AkUniqueID in_FXShareSetID ///< Effect ShareSet ID; pass AK_INVALID_UNIQUE_ID to use the effect from the Audio Device ShareSet.
3545  );
3546 
3547  /// Sets a Mixer ShareSet at the specified bus.
3548  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
3549  /// Bus which does not have any Effects or mixer, or removing the last mixer on a currently playing Bus.
3550  /// \endaknote
3551  /// \aknote This function will replace existing mixers on the node.
3552  /// \endaknote
3553  /// \return Always returns AK_Success
3555  AkUniqueID in_audioNodeID, ///< Bus Short ID.
3556  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
3557  );
3558 
3559 #ifdef AK_SUPPORT_WCHAR
3560  /// Sets a Mixer ShareSet at the specified bus.
3561  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
3562  /// bus which does not have any effects nor mixer, or removing the last mixer on a currently playing bus.
3563  /// \endaknote
3564  /// \aknote This function will replace existing mixers on the node.
3565  /// \endaknote
3566  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3568  const wchar_t* in_pszBusName, ///< Bus name
3569  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
3570  );
3571 #endif //AK_SUPPORT_WCHAR
3572 
3573  /// Sets a Mixer ShareSet at the specified bus.
3574  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
3575  /// bus which does not have any effects nor mixer, or removing the last mixer on a currently playing bus.
3576  /// \endaknote
3577  /// \aknote This function will replace existing mixers on the node.
3578  /// \endaknote
3579  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3581  const char* in_pszBusName, ///< Bus name
3582  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
3583  );
3584 
3585  /// Forces channel configuration for the specified bus.
3586  /// \aknote You cannot change the configuration of the master bus.\endaknote
3587  ///
3588  /// \return Always returns AK_Success
3590  AkUniqueID in_audioNodeID, ///< Bus Short ID.
3591  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
3592  );
3593 
3594 #ifdef AK_SUPPORT_WCHAR
3595  /// Forces channel configuration for the specified bus.
3596  /// \aknote You cannot change the configuration of the master bus.\endaknote
3597  ///
3598  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3600  const wchar_t* in_pszBusName, ///< Bus name
3601  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
3602  );
3603 #endif //AK_SUPPORT_WCHAR
3604 
3605  /// Forces channel configuration for the specified bus.
3606  /// \aknote You cannot change the configuration of the master bus.\endaknote
3607  ///
3608  /// \returns AK_IDNotFound is name not resolved, returns AK_Success otherwise.
3610  const char* in_pszBusName, ///< Bus name
3611  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
3612  );
3613 
3614  /// Sets a game object's obstruction and occlusion levels. If SetMultiplePositions were used, values are set for all positions.
3615  /// This function is used to affect how an object should be heard by a specific listener.
3616  /// \sa
3617  /// - \ref soundengine_obsocc
3618  /// - \ref soundengine_environments
3619  /// \return Always returns AK_Success
3621  AkGameObjectID in_EmitterID, ///< Emitter game object ID
3622  AkGameObjectID in_ListenerID, ///< Listener game object ID
3623  AkReal32 in_fObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
3624  AkReal32 in_fOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
3625  );
3626 
3627  /// Sets a game object's obstruction and occlusion level for each positions defined by SetMultiplePositions.
3628  /// This function differs from SetObjectObstructionAndOcclusion as a list of obstruction/occlusion pair is provided
3629  /// and each obstruction/occlusion pair will affect the corresponding position defined at the same index.
3630  /// \aknote In the case the number of obstruction/occlusion pairs is smaller than the number of positions, remaining positions'
3631  /// obstrucion/occlusion values are set to 0.0. \endaknote
3632  /// \sa
3633  /// - \ref soundengine_obsocc
3634  /// - \ref soundengine_environments
3635  /// \return AK_Success if occlusion/obstruction values are successfully stored for this emitter
3637  AkGameObjectID in_EmitterID, ///< Emitter game object ID
3638  AkGameObjectID in_uListenerID, ///< Listener game object ID
3639  AkObstructionOcclusionValues* in_fObstructionOcclusionValues, ///< Array of obstruction/occlusion pairs to apply
3640  ///< ObstructionLevel: [0.0f..1.0f]
3641  ///< OcclusionLevel: [0.0f..1.0f]
3642  AkUInt32 in_uNumOcclusionObstruction ///< Number of obstruction/occlusion pairs specified in the provided array
3643  );
3644 
3645  /// Saves the playback history of container structures.
3646  /// This function will write history data for all currently loaded containers and instantiated game
3647  /// objects (for example, current position in Sequence Containers and previously played elements in
3648  /// Random Containers).
3649  /// \remarks
3650  /// This function acquires the main audio lock, and may block the caller for several milliseconds.
3651  /// \sa
3652  /// - <tt>AK::SoundEngine::SetContainerHistory()</tt>
3654  AK::IWriteBytes * in_pBytes ///< Pointer to IWriteBytes interface used to save the history.
3655  );
3656 
3657  /// Restores the playback history of container structures.
3658  /// This function will read history data from the passed-in stream reader interface, and apply it to all
3659  /// currently loaded containers and instantiated game objects. Game objects are matched by
3660  /// ID. History for unloaded structures and unknown game objects will be skipped.
3661  /// \remarks
3662  /// This function acquires the main audio lock, and may block the caller for several milliseconds.
3663  /// \sa
3664  /// - <tt>AK::SoundEngine::GetContainerHistory()</tt>
3666  AK::IReadBytes * in_pBytes ///< Pointer to IReadBytes interface used to load the history.
3667  );
3668 
3669  //@}
3670 
3671  ////////////////////////////////////////////////////////////////////////
3672  /// @name Capture
3673  //@{
3674 
3675  /// Starts recording the sound engine audio output.
3676  /// StartOutputCapture outputs a wav file per current output device of the sound engine.
3677  /// If more than one device is active, the system will create multiple files in the same output
3678  /// directory and will append numbers at the end of the provided filename.
3679  ///
3680  /// If no device is running yet, the system will return success AK_Success despite doing nothing.
3681  /// Use RegisterAudioDeviceStatusCallback to get notified when devices are created/destructed.
3682  ///
3683  /// \return AK_Success if successful, AK_Fail if there was a problem starting the output capture.
3684  /// \remark
3685  /// - The sound engine opens a stream for writing using <tt>AK::IAkStreamMgr::CreateStd()</tt>. If you are using the
3686  /// default implementation of the Stream Manager, file opening is executed in your implementation of
3687  /// the Low-Level IO interface <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>. The following
3688  /// AkFileSystemFlags are passed: uCompanyID = AKCOMPANYID_AUDIOKINETIC and uCodecID = AKCODECID_PCM,
3689  /// and the AkOpenMode is AK_OpenModeWriteOvrwr. Refer to \ref streamingmanager_lowlevel_location for
3690  /// more details on managing the deployment of your Wwise generated data.
3691  /// \sa
3692  /// - <tt>AK::SoundEngine::StopOutputCapture()</tt>
3693  /// - <tt>AK::StreamMgr::SetFileLocationResolver()</tt>
3694  /// - \ref streamingdevicemanager
3695  /// - \ref streamingmanager_lowlevel_location
3696  /// - RegisterAudioDeviceStatusCallback
3698  const AkOSChar* in_CaptureFileName ///< Name of the output capture file
3699  );
3700 
3701  /// Stops recording the sound engine audio output.
3702  /// \return AK_Success if successful, AK_Fail if there was a problem stopping the output capture.
3703  /// \sa
3704  /// - <tt>AK::SoundEngine::StartOutputCapture()</tt>
3706 
3707  /// Adds text marker in audio output file.
3708  /// \return AK_Success if successful, AK_Fail if there was a problem adding the output marker.
3709  /// \sa
3710  /// - <tt>AK::SoundEngine::StartOutputCapture()</tt>
3712  const char* in_MarkerText ///< Text of the marker
3713  );
3714 
3715  /// Gets the system sample rate.
3716  /// \return The sample rate.
3718 
3719  /// Registers a callback used for retrieving audio samples.
3720  /// The callback will be called from the audio thread during real-time rendering and from the main thread during offline rendering.
3721  /// \sa
3722  /// - <tt>AK::SoundEngine::AddOutput()</tt>
3723  /// - <tt>AK::SoundEngine::GetOutputID()</tt>
3724  /// - <tt>AK::SoundEngine::UnregisterCaptureCallback()</tt>
3726  AkCaptureCallbackFunc in_pfnCallback, ///< Capture callback function to register.
3727  AkOutputDeviceID in_idOutput = AK_INVALID_OUTPUT_DEVICE_ID, ///< The audio device specific id, return by AK::SoundEngine::AddOutput or AK::SoundEngine::GetOutputID
3728  void* in_pCookie = NULL ///< Callback cookie that will be sent to the callback function along with additional information
3729  );
3730 
3731  /// Unregisters a callback used for retrieving audio samples.
3732  /// \sa
3733  /// - <tt>AK::SoundEngine::AddOutput()</tt>
3734  /// - <tt>AK::SoundEngine::GetOutputID()</tt>
3735  /// - <tt>AK::SoundEngine::RegisterCaptureCallback()</tt>
3737  AkCaptureCallbackFunc in_pfnCallback, ///< Capture callback function to unregister.
3738  AkOutputDeviceID in_idOutput = AK_INVALID_OUTPUT_DEVICE_ID, ///< The audio device specific id, return by AK::SoundEngine::AddOutput or AK::SoundEngine::GetOutputID
3739  void* in_pCookie = NULL ///< Callback cookie that will be sent to the callback function along with additional information
3740  );
3741 
3742  /// Starts recording the sound engine profiling information into a file. This file can be read
3743  /// by Wwise Authoring. Note that this profiling session will record all data types possible.
3744  /// \remark This function is provided as a utility tool only. It does nothing if it is
3745  /// called in the release configuration and returns AK_NotCompatible.
3747  const AkOSChar* in_CaptureFileName ///< Name of the output profiler file (.prof extension recommended)
3748  );
3749 
3750  /// Stops recording the sound engine profiling information.
3751  /// \remark This function is provided as a utility tool only. It does nothing if it is
3752  /// called in the release configuration and returns AK_NotCompatible.
3754 
3755  //@}
3756 
3757  ////////////////////////////////////////////////////////////////////////
3758  /// @name Offline Rendering
3759  //@{
3760 
3761  /// Sets the offline rendering frame time in seconds.
3762  /// When offline rendering is enabled, every call to \ref RenderAudio() will generate sample data as if this much time has elapsed. If the frame time argument is less than or equal to zero, every call to RenderAudio() will generate one audio buffer.
3763  /// \return Always returns AK_Success
3765  AkReal32 in_fFrameTimeInSeconds ///< frame time in seconds used during offline rendering
3766  );
3767 
3768  /// Enables/disables offline rendering.
3769  /// \return Always returns AK_Success
3771  bool in_bEnableOfflineRendering ///< enables/disables offline rendering
3772  );
3773 
3774  //@}
3775 
3776  ////////////////////////////////////////////////////////////////////////
3777  /// @name Secondary Outputs
3778  //@{
3779 
3780  /// Adds an output to the sound engine. Use this to add controller-attached headphones, controller speakers, DVR output, etc.
3781  /// The in_Settings parameter contains an Audio Device shareset to specify the output plugin to use and a device ID to specify the instance, if necessary (e.g. which game controller).
3782  ///
3783  /// Like most functions of AK::SoundEngine, AddOutput is asynchronous. A successful return code merely indicates that the request is properly queued.
3784  /// Error codes returned by this function indicate various invalid parameters. To know if this function succeeds or not, and the failure code,
3785  /// register an AkDeviceStatusCallbackFunc callback with RegisterAudioDeviceStatusCallback.
3786  ///
3787  /// \sa AkOutputSettings for more details.
3788  /// \sa \ref integrating_secondary_outputs
3789  /// \sa \ref default_audio_devices
3790  /// \sa AK::SoundEngine::RegisterAudioDeviceStatusCallback
3791  /// \sa AK::AkDeviceStatusCallbackFunc
3792  /// \return
3793  /// The following codes are returned directly from the function, as opposed to the AkDeviceStatusCallback
3794  /// - AK_NotImplemented: Feature not supported, some platforms don't have other outputs.
3795  /// - AK_InvalidParameter: Out of range parameters or unsupported parameter combinations (see parameter list below).
3796  /// - AK_IDNotFound: The audioDeviceShareset on in_settings doesn't exist. Possibly, the Init bank isn't loaded yet or was not updated with latest changes.
3797  /// - AK_DeviceNotReady: The idDevice on in_settings doesn't match with a valid hardware device. Either the device doesn't exist or is disabled. Disconnected devices (headphones) are not considered "not ready" therefore won't cause this error.
3798  /// - AK_Success: Parameters are valid.
3799  ///
3800  /// The following codes are returned from the callback.
3801  /// - AK_InsufficientMemory : Not enough memory to complete the operation.
3802  /// - AK_IDNotFound: The audioDeviceShareset on in_settings doesn't exist. Possibly, the Init bank isn't loaded yet or was not updated with latest changes.
3803  /// - AK_PluginNotRegistered: The audioDeviceShareset exists but the plug-in it refers to is not installed or statically linked with the game.
3804  /// - AK_NotCompatible: The hardware does not support this type of output. Wwise will try to use the System output instead, and a separate callback will fire when that completes.
3805  /// - AK_DeviceNotCompatible: The hardware does not support this type of output. Wwise will NOT fallback to any other type of output.
3806  /// - AK_Fail: Generic code for any non-permanent conditions (e.g. disconnection) that prevent the use of the output. Wwise has created the output and sounds will be routed to it, but this output is currently silent until the temporary condition resolves.
3807  /// - AK_NoDistinctListener: Outputs of the same type (same ShareSet, like controller speakers) must have distinct Listeners to make a proper routing. This doesn't happen if there is only one output of that type.
3809  const AkOutputSettings & in_Settings, ///< Creation parameters for this output. \ref AkOutputSettings
3810  AkOutputDeviceID *out_pDeviceID = NULL, ///< (Optional) Output ID to use with all other Output management functions. Leave to NULL if not required. \ref AK::SoundEngine::GetOutputID
3811  const AkGameObjectID* in_pListenerIDs = NULL, ///< Specific listener(s) to attach to this device.
3812  ///< If specified, only the sounds routed to game objects linked to those listeners will play in this device.
3813  ///< It is necessary to have separate listeners if multiple devices of the same type can coexist (e.g. controller speakers)
3814  ///< If not specified, sound routing simply obey the associations between Master Busses and Audio Devices setup in the Wwise Project.
3815  AkUInt32 in_uNumListeners = 0 ///< The number of elements in the in_pListenerIDs array.
3816  );
3817 
3818  /// Removes one output added through AK::SoundEngine::AddOutput
3819  /// If a listener was associated with the device, you should consider unregistering the listener prior to call RemoveOutput
3820  /// so that Game Object/Listener routing is properly updated according to your game scenario.
3821  /// \sa \ref integrating_secondary_outputs
3822  /// \sa AK::SoundEngine::AddOutput
3823  /// \return AK_Success: Parameters are valid.
3825  AkOutputDeviceID in_idOutput ///< ID of the output to remove. Use the returned ID from AddOutput, GetOutputID, or ReplaceOutput
3826  );
3827 
3828  /// Replaces an output device previously created during engine initialization or from AddOutput, with a new output device.
3829  /// In addition to simply removing one output device and adding a new one, the new output device will also be used on all of the master buses
3830  /// that the old output device was associated with, and preserve all listeners that were attached to the old output device.
3831  ///
3832  /// Like most functions of AK::SoundEngine, AddOutput is asynchronous. A successful return code merely indicates that the request is properly queued.
3833  /// Error codes returned by this function indicate various invalid parameters. To know if this function succeeds or not, and the failure code,
3834  /// register an AkDeviceStatusCallbackFunc callback with RegisterAudioDeviceStatusCallback.
3835  ///
3836  /// \sa AK::SoundEngine::AddOutput
3837  /// \sa AK::SoundEngine::RegisterAudioDeviceStatusCallback
3838  /// \sa AK::AkDeviceStatusCallbackFunc
3839  /// \return
3840  /// - AK_InvalidID: The audioDeviceShareset on in_settings was not valid.
3841  /// - AK_IDNotFound: The audioDeviceShareset on in_settings doesn't exist. Possibly, the Init bank isn't loaded yet or was not updated with latest changes.
3842  /// - AK_DeviceNotReady: The idDevice on in_settings doesn't match with a valid hardware device. Either the device doesn't exist or is disabled. Disconnected devices (headphones) are not considered "not ready" therefore won't cause this error.
3843  /// - AK_DeviceNotFound: The in_outputDeviceId provided does not match with any of the output devices that the sound engine is currently using.
3844  /// - AK_InvalidParameter: Out of range parameters or unsupported parameter combinations on in_settings
3845  /// - AK_Success: parameters were valid, and the remove and add will occur.
3847  const AkOutputSettings & in_Settings, ///< Creation parameters for this output. \ref AkOutputSettings
3848  AkOutputDeviceID in_outputDeviceId, ///< AkOutputDeviceID of the output to replace. Use 0 to target the current main output, regardless of its id. Otherwise, use the AkOuptutDeviceID returned from AddOutput() or ReplaceOutput(), or generated by GetOutputID()
3849  AkOutputDeviceID *out_pOutputDeviceId = NULL ///< (Optional) Pointer into which the method writes the AkOutputDeviceID of the new output device. If the call fails, the value pointed to will not be modified.
3850  );
3851 
3852  /// Gets the compounded output ID from shareset and device id.
3853  /// Outputs are defined by their type (Audio Device shareset) and their specific system ID. A system ID could be reused for other device types on some OS or platforms, hence the compounded ID.
3854  /// Use 0 for in_idShareset & in_idDevice to get the Main Output ID (the one usually initialized during AK::SoundEngine::Init)
3855  /// \return The id of the output
3857  AkUniqueID in_idShareset, ///< Audio Device ShareSet ID, as defined in the Wwise Project. If needed, use AK::SoundEngine::GetIDFromString() to convert from a string. Set to AK_INVALID_UNIQUE_ID to use the default.
3858  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
3859  ///< - PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
3860  ///< - XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
3861  ///< - Windows: Use AK::GetDeviceID or AK::GetDeviceIDFromName to get the correct ID.
3862  ///< - All others output: use 0 to select the default device for that type.
3863  );
3864 
3866  const char* in_szShareSet, ///< Audio Device ShareSet Name, as defined in the Wwise Project. If Null, will select the Default Output shareset (always available)
3867  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
3868  ///< - PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
3869  ///< - XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
3870  ///< - Windows: Use AK::GetDeviceID or AK::GetDeviceIDFromName to get the correct ID.
3871  ///< - All others output: use 0 to select the default device for that type.
3872  );
3873 
3874  #ifdef AK_SUPPORT_WCHAR
3876  const wchar_t* in_szShareSet, ///< Audio Device ShareSet Name, as defined in the Wwise Project. If Null, will select the Default Output shareset (always available)
3877  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
3878  ///< - PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
3879  ///< - XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
3880  ///< - Windows: Use AK::GetDeviceID or AK::GetDeviceIDFromName to get the correct ID.
3881  ///< - All others output: use 0 to select the default device for that type.
3882  );
3883  #endif
3884 
3885  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
3886  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
3887  /// SetBusDevice must be preceded by a call to AddOutput for the new device shareset to be registered as an output.
3888  /// \return
3889  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
3890  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
3892  AkUniqueID in_idBus, ///< Id of the master bus
3893  AkUniqueID in_idNewDevice ///< New device shareset to replace with.
3894  );
3895 
3896  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
3897  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
3898  /// SetBusDevice must be preceded by a call to AddOutput for the new device shareset to be registered as an output.
3899  /// \return
3900  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
3901  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
3903  const char* in_BusName, ///< Name of the master bus
3904  const char* in_DeviceName ///< New device shareset to replace with.
3905  );
3906 
3907  #ifdef AK_SUPPORT_WCHAR
3908  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
3909  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
3910  /// SetBusDevice must be preceded by a call to AddOutput for the new device shareset to be registered as an output.
3911  /// \return
3912  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
3913  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
3915  const wchar_t* in_BusName, ///< Name of the master bus
3916  const wchar_t* in_DeviceName ///< New device shareset to replace with.
3917  );
3918  #endif
3919 
3920  /// Returns a listing of the current devices for a given sink plug-in, including Device ID, friendly name, and state.
3921  /// This call is only valid for sink plug-ins that support device enumeration.
3922  /// Prerequisites: the plug-in must have been initialized by loading the init bank or by calling \ref AK::SoundEngine::RegisterPlugin.
3923  /// \return
3924  /// AK_NotImplemented if the sink plug-in does not implement device enumeration
3925  /// AK_PluginNotRegistered if the plug-in has not been registered yet either by loading the init bank or by calling RegisterPluginDLL.
3927  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
3928  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
3929  AkUInt32& io_maxNumDevices, ///< In: The length of the out_deviceDescriptions array. Out: If out_deviceDescriptions is not-null, this will be set to the number of entries in out_deviceDescriptions that was populated. If out_deviceDescriptions is null, this will be set to the number of devices that may be available.
3930  AkDeviceDescription* out_deviceDescriptions ///< The output array of device descriptions.
3931  );
3932 
3933  /// Returns a listing of the current devices for a given sink plug-in, including Device ID, friendly name, and state.
3934  /// This call is only valid for sink plug-ins that support device enumeration.
3935  /// Prerequisites:
3936  /// * The plug-in must have been initialized by loading the init bank or by calling \ref AK::SoundEngine::RegisterPlugin.
3937  /// * The audio device shareset must have been loaded from a soundbank and a device with this shareset must exist in the pipeline.
3938  /// \return
3939  /// AK_NotImplemented if the sink plug-in does not implement device enumeration
3940  /// AK_PluginNotRegistered if the plug-in has not been registered yet either by loading the init bank or by calling RegisterPluginDLL.
3942  AkUniqueID in_audioDeviceShareSetID, ///< In: The audio device shareset ID for which to list the sink plug-in devices.
3943  AkUInt32& io_maxNumDevices, ///< In: The length of the out_deviceDescriptions array. Out: If out_deviceDescriptions is not-null, this will be set to the number of entries in out_deviceDescriptions that was populated. If out_deviceDescriptions is null, this will be set to the number of devices that may be available.
3944  AkDeviceDescription* out_deviceDescriptions ///< The output array of device descriptions.
3945  );
3946 
3947  /// Sets the volume of a output device.
3948  /// \return
3949  /// - AK_Success if successful
3950  /// - AK_InvalidFloatValue if the value specified was NaN or Inf
3952  AkOutputDeviceID in_idOutput, ///< Output ID to set the volume on. As returned from AddOutput or GetOutputID
3953  AkReal32 in_fVolume ///< Volume (0.0 = Muted, 1.0 = Volume max)
3954  );
3955 
3956  /// Returns whether or not the audio device matching the device ID provided supports spatial audio (i.e. the functionality is enabled, and more than 0 dynamic objects are supported).
3957  /// If Spatial Audio is supported, then you can call Init, AddOutput, or ReplaceOutput with an Audio Device Shareset corresponding to the respective platform-specific plug-in that
3958  /// provides spatial audio, such as the Microsoft Spatial Sound Platform for Windows. Note that on Xbox One, you need to call EnableSpatialAudio() before the sound engine is
3959  /// initialized, or initialize the sound engine with AkPlatformInitSettings::bEnableSpatialAudio set to true if you want spatial audio support; otherwise this will always return AK_NotCompatible.
3960  /// \return
3961  /// AK_NotCompatible when the device ID provided does not support spatial audio, or the platform does not support spatial audio
3962  /// AK_Fail when there is some other miscellaneous failure, or the device ID provided does not match a device that the system knows about
3963  /// AK_Success when the device ID provided does support spatial audio
3965  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
3966  ///< - PS4 Controller-Speakers: UserID as returned from sceUserServiceGetLoginUserIdList
3967  ///< - XBoxOne Controller-Headphones: Use the AK::GetDeviceID function to get the ID from an IMMDevice. Find the player's device with the WASAPI API (IMMDeviceEnumerator, see Microsoft documentation) or use AK::GetDeviceIDFromName.
3968  ///< - Windows: Use AK::GetDeviceID or AK::GetDeviceIDFromName to get the correct ID.
3969  ///< - All others output: use 0 to select the default device for that type.
3970  );
3971 
3972 
3973  //@}
3974 
3975  /// This function should be called to put the sound engine in background mode, where audio isn't processed anymore. This needs to be called if the console has a background mode or some suspended state.
3976  /// Call \c WakeupFromSuspend when your application receives the message from the OS that the process is back in foreground.
3977  /// When suspended, the sound engine will process API messages (like PostEvent and SetSwitch) only when \ref RenderAudio() is called.
3978  /// It is recommended to match the <b>in_bRenderAnyway</b> parameter with the behavior of the rest of your game:
3979  /// if your game still runs in background and you must keep some kind of coherent state between the audio engine and game, then allow rendering.
3980  /// If you want to minimize CPU when in background, then don't allow rendering and never call RenderAudio from the game.
3981  ///
3982  /// Consult \ref workingwithsdks_system_calls to learn when it is appropriate to call this function for each platform.
3983  /// \sa WakeupFromSuspend
3984  /// \sa \ref workingwithsdks_system_calls
3986  bool in_bRenderAnyway = false /// If set to true, audio processing will still occur, but not outputted. When set to false, no audio will be processed at all, even upon reception of RenderAudio().
3987  );
3988 
3989  /// This function should be called to wake up the sound engine and start processing audio again. This needs to be called if the console has a background mode or some suspended state.
3990  ///
3991  /// Consult \ref workingwithsdks_system_calls to learn when it is appropriate to call this function for each platform.
3992  /// \sa Suspend
3993  /// \sa \ref workingwithsdks_system_calls
3995 
3996  /// Obtains the current audio output buffer tick. This corresponds to the number of buffers produced by
3997  /// the sound engine since initialization.
3998  /// \return Tick count.
4000 
4001  /// Obtains the current audio output sample tick. This corresponds to the number of sapmles produced by
4002  /// the sound engine since initialization.
4003  /// \return Sample count.
4005  }
4006 }
4007 
4008 #endif // _AK_SOUNDENGINE_H_
AkOutputSettings settingsMainOutput
Main output device settings.
Definition: AkSoundEngine.h:219
AKSOUNDENGINE_API AKRESULT RegisterPluginDLL(const AkOSChar *in_DllName, const AkOSChar *in_DllPath=NULL)
float AkReal32
32-bit floating point
Definition: AkTypes.h:70
AkUInt32 uMonitorQueuePoolSize
Size of the monitoring queue, in bytes. This parameter is not used in Release build.
Definition: AkSoundEngine.h:217
AkUInt32 AkStateGroupID
State group ID.
Definition: AkTypes.h:59
MultiPositionType
Definition: AkTypes.h:760
AKSOUNDENGINE_API AKRESULT RemoveDefaultListener(AkGameObjectID in_listenerGameObj)
AKSOUNDENGINE_API AKRESULT PrepareEvent(PreparationType in_PreparationType, const char **in_ppszString, AkUInt32 in_uNumEvent)
AKSOUNDENGINE_API AkUInt32 GetSampleRate()
AKSOUNDENGINE_API AKRESULT SetRTPCValue(AkRtpcID in_rtpcID, AkRtpcValue in_value, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkTimeMs in_uValueChangeDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear, bool in_bBypassInternalValueInterpolation=false)
AKSOUNDENGINE_API AKRESULT SetOutputDeviceEffect(AkOutputDeviceID in_outputDeviceID, AkUInt32 in_uFXIndex, AkUniqueID in_FXShareSetID)
AKSOUNDENGINE_API AKRESULT SetSpeakerAngles(const AkReal32 *in_pfSpeakerAngles, AkUInt32 in_uNumAngles, AkReal32 in_fHeightAngle, AkOutputDeviceID in_idOutput=0)
Audiokinetic namespace.
AkInt32 AkTimeMs
Time in ms.
Definition: AkTypes.h:61
AkBackgroundMusicChangeCallbackFunc BGMCallback
Application-defined audio source change event callback function.
Definition: AkSoundEngine.h:225
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:609