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

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise