Table of Contents

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