버전

menu_open
Wwise SDK 2022.1.18
AkSoundEngine.h
이 파일의 문서화 페이지로 가기
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Copyright (c) 2024 Audiokinetic Inc.
25 *******************************************************************************/
26 
27 // AkSoundEngine.h
28 
29 /// \file
30 /// The main sound engine interface.
31 
32 
33 #ifndef _AK_SOUNDENGINE_H_
34 #define _AK_SOUNDENGINE_H_
35 
40 
41 #ifdef AK_WIN
44 
45 #elif defined (AK_MAC_OS_X)
48 
49 #elif defined (AK_IOS)
52 
53 #elif defined(AK_XBOXGC) // Gaming.Xbox platform
56 
57 #elif defined (AK_XBOXONE)
60 
61 #elif defined( AK_LUMIN )
62 #include <AK/SoundEngine/Platforms/Lumin/AkLuminSoundEngine.h>
63 #include <AK/SoundEngine/Platforms/Lumin/AkPlatformContext.h>
64 
65 #elif defined( AK_ANDROID )
68 
69 #elif defined( AK_HARMONY )
72 
73 #elif defined (AK_PS4)
76 
77 #elif defined (AK_PS5)
80 
81 #elif defined( AK_GGP )
84 
85 #elif defined( AK_LINUX_DESKTOP )
88 
89 #elif defined( AK_EMSCRIPTEN )
90 #include <AK/SoundEngine/Platforms/Emscripten/AkEmscriptenSoundEngine.h>
91 #include <AK/SoundEngine/Platforms/Emscripten/AkPlatformContext.h>
92 
93 #elif defined( AK_QNX )
94 #include <AK/SoundEngine/Platforms/QNX/AkQNXSoundEngine.h>
95 #include <AK/SoundEngine/Platforms/QNX/AkPlatformContext.h>
96 
97 #elif defined( AK_NX )
100 
101 #else
102 #error AkSoundEngine.h: Undefined platform
103 #endif
104 
105 #ifndef AK_ASSERT_HOOK
106  /// Function called on assert handling, optional
107  /// \sa
108  /// - AkInitSettings
110  const char * in_pszExpression, ///< Expression
111  const char * in_pszFileName, ///< File Name
112  int in_lineNumber ///< Line Number
113  );
114  #define AK_ASSERT_HOOK
115 #endif
116 
117 /// Callback function prototype for User Music notifications
118 /// It is useful for reacting to user music playback.
119 ///
120 /// \sa
121 /// - \ref AkGlobalCallbackFunc
122 /// - \ref AkPlatformInitSettings
123 /// - \ref background_music_and_dvr
124 ///
126  bool in_bBackgroundMusicMuted, ///< Flag indicating whether the busses tagged as "background music" in the project are muted or not.
127  void* in_pCookie ///< User-provided data, e.g. a user structure.
128  );
129 
130 /// Platform-independent initialization settings of output devices.
132 {
135  idDevice(0),
137  channelConfig(){};
138 
139  AkOutputSettings(const char* in_szDeviceShareSet, AkUniqueID in_idDevice = AK_INVALID_UNIQUE_ID, AkChannelConfig in_channelConfig = AkChannelConfig(), AkPanningRule in_ePanning = AkPanningRule_Speakers);
140 
141 #ifdef AK_SUPPORT_WCHAR
142  AkOutputSettings(const wchar_t* in_szDeviceShareSet, AkUniqueID in_idDevice = AK_INVALID_UNIQUE_ID, AkChannelConfig in_channelConfig = AkChannelConfig(), AkPanningRule in_ePanning = AkPanningRule_Speakers);
143 #endif
144 
145  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.
146  ///< 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).
147  ///< Typical usage: AkInitSettings.eOutputSettings.audioDeviceShareset = AK::SoundEngine::GetIDFromString("InsertYourAudioDeviceSharesetNameHere");
148  /// \sa <tt>\ref AK::SoundEngine::GetIDFromString()</tt>
149  /// \sa \ref soundengine_plugins_audiodevices
150  /// \sa \ref integrating_secondary_outputs
151  /// \sa \ref default_audio_devices
152 
153  AkUInt32 idDevice; ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
154  /// \sa \ref obtaining_device_id
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 by 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 /// Define the orientation of the the floor plane with respect to the X,Y,Z axes, and which axes represent the side, front and up vectors as a basis for rotations in Wwise.
165 /// AkFloorPlane is used in to orient the Game Object 3D Viewer in Wwise, and in the transformation of geometry instances in Wwise Spatial Audio.
167 {
168  AkFloorPlane_XZ = 0, ///< The floor is oriented along the ZX-plane. The front vector points towards +Z, the up vector towards +Y, and the side vector towards +X.
169  AkFloorPlane_XY, ///< The floor is oriented along the XY-plane. The front vector points towards +X, the up vector towards +Z, and the side vector towards +Y.
170  AkFloorPlane_YZ, ///< The floor is oriented along the YZ-plane. The front vector points towards +Y, the up vector towards +X, and the side vector towards +Z.
171  AkFloorPlane_Default = AkFloorPlane_XZ ///< The Wwise default floor plane is ZX.
172 };
173 
174 // Function that the host runtime must call to allow for jobs to execute.
175 // in_jobType is the type originally provided by AkJobMgrSettings::FuncRequestJobWorker.
176 // in_uExecutionTimeUsec is the number of microseconds that the function should execute for before terminating.
177 // Note that the deadline is only checked after each individual job completes execution, so the function may run slightly
178 // longer than intended. The "in_uExecutionTimeUsec" should be considered a suggestion or guideline, not a strict rule.
179 // A value of 0 means that the function will run until there are no more jobs ready to be immediately executed.
181  AkJobType in_jobType,
182  AkUInt32 in_uExecutionTimeUsec
183  );
184 
185 /// Settings for the Sound Engine's internal job manager
187 {
188  /// Callback function prototype definition used for handling requests from JobMgr for new workers to perform work.
190  AkJobWorkerFunc in_fnJobWorker, ///< Function passed to host runtime that should be executed. Note that the function provided will exist for as long as the soundengine code is loaded, and will always be the same.
191  AkJobType in_jobType, ///< The type of job worker that has been requested. This should be passed forward to in_fnJobWorker
192  AkUInt32 in_uNumWorkers, ///< Number of workers requested
193  void * in_pClientData ///< Data provided by client in AkJobMgrSettings
194  );
195 
196  FuncRequestJobWorker fnRequestJobWorker; ///< Function called by the job manager when a new worker needs to be requested. When null, all jobs will be executed on the same thread that calls RenderAudio().
197 
198  AkUInt32 uMaxActiveWorkers[AK_NUM_JOB_TYPES]; ///< The maximum number of concurrent workers that will be requested. Must be >= 1 for each jobType.
199 
200  AkUInt32 uNumMemorySlabs; ///< Number of memory slabs to pre-allocate for job manager memory. At least one slab per worker thread should be pre-allocated. Default is 1.
201  AkUInt32 uMemorySlabSize; ///< Size of each memory slab used for job manager memory. Must be a power of two. Default is 8K.
202 
203  void* pClientData; ///< Arbitrary data that will be passed back to the client when calling FuncRequestJobWorker
204 };
205 
206 /// External (optional) callback for tracking performance of the sound engine that is called when a timer starts. (only called in Debug and Profile binaries; this is not called in Release)
207 /// in_uPluginID may be non-zero when this function is called, to provide extra data about what context this Timer was started in.
208 /// in_pszZoneName will point to a static string, so the pointer can be stored for later use, not just the contents of the string itself.
210  AkPluginID in_uPluginID,
211  const char* in_pszZoneName
212  );
213 
214 /// External (optional) function for tracking performance of the sound engine that is called when a timer stops. (only called in Debug and Profile binaries; this is not called in Release)
216 
217 ///< External (optional) function for tracking notable events in the sound engine, to act as a marker or bookmark. (only called in Debug and Profile binaries; this is not called in Release)
218 /// in_uPluginID may be non-zero when this function is called, to provide extra data about what context this Marker was posted in.
219 /// in_pszMarkerName will point to a static string, so the pointer can be stored for later use, not just the contents of the string itself.
221  AkPluginID in_uPluginID,
222  const char* in_pszMarkerName
223  );
224 
225 /// Platform-independent initialization settings of the sound engine
226 /// \sa
227 /// - <tt>AK::SoundEngine::Init()</tt>
228 /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
229 /// - \ref soundengine_integration_init_advanced
231 {
232  AkAssertHook pfnAssertHook; ///< External assertion handling function (optional)
233 
234  AkUInt32 uMaxNumPaths; ///< Maximum number of paths for positioning
235  AkUInt32 uCommandQueueSize; ///< Size of the command queue, in bytes
236  bool bEnableGameSyncPreparation; ///< Sets to true to enable AK::SoundEngine::PrepareGameSync usage.
237  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.
238  ///< 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.
239 
240  AkUInt32 uNumSamplesPerFrame; ///< Number of samples per audio frame (256, 512, 1024, or 2048).
241 
242  AkUInt32 uMonitorQueuePoolSize; ///< Size of the monitoring queue, in bytes. This parameter is not used in Release build.
243  AkUInt32 uCpuMonitorQueueMaxSize; ///< Maximum size of the CPU monitoring queue, per thread, in bytes. This parameter is not used in Release build.
244 
245  AkOutputSettings settingsMainOutput; ///< Main output device settings.
246  AkJobMgrSettings settingsJobManager; ///< Settings to configure the behavior of the Sound Engine's internal job manager
247 
248  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)
249 
250  bool bUseSoundBankMgrThread; ///< Use a separate thread for loading sound banks. Allows asynchronous operations.
251  bool bUseLEngineThread; ///< Use a separate thread for processing audio. If set to false, audio processing will occur in RenderAudio(). \ref goingfurther_eventmgrthread
252 
253  AkBackgroundMusicChangeCallbackFunc BGMCallback; ///< Application-defined audio source change event callback function.
254  void* BGMCallbackCookie; ///< Application-defined user data for the audio source change event callback function.
255  AkOSChar * szPluginDLLPath; ///< When using DLLs for plugins, specify their path. Leave NULL if DLLs are in the same folder as the game executable.
256 
257  AkFloorPlane eFloorPlane; ///< Define the orientation of the the floor plane with respect to the X,Y,Z axes, and which axes represent the side, front and up vectors as a basis for rotations in Wwise.
258  ///< AkFloorPlane is used in to orient the Game Object 3D Viewer in Wwise, and in the transformation of geometry instances in Wwise Spatial Audio.
259 
260  AkReal32 fGameUnitsToMeters; ///< The number of game units in a meter.
261  ///< This setting is used to adapt the size of elements in the Authoring's Game Object 3D Viewer and Audio Object 3D Viewer to meters.
262  ///< This setting is also used to simulate real-world positioning of System Audio Objects, to improve the HRTF in some cases.
263  ///< Note that for legacy reasons, this setting's name is misleading. Its value should represent the number of game units *per* meter.
264  ///< For example, if your game engine sends positions in centimeters, the value of fGameUnitsToMeters should be 100.
265 
266  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.
267 
268  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.
269 
270  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.
271 
272  AkProfilerPushTimerFunc fnProfilerPushTimer; ///< External (optional) function for tracking performance of the sound engine that is called when a timer starts. (only called in Debug and Profile binaries; this is not called in Release)
273  AkProfilerPopTimerFunc fnProfilerPopTimer; ///< External (optional) function for tracking performance of the sound engine that is called when a timer stops. (only called in Debug and Profile binaries; this is not called in Release)
274  AkProfilerPostMarkerFunc fnProfilerPostMarker; ///< External (optional) function for tracking significant events in the sound engine, to act as a marker or bookmark. (only called in Debug and Profile binaries; this is not called in Release)
275 };
276 
277 /// Necessary settings for setting externally-loaded sources
279 {
280  AkUniqueID sourceID; ///< Source ID (available in the SoundBank content files)
281  AkUInt8* pMediaMemory; ///< Pointer to the data to be set for the source
282  AkUInt32 uMediaSize; ///< Size, in bytes, of the data to be set for the source
283 };
284 
285 /// Return values for GetSourcePlayPositions.
287 {
288  AkUniqueID audioNodeID; ///< Audio Node ID of playing item
289  AkUniqueID mediaID; ///< Media ID of playing item. (corresponds to 'ID' attribute of 'File' element in SoundBank metadata file)
290  AkTimeMs msTime; ///< Position of the source (in ms) associated with that playing item
291  AkUInt32 samplePosition; ///< Position of the source (in samples) associated with that playing item
292  AkUInt32 updateBufferTick; ///< Value of GetBufferTick() at the time the position was updated
293 };
294 
295 /// Audiokinetic namespace
296 namespace AK
297 {
298  class IReadBytes;
299  class IWriteBytes;
300 
301  /// Audiokinetic sound engine namespace
302  /// \remarks The functions in this namespace are thread-safe, unless stated otherwise.
303  namespace SoundEngine
304  {
305  ///////////////////////////////////////////////////////////////////////
306  /// @name Initialization
307  //@{
308 
309  /// Query whether or not the sound engine has been successfully initialized.
310  /// \warning This function is not thread-safe. It should not be called at the same time as \c SoundEngine::Init() or \c SoundEngine::Term().
311  /// \return \c True if the sound engine has been initialized, \c False otherwise.
312  /// \sa
313  /// - \ref soundengine_integration_init_advanced
314  /// - <tt>AK::SoundEngine::Init()</tt>
315  /// - <tt>AK::SoundEngine::Term()</tt>
317 
318  /// Initialize the sound engine.
319  /// \warning This function is not thread-safe.
320  /// \remark The initial settings should be initialized using <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
321  /// and <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt> to fill the structures with their
322  /// default settings. This is not mandatory, but it helps avoid backward compatibility problems.
323  ///
324  /// \return
325  /// - \c AK_Success if the initialization was successful
326  /// - \c AK_MemManagerNotInitialized if the memory manager is not available or not properly initialized
327  /// - \c AK_StreamMgrNotInitialized if the stream manager is not available or not properly initialized
328  /// - \c AK_SSEInstructionsNotSupported if the machine does not support SSE instruction (only on the PC)
329  /// - \c AK_InsufficientMemory if there is not enough memory available to initialize the sound engine properly
330  /// - \c AK_InvalidParameter if some parameters are invalid
331  /// - \c AK_AlreadyInitialized if the sound engine is already initialized, or if the provided settings result in insufficient
332  /// - \c AK_Fail for unknown errors, check with AK Support.
333  /// resources for the initialization.
334  /// \sa
335  /// - \ref soundengine_integration_init_advanced
336  /// - \ref workingwithsdks_initialization
337  /// - <tt>AK::SoundEngine::Term()</tt>
338  /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
339  /// - <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt>
341  AkInitSettings * in_pSettings, ///< Initialization settings (can be NULL, to use the default values)
342  AkPlatformInitSettings * in_pPlatformSettings ///< Platform-specific settings (can be NULL, to use the default values)
343  );
344 
345  /// Gets the default values of the platform-independent initialization settings.
346  /// \warning This function is not thread-safe.
347  /// \sa
348  /// - \ref soundengine_integration_init_advanced
349  /// - <tt>AK::SoundEngine::Init()</tt>
350  /// - <tt>AK::SoundEngine::GetDefaultPlatformInitSettings()</tt>
352  AkInitSettings & out_settings ///< Returned default platform-independent sound engine settings
353  );
354 
355  /// Gets the default values of the platform-specific initialization settings.
356  ///
357  /// Windows Specific:
358  /// HWND is the handle of the window associated with the audio.
359  /// Each game must specify the HWND of the application for device detection purposes.
360  /// The value returned by GetDefaultPlatformInitSettings is the foreground HWND at
361  /// the moment of the initialization of the sound engine and might not be the correct one for your game.
362  /// Each game must provide the correct HWND to use.
363  ///
364  /// \warning This function is not thread-safe.
365  /// \sa
366  /// - \ref soundengine_integration_init_advanced
367  /// - <tt>AK::SoundEngine::Init()</tt>
368  /// - <tt>AK::SoundEngine::GetDefaultInitSettings()</tt>
370  AkPlatformInitSettings & out_platformSettings ///< Returned default platform-specific sound engine settings
371  );
372 
373  /// Terminates the sound engine.
374  /// If some sounds are still playing or events are still being processed when this function is
375  /// called, they will be stopped.
376  /// \warning This function is not thread-safe.
377  /// \warning Before calling Term, you must ensure that no other thread is accessing the sound engine.
378  /// \sa
379  /// - \ref soundengine_integration_init_advanced
380  /// - <tt>AK::SoundEngine::Init()</tt>
381  AK_EXTERNAPIFUNC( void, Term )();
382 
383  /// Gets the configured audio settings.
384  /// Call this function to get the configured audio settings.
385  ///
386  /// \warning This function is not thread-safe.
387  /// \warning Call this function only after the sound engine has been properly initialized.
388  /// \return
389  /// - \c AK_NotInitialized if <tt>AK::SoundEngine::Init()</tt> was not called
390  /// - \c AK_Success otherwise.
392  AkAudioSettings & out_audioSettings ///< Returned audio settings
393  );
394 
395  /// Gets the output speaker configuration of the specified output.
396  /// Call this function to get the speaker configuration of the output (which may not correspond
397  /// to the physical output format of the platform, in the case of downmixing provided by the platform itself).
398  /// You may initialize the sound engine with a user-specified configuration, but the resulting
399  /// configuration is determined by the sound engine, based on the platform, output type and
400  /// platform settings (for e.g. system menu or control panel option).
401  /// If the speaker configuration of the output is object-based, the speaker configuration of the
402  /// main mix is returned. To query more information on object-based output devices, see AK::SoundEngine::GetOutputDeviceConfiguration.
403  ///
404  /// It is recommended to call GetSpeakerConfiguration anytime after receiving a callback from RegisterAudioDeviceStatusCallback to know if the channel configuration has changed.
405  ///
406  /// \warning Call this function only after the sound engine has been properly initialized.
407  /// 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.
408  /// The Init.bnk must be loaded prior to this call.
409  /// \return The output configuration. An empty AkChannelConfig not AkChannelConfig::IsValid() if device does not exist or if the Init.bnk was not loaded yet.
410  /// \sa
411  /// - AkSpeakerConfig.h
412  /// - AkOutputSettings
413  /// - <tt>AK::SoundEngine::GetOutputDeviceConfiguration()</tt>
415  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
416  );
417 
418  /// Gets the configuration of the specified output device.
419  /// Call this function to get the channel configuration of the output device as well as its 3D audio capabilities.
420  /// If the configuration of the output device is object-based (io_channelConfig.eConfigType == AK_ChannelConfigType_Objects),
421  /// io_capabilities can be inspected to determine the channel configuration of the main mix (Ak3DAudioSinkCapabilities::channelConfig),
422  /// whether or not the output device uses a passthrough mix (Ak3DAudioSinkCapabilities::bPassthrough) and the maximum number of objects
423  /// that can play simultaneously on this output device (Ak3DAudioSinkCapabilities::uMax3DAudioObjects). Note that if
424  /// Ak3DAudioSinkCapabilities::bMultiChannelObjects is false, multi-channel objects will be split into multiple mono objects
425  /// before being sent to the output device.
426  ///
427  /// \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.
428  /// \return
429  /// - \c AK_Success if successful
430  /// - \c AK_IDNotFound is the output was not found in the system.
431  /// - \c AK_NotInitialized if the sound engine is not initialized
432  /// \sa
433  /// - AkSpeakerConfig.h
434  /// - AkOutputSettings
435  /// - <tt>AK::SoundEngine::GetSpeakerConfiguration()</tt>
437  AkOutputDeviceID in_idOutput,
438  AkChannelConfig& io_channelConfig,
439  Ak3DAudioSinkCapabilities& io_capabilities
440  );
441 
442  /// Gets the panning rule of the specified output.
443  /// \warning Call this function only after the sound engine has been properly initialized.
444  /// Returns the supported configuration in out_ePanningRule:
445  /// - AkPanningRule_Speakers
446  /// - AkPanningRule_Headphone
447  /// \return
448  /// - \c AK_Success if successful
449  /// - \c AK_IDNotFound is the output was not found in the system.
450  /// - \c AK_NotInitialized if the sound engine is not initialized
451  /// \sa
452  /// - AkSpeakerConfig.h
454  AkPanningRule & out_ePanningRule, ///< Returned panning rule (AkPanningRule_Speakers or AkPanningRule_Headphone) for given output.
455  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
456  );
457 
458  /// Sets the panning rule of the specified output.
459  /// This may be changed anytime once the sound engine is initialized.
460  /// \warning This function posts a message through the sound engine's internal message queue, whereas GetPanningRule() queries the current panning rule directly.
461  /// \aknote
462  /// The specified panning rule will only impact the sound if the processing format is downmixing to Stereo in the mixing process. It
463  /// will not impact the output if the audio stays in 5.1 until the end, for example.
464  /// \endaknote
466  AkPanningRule in_ePanningRule, ///< Panning rule.
467  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
468  );
469 
470  /// Gets speaker angles of the specified device. Speaker angles are used for 3D positioning of sounds over standard configurations.
471  /// Note that the current version of Wwise only supports positioning on the plane.
472  /// The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180].
473  /// Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles.
474  /// Angles must be set in ascending order.
475  /// You may call this function with io_pfSpeakerAngles set to NULL to get the expected number of angle values in io_uNumAngles,
476  /// in order to allocate your array correctly. You may also obtain this number by calling
477  /// AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ).
478  /// If io_pfSpeakerAngles is not NULL, the array is filled with up to io_uNumAngles.
479  /// Typical usage:
480  /// - AkUInt32 uNumAngles;
481  /// - GetSpeakerAngles( NULL, uNumAngles, AkOutput_Main );
482  /// - AkReal32 * pfSpeakerAngles = AkAlloca( uNumAngles * sizeof(AkReal32) );
483  /// - GetSpeakerAngles( pfSpeakerAngles, uNumAngles, AkOutput_Main );
484  /// \aknote
485  /// On most platforms, the angle set on the plane consists of 3 angles, to account for 7.1.
486  /// - 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.
487  /// - When panning to 5.1, the front speakers use angle[0], and the surround speakers use (angle[2] - angle[1]) / 2.
488  /// \endaknote
489  /// \warning Call this function only after the sound engine has been properly initialized.
490  /// \return AK_Success if device exists.
491  /// \sa SetSpeakerAngles()
493  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.
494  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.
495  AkReal32 & out_fHeightAngle, ///< Elevation of the height layer, in degrees relative to the plane [-90,90].
496  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
497  );
498 
499  /// Sets speaker angles of the specified device. Speaker angles are used for 3D positioning of sounds over standard configurations.
500  /// Note that the current version of Wwise only supports positioning on the plane.
501  /// The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180].
502  /// Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles.
503  /// Angles must be set in ascending order.
504  /// Note:
505  /// - This function requires that the minimum speaker angle is at least 5 degrees; as well as the subsequent speaker pairs are at least 5 degrees apart.
506  /// Typical usage:
507  /// - Initialize the sound engine and/or add secondary output(s).
508  /// - Get number of speaker angles and their value into an array using GetSpeakerAngles().
509  /// - Modify the angles and call SetSpeakerAngles().
510  /// 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().
511  /// \warning This function only applies to configurations (or subset of these configurations) that are standard and whose speakers are on the plane (2D).
512  /// \return
513  /// - \c AK_Success if successful.
514  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
515  /// - \c AK_InsufficientMemory if there wasn't enough memory in the message queue
516  /// - \c AK_InvalidParameter one of the parameter is invalid, check the debug log.
517  /// \sa GetSpeakerAngles()
519  const AkReal32 * in_pfSpeakerAngles, ///< Array of loudspeaker pair angles, in degrees relative to azimuth [0,180].
520  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()).
521  AkReal32 in_fHeightAngle, ///< Elevation of the height layer, in degrees relative to the plane [-90,90].
522  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
523  );
524 
525  /// Allows the game to set the volume threshold to be used by the sound engine to determine if a voice must go virtual.
526  /// This may be changed anytime once the sound engine was initialized.
527  /// If this function is not called, the used value will be the value specified in the platform specific project settings.
528  /// \return
529  /// - \c AK_Success if successful
530  /// - \c AK_InvalidParameter if the threshold was not between 0 and -96.3 dB.
531  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
533  AkReal32 in_fVolumeThresholdDB ///< Volume Threshold, must be a value between 0 and -96.3 dB
534  );
535 
536  /// Allows the game to set the maximum number of non virtual voices to be played simultaneously.
537  /// This may be changed anytime once the sound engine was initialized.
538  /// If this function is not called, the used value will be the value specified in the platform specific project settings.
539  /// \return
540  /// - \c AK_InvalidParameter if the threshold was not between 1 and MaxUInt16.
541  /// - \c AK_Success if successful
543  AkUInt16 in_maxNumberVoices ///< Maximum number of non-virtual voices.
544  );
545 
546  /// Allows the game to set new values for the maximum active workers for the job manager
547  /// This may be changed anytime once the sound engine was initialized.
548  /// This function may only be used if a worker function has been set via \ref AkJobMgrSettings.
549  /// \return
550  /// - \c AK_InvalidParameter in_jobType is not a valid jobtype, or in_uNewMaxActiveWorkers is not greater than 0
551  /// - \c AK_NotInitialized JobMgr system was not already initialized with a function to request for workers
552  /// - \c AK_Success if successful
554  AkJobType in_jobType, ///< JobType to set new uMaxActiveWorkers for
555  AkUInt32 in_uNewMaxActiveWorkers ///< New maximum number of active workers will request
556  );
557 
558  //@}
559 
560  ////////////////////////////////////////////////////////////////////////
561  /// @name Rendering Audio
562  //@{
563 
564  /// Processes all commands in the sound engine's command queue.
565  /// This method has to be called periodically (usually once per game frame).
566  /// \sa
567  /// - \ref concept_events
568  /// - \ref soundengine_events
569  /// - <tt>AK::SoundEngine::PostEvent()</tt>
570  /// \return Always returns AK_Success
572  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.
573  );
574 
575  //@}
576 
577  ////////////////////////////////////////////////////////////////////////
578  /// @name Component Registration
579  //@{
580 
581  /// Query interface to global plug-in context used for plug-in registration/initialization.
582  /// \return Global plug-in context.
584 
585  /// Registers a plug-in with the sound engine and sets the callback functions to create the
586  /// plug-in and its parameter node.
587  /// \aknote
588  /// 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.
589  /// \endaknote
590  /// \sa
591  /// - \ref register_effects
592  /// - \ref plugin_xml
593  /// \return
594  /// - \c AK_Success if successful
595  /// - \c AK_InvalidParameter if invalid parameters were provided
596  /// - \c AK_InsufficientMemory if there isn't enough memory to register the plug-in
597  /// \remarks
598  /// Codecs and plug-ins must be registered before loading banks that use them.\n
599  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
600  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
601  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
602  /// posting the event will fail.
604  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
605  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
606  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
607  AkCreatePluginCallback in_pCreateFunc, ///< Pointer to the plug-in's creation function
608  AkCreateParamCallback in_pCreateParamFunc, ///< Pointer to the plug-in's parameter node creation function
609  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.
610  );
611 
612  /// Loads a plug-in dynamic library and registers it with the sound engine.
613  /// With dynamic linking, all plugins are automatically registered.
614  /// 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.
615  /// \return
616  /// - \c AK_Success if successful.
617  /// - \c AK_FileNotFound if the DLL is not found in the OS path or if it has extraneous dependencies not found.
618  /// - \c AK_InsufficientMemory if the system ran out of resources while loading the dynamic library
619  /// - \c AK_NotCompatible if the file was found but is not binary-compatible with the system's expected executable format
620  /// - \c AK_InvalidFile if the symbol g_pAKPluginList is not exported by the dynamic library
621  /// - \c AK_Fail if an unexpected system error was encountered
623  const AkOSChar* in_DllName, ///< Name of the DLL to load, without "lib" prefix or extension.
624  const AkOSChar* in_DllPath = NULL ///< Optional path to the DLL. Will override szPLuginDLLPath that was set in AkInitSettings.
625  );
626 
627  /// Registers a codec type with the sound engine and set the callback functions to create the
628  /// codec's file source and bank source nodes.
629  /// \aknote
630  /// 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.
631  /// \endaknote
632  /// \sa
633  /// - \ref register_effects
634  /// \return
635  /// - \c AK_Success if successful
636  /// - \c AK_InvalidParameter if invalid parameters were provided
637  /// - \c AK_InsufficientMemory if there isn't enough memory to register the plug-in
638  /// \remarks
639  /// Codecs and plug-ins must be registered before loading banks that use them.\n
640  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
641  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
642  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
643  /// posting the Event will fail.
645  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
646  AkUInt32 in_ulCodecID, ///< Codec identifier (as declared in the plug-in description XML file)
647  AkCreateFileSourceCallback in_pFileCreateFunc, ///< Pointer to the codec's file source node creation function
648  AkCreateBankSourceCallback in_pBankCreateFunc ///< Pointer to the codec's bank source node creation function
649  );
650 
651  /// Registers a global callback function. This function will be called from the audio rendering thread, at the
652  /// location specified by in_eLocation. This function will also be called from the thread calling
653  /// AK::SoundEngine::Term with in_eLocation set to AkGlobalCallbackLocation_Term.
654  /// For example, in order to be called at every audio rendering pass, and once during teardown for releasing resources, you would call
655  /// RegisterGlobalCallback(myCallback, AkGlobalCallbackLocation_BeginRender | AkGlobalCallbackLocation_Term, myCookie, AkPluginTypeNone, 0, 0);
656  /// \remarks
657  /// A Plugin Type, Company ID and Plugin ID can be provided to this function to enable timing in the performance monitor.
658  /// 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.
659  /// It is illegal to call this function while already inside of a global callback.
660  /// This function might stall for several milliseconds before returning.
661  /// \return
662  /// - \c AK_Success if successful
663  /// - \c AK_InvalidParameter if parameters are out of range (check debug console or Wwise Profiler)
664  /// \sa
665  /// - <tt>AK::SoundEngine::UnregisterGlobalCallback()</tt>
666  /// - AkGlobalCallbackFunc
667  /// - AkGlobalCallbackLocation
669  AkGlobalCallbackFunc in_pCallback, ///< Function to register as a global callback.
670  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender, ///< Callback location defined in AkGlobalCallbackLocation. Bitwise OR multiple locations if needed.
671  void * in_pCookie = NULL, ///< User cookie.
672  AkPluginType in_eType = AkPluginTypeNone, ///< Plug-in type (for example, source or effect). AkPluginTypeNone for no timing.
673  AkUInt32 in_ulCompanyID = 0, ///< Company identifier (as declared in the plug-in description XML file). 0 for no timing.
674  AkUInt32 in_ulPluginID = 0 ///< Plug-in identifier (as declared in the plug-in description XML file). 0 for no timing.
675  );
676 
677  /// Unregisters a global callback function, previously registered using RegisterGlobalCallback.
678  /// \remarks
679  /// It is legal to call this function while already inside of a global callback, If it is unregistering itself and not
680  /// another callback.
681  /// This function might stall for several milliseconds before returning.
682  /// \return
683  /// - \c AK_Success if successful
684  /// - \c AK_InvalidParameter if parameters are out of range (check debug console or Wwise Profiler)
685  /// \sa
686  /// - <tt>AK::SoundEngine::RegisterGlobalCallback()</tt>
687  /// - AkGlobalCallbackFunc
688  /// - AkGlobalCallbackLocation
690  AkGlobalCallbackFunc in_pCallback, ///< Function to unregister as a global callback.
691  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender ///< Must match in_eLocation as passed to RegisterGlobalCallback for this callback.
692  );
693 
694  /// Registers a resource monitor callback function that gets all of the resource usage data contained in the
695  /// AkResourceMonitorDataSummary structure. This includes general information about the system, such as CPU usage,
696  /// active Voices, and Events. This function will be called from the audio rendering thread at the end of each frame.
697  /// \remarks
698  /// 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.
699  /// It is illegal to call this function while already inside of a resource callback.
700  /// This function might stall for several milliseconds before returning.
701  /// This function will return AK_Fail in Release
702  /// \sa
703  /// - <tt>AK::SoundEngine::UnregisterResourceMonitorCallback()</tt>
704  /// - AkResourceMonitorCallbackFunc
706  AkResourceMonitorCallbackFunc in_pCallback ///< Function to register as a resource monitor callback.
707  );
708 
709  /// Unregisters a resource monitor callback function, previously registered using RegisterResourceMonitorCallback.
710  /// \remarks
711  /// It is legal to call this function while already inside of a resource monitor callback, If it is unregistering itself and not
712  /// another callback.
713  /// This function might stall for several milliseconds before returning.
714  /// \sa
715  /// - <tt>AK::SoundEngine::RegisterResourceMonitorCallback()</tt>
716  /// - AkResourceMonitorCallbackFunc
718  AkResourceMonitorCallbackFunc in_pCallback ///< Function to unregister as a resource monitor callback.
719  );
720 
721  /// Registers a callback for the Audio Device status changes.
722  /// The callback will be called from the audio thread
723  /// Can be called prior to AK::SoundEngine::Init
724  /// \sa AK::SoundEngine::AddOutput
726  AK::AkDeviceStatusCallbackFunc in_pCallback ///< Function to register as a status callback.
727  );
728 
729  /// Unregisters the callback for the Audio Device status changes, registered by RegisterAudioDeviceStatusCallback
731  //@}
732 
733 #ifdef AK_SUPPORT_WCHAR
734  ////////////////////////////////////////////////////////////////////////
735  /// @name Getting ID from strings
736  //@{
737 
738  /// Universal converter from Unicode string to ID for the sound engine.
739  /// This function will hash the name based on a algorithm ( provided at : /AK/Tools/Common/AkFNVHash.h )
740  /// Note:
741  /// This function does return a AkUInt32, which is totally compatible with:
742  /// AkUniqueID, AkStateGroupID, AkStateID, AkSwitchGroupID, AkSwitchStateID, AkRtpcID, and so on...
743  /// \sa
744  /// - <tt>AK::SoundEngine::PostEvent</tt>
745  /// - <tt>AK::SoundEngine::SetRTPCValue</tt>
746  /// - <tt>AK::SoundEngine::SetSwitch</tt>
747  /// - <tt>AK::SoundEngine::SetState</tt>
748  /// - <tt>AK::SoundEngine::PostTrigger</tt>
749  /// - <tt>AK::SoundEngine::SetGameObjectAuxSendValues</tt>
750  /// - <tt>AK::SoundEngine::LoadBank</tt>
751  /// - <tt>AK::SoundEngine::UnloadBank</tt>
752  /// - <tt>AK::SoundEngine::PrepareEvent</tt>
753  /// - <tt>AK::SoundEngine::PrepareGameSyncs</tt>
754  AK_EXTERNAPIFUNC( AkUInt32, GetIDFromString )( const wchar_t* in_pszString );
755 #endif //AK_SUPPORT_WCHAR
756 
757  /// Universal converter from string to ID for the sound engine.
758  /// This function will hash the name based on a algorithm ( provided at : /AK/Tools/Common/AkFNVHash.h )
759  /// Note:
760  /// This function does return a AkUInt32, which is totally compatible with:
761  /// AkUniqueID, AkStateGroupID, AkStateID, AkSwitchGroupID, AkSwitchStateID, AkRtpcID, and so on...
762  /// \sa
763  /// - <tt>AK::SoundEngine::PostEvent</tt>
764  /// - <tt>AK::SoundEngine::SetRTPCValue</tt>
765  /// - <tt>AK::SoundEngine::SetSwitch</tt>
766  /// - <tt>AK::SoundEngine::SetState</tt>
767  /// - <tt>AK::SoundEngine::PostTrigger</tt>
768  /// - <tt>AK::SoundEngine::SetGameObjectAuxSendValues</tt>
769  /// - <tt>AK::SoundEngine::LoadBank</tt>
770  /// - <tt>AK::SoundEngine::UnloadBank</tt>
771  /// - <tt>AK::SoundEngine::PrepareEvent</tt>
772  /// - <tt>AK::SoundEngine::PrepareGameSyncs</tt>
773  AK_EXTERNAPIFUNC( AkUInt32, GetIDFromString )( const char* in_pszString );
774 
775  //@}
776 
777  ////////////////////////////////////////////////////////////////////////
778  /// @name Event Management
779  //@{
780 
781  /// Asynchronously posts an Event to the sound engine (by event ID).
782  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
783  /// An array of wave file sources can be provided to resolve External Sources triggered by the event.
784  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed and an error will be displayed in the debug console and the Wwise Profiler.
785  /// \remarks
786  /// If used, the array of external sources should contain the information for each external source triggered by the
787  /// event. When triggering an event with multiple external sources, you need to differentiate each source
788  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
789  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
790  /// (therefore have a unique cookie) in order to tell them apart when filling the AkExternalSourceInfo structures.
791  /// \endaknote
792  /// \sa
793  /// - \ref concept_events
794  /// - \ref integrating_external_sources
795  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
796  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
797  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
799  AkUniqueID in_eventID, ///< Unique ID of the event
800  AkGameObjectID in_gameObjectID, ///< Associated game object ID
801  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
802  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
803  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
804  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
805  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
806  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.
807  );
808 
809 #ifdef AK_SUPPORT_WCHAR
810  /// Posts an Event to the sound engine (by Event name), using callbacks.
811  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
812  /// An array of wave file sources can be provided to resolve External Sources triggered by the event.
813  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed and an error will be displayed in the debug console and the Wwise Profiler.
814  /// \remarks
815  /// If used, the array of external sources should contain the information for each external source triggered by the
816  /// event. When triggering an event with multiple external sources, you need to differentiate each source
817  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
818  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
819  /// (therefore have a unique cookie) in order to tell them appart when filling the AkExternalSourceInfo structures.
820  /// \endaknote
821  /// \sa
822  /// - \ref concept_events
823  /// - \ref integrating_external_sources
824  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
825  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
826  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
828  const wchar_t* in_pszEventName, ///< Name of the event
829  AkGameObjectID in_gameObjectID, ///< Associated game object ID
830  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
831  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
832  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information.
833  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
834  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
835  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.
836  );
837 #endif //AK_SUPPORT_WCHAR
838 
839  /// Posts an Event to the sound engine (by Event name), using callbacks.
840  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
841  /// An array of Wave file sources can be provided to resolve External Sources triggered by the event. P
842  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed and an error will be displayed in the debug console and the Wwise Profiler.
843  /// \remarks
844  /// If used, the array of external sources should contain the information for each external source triggered by the
845  /// event. When triggering an Event with multiple external sources, you need to differentiate each source
846  /// by using the cookie property in the External Source in the Wwise project and in AkExternalSourceInfo.
847  /// \aknote If an event triggers the playback of more than one external source, they must be named uniquely in the project
848  /// (therefore have a unique cookie) in order to tell them apart when filling the AkExternalSourceInfo structures.
849  /// \endaknote
850  /// \sa
851  /// - \ref concept_events
852  /// - \ref integrating_external_sources
853  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
854  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
855  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
857  const char* in_pszEventName, ///< Name of the event
858  AkGameObjectID in_gameObjectID, ///< Associated game object ID
859  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
860  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
861  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information.
862  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
863  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
864  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.
865  );
866 
867  // If you modify AkActionOnEventType, don't forget to modify the WAAPI validation schema accordingly.
868 
869  /// AkActionOnEventType
870  /// \sa
871  /// - <tt>AK::SoundEngine::ExecuteActionOnEvent()</tt>
873  {
876  AkActionOnEventType_Resume = 2, ///< Resume
878  AkActionOnEventType_ReleaseEnvelope = 4 ///< Release envelope
879  };
880 
881  /// Executes an action on all nodes that are referenced in the specified event in an action of type play.
882  /// \return
883  /// - \c AK_Success if the action was successfully queued.
884  /// - \c AK_IDNotFound if the Event was not found (not loaded or there is a typo in the ID)
885  /// \sa
886  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
888  AkUniqueID in_eventID, ///< Unique ID of the event
889  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
890  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
891  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
892  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
893  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
894  );
895 
896 #ifdef AK_SUPPORT_WCHAR
897  /// Executes an action on all nodes that are referenced in the specified event in an action of type play.
898  /// \return
899  /// - \c AK_Success if the action was successfully queued.
900  /// - \c AK_IDNotFound if the Event was not found (not loaded or there is a typo in the ID)
901  /// \sa
902  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
904  const wchar_t* in_pszEventName, ///< Name of the event
905  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
906  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
907  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
908  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
909  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
910  );
911 #endif //AK_SUPPORT_WCHAR
912 
913  /// Executes an Action on all nodes that are referenced in the specified Event in an Action of type Play.
914  /// \return
915  /// - \c AK_Success if the action was successfully queued.
916  /// - \c AK_IDNotFound if the Event was not found (not loaded or there is a typo in the ID)
917  /// \sa
918  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
920  const char* in_pszEventName, ///< Name of the event
921  AkActionOnEventType in_ActionType, ///< Action to execute on all the elements that were played using the specified event.
922  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
923  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
924  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the transition
925  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID ///< Associated PlayingID
926  );
927 
928 
929  /// Executes a number of MIDI Events on all nodes that are referenced in the specified Event in an Action of type Play.
930  /// The time at which a MIDI Event is posted is determined by in_bAbsoluteOffsets. If false, each MIDI event will be
931  /// posted in AkMIDIPost::uOffset samples from the start of the current frame. If true, each MIDI event will be posted
932  /// at the absolute time AkMIDIPost::uOffset samples.
933  /// To obtain the current absolute time, see AK::SoundEngine::GetSampleTick.
934  /// The duration of a sample can be determined from the sound engine's audio settings, via a call to AK::SoundEngine::GetAudioSettings.
935  /// If a playing ID is specified then that playing ID must be active. Otherwise a new playing ID will be assigned.
936  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed and an error will be displayed in the debug console and the Wwise Profiler.
937  /// \sa
938  /// - <tt>AK::SoundEngine::GetAudioSettings</tt>
939  /// - <tt>AK::SoundEngine::GetSampleTick</tt>
940  /// - <tt>AK::SoundEngine::StopMIDIOnEvent</tt>
941  /// - \ref soundengine_midi_event_playing_id
943  AkUniqueID in_eventID, ///< Unique ID of the Event
944  AkGameObjectID in_gameObjectID, ///< Associated game object ID
945  AkMIDIPost* in_pPosts, ///< MIDI Events to post
946  AkUInt16 in_uNumPosts, ///< Number of MIDI Events to post
947  bool in_bAbsoluteOffsets = false, ///< Set to true when AkMIDIPost::uOffset are absolute, false when relative to current frame
948  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
949  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
950  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
951  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
952  );
953 
954  /// Stops MIDI notes on all nodes that are referenced in the specified event in an action of type play,
955  /// with the specified Game Object. Invalid parameters are interpreted as wildcards. For example, calling
956  /// this function with in_eventID set to AK_INVALID_UNIQUE_ID will stop all MIDI notes for Game Object
957  /// in_gameObjectID.
958  /// \return
959  /// - \c AK_Success if the stop command was queued
960  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
961  /// \sa
962  /// - <tt>AK::SoundEngine::PostMIDIOnEvent</tt>
963  /// - \ref soundengine_midi_event_playing_id
965  AkUniqueID in_eventID = AK_INVALID_UNIQUE_ID, ///< Unique ID of the Event
966  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
967  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
968  );
969 
970 
971  /// 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
972  /// 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
973  /// uMaxCachePinnedBytes is exceeded.
974  /// \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.
975  /// \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.
976  /// \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
977  /// 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.
978  /// \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
979  /// will get cached with active priority, while all other files will get cached with inactive priority.
980  /// \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
981  /// 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.
982  /// \return
983  /// - \c AK_Success if command was queued
984  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
985  /// \sa
986  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
987  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
988  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
989  /// - AkFileSystemFlags
991  AkUniqueID in_eventID, ///< Unique ID of the event
992  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
993  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
994  );
995 
996 #ifdef AK_SUPPORT_WCHAR
997  /// 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
998  /// 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
999  /// uMaxCachePinnedBytes is exceeded.
1000  /// \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.
1001  /// \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.
1002  /// \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
1003  /// 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.
1004  /// \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
1005  /// will get cached with active priority, while all other files will get cached with inactive priority.
1006  /// \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
1007  /// 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.
1008  /// \return
1009  /// - \c AK_Success if command was queued
1010  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1011  /// \sa
1012  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
1013  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1014  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
1015  /// - AkFileSystemFlags
1017  const wchar_t* in_pszEventName, ///< Name of the event
1018  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
1019  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
1020  );
1021 #endif //AK_SUPPORT_WCHAR
1022 
1023  /// 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
1024  /// 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
1025  /// uMaxCachePinnedBytes is exceeded.
1026  /// \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.
1027  /// \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.
1028  /// \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
1029  /// 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.
1030  /// \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
1031  /// will get cached with active priority, while all other files will get cached with inactive priority.
1032  /// \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
1033  /// 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.
1034  /// \return
1035  /// - \c AK_Success if command was queued
1036  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1037  /// \sa
1038  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
1039  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1040  /// - <tt>AK::StreamMgr::IAkFileLocationResolver::Open</tt>
1041  /// - AkFileSystemFlags
1043  const char* in_pszEventName, ///< Name of the event
1044  AkPriority in_uActivePriority, ///< Priority of active stream caching I/O
1045  AkPriority in_uInactivePriority ///< Priority of inactive stream caching I/O
1046  );
1047 
1048  /// 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
1049  /// 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.
1050  /// \return
1051  /// - \c AK_Success if command was queued
1052  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1053  /// \sa
1054  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1055  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
1057  AkUniqueID in_eventID ///< Unique ID of the event
1058  );
1059 
1060 #ifdef AK_SUPPORT_WCHAR
1061  /// 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
1062  /// 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.
1063  /// \return
1064  /// - \c AK_Success if command was queued
1065  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1066  /// \sa
1067  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1068  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
1070  const wchar_t* in_pszEventName ///< Name of the event
1071  );
1072 #endif //AK_SUPPORT_WCHAR
1073 
1074  /// 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
1075  /// 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.
1076  /// \return
1077  /// - \c AK_Success if command was queued
1078  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1079  /// \sa
1080  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1081  /// - <tt>AK::SoundEngine::GetBufferStatusForPinnedEvent</tt>
1083  const char* in_pszEventName ///< Name of the event
1084  );
1085 
1086  /// Returns information about an Event that was requested to be pinned into cache via <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
1087  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
1088  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
1089  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see \c AkDeviceSettings
1090  /// \return
1091  /// - \c AK_Success if command was queued
1092  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1093  /// \sa
1094  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1095  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1096  /// - AkDeviceSettings
1098  AkUniqueID in_eventID, ///< Unique ID of the event
1099  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
1100  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
1101  );
1102 
1103  /// Returns information about an Event that was requested to be pinned into cache via \c <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
1104  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
1105  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
1106  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see AkDeviceSettings
1107  /// \return
1108  /// - \c AK_Success if command was queued
1109  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1110  /// \sa
1111  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1112  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1113  /// - AkDeviceSettings
1115  const char* in_pszEventName, ///< Name of the event
1116  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
1117  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
1118  );
1119 
1120 #ifdef AK_SUPPORT_WCHAR
1121  /// Returns information about an Event that was requested to be pinned into cache via \c <tt>AK::SoundEngine::PinEventInStreamCache()</tt>.
1122  /// Retrieves the smallest buffer fill-percentage for each file referenced by the event, and whether
1123  /// the cache-pinned memory limit is preventing any of the files from filling up their buffer.
1124  /// \remarks To set the limit for the maximum number of bytes that can be pinned to cache, see AkDeviceSettings
1125  /// \return
1126  /// - \c AK_Success if command was queued
1127  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1128  /// \sa
1129  /// - <tt>AK::SoundEngine::PinEventInStreamCache</tt>
1130  /// - <tt>AK::SoundEngine::UnpinEventInStreamCache</tt>
1131  /// - AkDeviceSettings
1133  const wchar_t* in_pszEventName, ///< Name of the event
1134  AkReal32& out_fPercentBuffered, ///< Fill-percentage (out of 100) of requested buffer size for least buffered file in the event.
1135  bool& out_bCachePinnedMemoryFull ///< True if at least one file can not complete buffering because the cache-pinned memory limit would be exceeded.
1136  );
1137 #endif
1138 
1139  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1140  ///
1141  /// Notes:
1142  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1143  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1144  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1145  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1146  /// the sound that is currently playing is the first sound of the sequence.
1147  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1148  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1149  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1150  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1151  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1152  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1153  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1154  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1155  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1156  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1157  /// the audio thread consumes it (after a call to RenderAudio()).
1158  ///
1159  /// Notes specific to Music Segments:
1160  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1161  /// value to seek within the Pre-Entry.
1162  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1163  /// in order to restart them if required.
1164  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1165  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1166  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1167  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1168  /// the exact position of a segment. Also, the segment will be silent during that time
1169  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1170  /// also informs you about the remaining look-ahead time.
1171  ///
1172  /// Notes specific to Music Switch Containers:
1173  /// - Seeking triggers a music transition towards the current (or target) segment.
1174  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1175  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1176  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1177  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1178  ///
1179  /// \return
1180  /// - \c AK_Success if command was queued
1181  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1182  /// \sa
1183  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1184  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1185  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1186  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1188  AkUniqueID in_eventID, ///< Unique ID of the event
1189  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1190  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1191  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1192  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.
1193  );
1194 
1195 #ifdef AK_SUPPORT_WCHAR
1196  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1197  ///
1198  /// Notes:
1199  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1200  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1201  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1202  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1203  /// the sound that is currently playing is the first sound of the sequence.
1204  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1205  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1206  /// value to seek within the Pre-Entry.
1207  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1208  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1209  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1210  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1211  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1212  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1213  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1214  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1215  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1216  /// the audio thread consumes it (after a call to RenderAudio()).
1217  ///
1218  /// Notes specific to Music Segments:
1219  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1220  /// value to seek within the Pre-Entry.
1221  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1222  /// in order to restart them if required.
1223  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1224  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1225  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1226  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1227  /// the exact position of a segment. Also, the segment will be silent during that time
1228  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1229  /// also informs you about the remaining look-ahead time.
1230  ///
1231  /// Notes specific to Music Switch Containers:
1232  /// - Seeking triggers a music transition towards the current (or target) segment.
1233  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1234  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1235  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1236  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1237  /// \return
1238  /// - \c AK_Success if command was queued
1239  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1240  /// \sa
1241  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1242  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1243  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1244  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1246  const wchar_t* in_pszEventName, ///< Name of the event
1247  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1248  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1249  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1250  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.
1251  );
1252 #endif //AK_SUPPORT_WCHAR
1253 
1254  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1255  ///
1256  /// Notes:
1257  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1258  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1259  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1260  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1261  /// the sound that is currently playing is the first sound of the sequence.
1262  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1263  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1264  /// value to seek within the Pre-Entry.
1265  /// - Sounds/segments are stopped if in_iPosition is greater than their duration.
1266  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1267  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1268  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1269  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1270  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1271  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1272  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1273  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1274  /// the audio thread consumes it (after a call to RenderAudio()).
1275  ///
1276  /// Notes specific to Music Segments:
1277  /// - With Music Segments, in_iPosition is relative to the Entry Cue, in milliseconds. Use a negative
1278  /// value to seek within the Pre-Entry.
1279  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1280  /// in order to restart them if required.
1281  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1282  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1283  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1284  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1285  /// the exact position of a segment. Also, the segment will be silent during that time
1286  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1287  /// also informs you about the remaining look-ahead time.
1288  ///
1289  /// Notes specific to Music Switch Containers:
1290  /// - Seeking triggers a music transition towards the current (or target) segment.
1291  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1292  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1293  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1294  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1295  ///
1296  /// \return
1297  /// - \c AK_Success if command was queued
1298  /// - \c AK_IDNotFound if the Event ID is unknown (not loaded or typo in the ID)
1299  /// \sa
1300  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1301  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1302  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1303  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1305  const char* in_pszEventName, ///< Name of the event
1306  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1307  AkTimeMs in_iPosition, ///< Desired position where playback should restart, in milliseconds
1308  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1309  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.
1310  );
1311 
1312  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1313  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1314  ///
1315  /// Notes:
1316  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1317  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1318  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1319  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1320  /// the sound that is currently playing is the first sound of the sequence.
1321  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1322  /// - in_iPosition is clamped internally to the beginning of the sound/segment.
1323  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1324  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1325  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1326  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1327  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1328  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1329  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1330  /// the audio thread consumes it (after a call to RenderAudio()).
1331  ///
1332  /// Notes specific to Music Segments:
1333  /// - With Music Segments, \c in_fPercent is relative to the Entry Cue, and the segment's duration is the
1334  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1335  /// post-exit of a segment using this method. Use absolute values instead.
1336  /// - Music Segments cannot be looped. You may want to listen to the \c AK_EndOfEvent notification
1337  /// in order to restart them if required.
1338  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1339  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1340  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1341  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1342  /// the exact position of a segment. Also, the segment will be silent during the time that period
1343  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1344  /// also informs you about the remaining look-ahead time.
1345  ///
1346  /// Notes specific to Music Switch Containers:
1347  /// - Seeking triggers a music transition towards the current (or target) segment.
1348  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1349  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1350  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1351  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1352  ///
1353  /// \sa
1354  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1355  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1356  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1357  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1359  AkUniqueID in_eventID, ///< Unique ID of the event
1360  AkGameObjectID in_gameObjectID , ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1361  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)
1362  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1363  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.
1364  );
1365 
1366 #ifdef AK_SUPPORT_WCHAR
1367  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1368  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1369  ///
1370  /// Notes:
1371  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1372  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1373  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1374  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1375  /// the sound that is currently playing is the first sound of the sequence.
1376  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1377  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1378  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1379  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1380  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1381  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1382  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1383  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1384  /// the audio thread consumes it (after a call to RenderAudio()).
1385  ///
1386  /// Notes specific to Music Segments:
1387  /// - With Music Segments, \c in_fPercent is relative to the Entry Cue, and the segment's duration is the
1388  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1389  /// post-exit of a segment using this method. Use absolute values instead.
1390  /// - Music Segments cannot be looped. You may want to listen to the \c AK_EndOfEvent notification
1391  /// in order to restart them if required.
1392  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1393  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1394  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1395  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1396  /// the exact position of a segment. Also, the segment will be silent during the time that period
1397  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1398  /// also informs you about the remaining look-ahead time.
1399  ///
1400  /// Notes specific to Music Switch Containers:
1401  /// - Seeking triggers a music transition towards the current (or target) segment.
1402  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1403  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1404  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1405  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1406  ///
1407  /// \sa
1408  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1409  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1410  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1411  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1413  const wchar_t* in_pszEventName, ///< Name of the event
1414  AkGameObjectID in_gameObjectID , ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1415  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)
1416  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see note above)
1417  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.
1418  );
1419 #endif //AK_SUPPORT_WCHAR
1420 
1421  /// Seeks inside all playing objects that are referenced in Play Actions of the specified Event.
1422  /// Seek position is specified as a percentage of the sound's total duration, and takes looping into account.
1423  ///
1424  /// Notes:
1425  /// - This works with all objects of the actor-mixer hierarchy, and also with Music Segments and Music Switch Containers.
1426  /// - There is a restriction with sounds that play within a continuous sequence. Seeking is ignored
1427  /// if one of their ancestors is a continuous (random or sequence) container with crossfade or
1428  /// trigger rate transitions. Seeking is also ignored with sample-accurate transitions, unless
1429  /// the sound that is currently playing is the first sound of the sequence.
1430  /// - Seeking is also ignored with voices that can go virtual with "From Beginning" behavior.
1431  /// - If the option "Seek to nearest marker" is used, the seeking position snaps to the nearest marker.
1432  /// With objects of the actor-mixer hierarchy, markers are embedded in wave files by an external wave editor.
1433  /// Note that looping regions ("sampler loop") are not considered as markers. Also, the "add file name marker" of the
1434  /// conversion settings dialog adds a marker at the beginning of the file, which is considered when seeking
1435  /// to nearest marker. In the case of objects of the interactive music hierarchy, user (wave) markers are ignored:
1436  /// seeking occurs to the nearest segment cue (authored in the segment editor), including the Entry Cue, but excluding the Exit Cue.
1437  /// - This method posts a command in the sound engine queue, thus seeking will not occur before
1438  /// the audio thread consumes it (after a call to RenderAudio()).
1439  ///
1440  /// Notes specific to Music Segments:
1441  /// - With Music Segments, in_fPercent is relative to the Entry Cue, and the segment's duration is the
1442  /// duration between its entry and exit cues. Consequently, you cannot seek within the pre-entry or
1443  /// post-exit of a segment using this method. Use absolute values instead.
1444  /// - Music segments cannot be looped. You may want to listen to the AK_EndOfEvent notification
1445  /// in order to restart them if required.
1446  /// - In order to restart at the correct location, with all their tracks synchronized, Music Segments
1447  /// take the "look-ahead time" property of their streamed tracks into account for seeking.
1448  /// Consequently, the resulting position after a call to SeekOnEvent() might be earlier than the
1449  /// value that was passed to the method. Use <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt> to query
1450  /// the exact position of a segment. Also, the segment will be silent during the time that period
1451  /// (so that it restarts precisely at the position that you specified). <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1452  /// also informs you about the remaining look-ahead time.
1453  ///
1454  /// Notes specific to Music Switch Containers:
1455  /// - Seeking triggers a music transition towards the current (or target) segment.
1456  /// This transition is subject to the container's transition rule that matches the current and defined in the container,
1457  /// so the moment when seeking occurs depends on the rule's "Exit At" property. On the other hand, the starting position
1458  /// in the target segment depends on both the desired seeking position and the rule's "Sync To" property.
1459  /// - If the specified time is greater than the destination segment's length, the modulo is taken.
1460  ///
1461  /// \sa
1462  /// - <tt>AK::SoundEngine::RenderAudio()</tt>
1463  /// - <tt>AK::SoundEngine::PostEvent()</tt>
1464  /// - <tt>AK::SoundEngine::GetSourcePlayPosition()</tt>
1465  /// - <tt>AK::MusicEngine::GetPlayingSegmentInfo()</tt>
1467  const char* in_pszEventName, ///< Name of the event
1468  AkGameObjectID in_gameObjectID, ///< Associated game object ID; use AK_INVALID_GAME_OBJECT to affect all game objects
1469  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)
1470  bool in_bSeekToNearestMarker = false, ///< If true, the final seeking position will be made equal to the nearest marker (see notes above).
1471  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.
1472  );
1473 
1474  /// Cancels all Event callbacks associated with a specific callback cookie.\n
1475  /// \sa
1476  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1478  void * in_pCookie ///< Callback cookie to be cancelled
1479  );
1480 
1481  /// Cancels all Event callbacks associated with a specific game object.\n
1482  /// \sa
1483  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1485  AkGameObjectID in_gameObjectID ///< ID of the game object to be cancelled
1486  );
1487 
1488  /// Cancels all Event callbacks for a specific playing ID.
1489  /// \sa
1490  /// - \c <tt>AK::SoundEngine::PostEvent()</tt>
1492  AkPlayingID in_playingID ///< Playing ID of the event that must not use callbacks
1493  );
1494 
1495  /// Gets the current position of the source associated with this playing ID, obtained from PostEvent(). If more than one source is playing,
1496  /// the first to play is returned.
1497  /// Notes:
1498  /// - You need to pass AK_EnableGetSourcePlayPosition to PostEvent() in order to use this function, otherwise
1499  /// it returns AK_Fail, even if the playing ID is valid.
1500  /// - The source's position is updated at every audio frame, and the time at which this occurs is stored.
1501  /// When you call this function from your thread, you therefore query the position that was updated in the previous audio frame.
1502  /// If in_bExtrapolate is true (default), the returned position is extrapolated using the elapsed time since last
1503  /// sound engine update and the source's playback rate.
1504  /// \return
1505  /// - \c AK_Success if successful.
1506  /// - \c AK_InvalidParameter if the provided pointer is not valid.
1507  /// - \c AK_PlayingIDNotFound if the playing ID is invalid (not playing yet, or finished playing).
1508  /// \sa
1509  /// - \ref soundengine_query_pos
1510  /// - \ref concept_events
1512  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1513  AkTimeMs* out_puPosition, ///< Position of the source (in ms) associated with the specified playing ID
1514  bool in_bExtrapolate = true ///< Position is extrapolated based on time elapsed since last sound engine update.
1515  );
1516 
1517  /// Gets the current position of the sources associated with this playing ID, obtained from PostEvent().
1518  /// Notes:
1519  /// - You need to pass AK_EnableGetSourcePlayPosition to PostEvent() in order to use this function, otherwise
1520  /// it returns AK_Fail, even if the playing ID is valid.
1521  /// - The source's position is updated at every audio frame, and the time at which this occurs is stored.
1522  /// When you call this function from your thread, you therefore query the position that was updated in the previous audio frame.
1523  /// If in_bExtrapolate is true (default), the returned position is extrapolated using the elapsed time since last
1524  /// sound engine update and the source's playback rate.
1525  /// - If 0 is passed in for the number of entries (*in_pcPositions == 0) then only the number of positions will be returned and the
1526  /// position array (out_puPositions) will not be updated.
1527  /// - The io_pcPositions pointer must be non-NULL.
1528  /// out_puPositions may be NULL if *io_pcPositions == 0, otherwise it must be non-NULL.
1529  /// \return
1530  /// - \c AK_Success if successful.
1531  /// - \c AK_InvalidParameter if the provided pointer is not valid.
1532  /// - \c AK_PlayingIDNotFound if the playing ID is invalid (not playing yet, or finished playing).
1533  /// \sa
1534  /// - \ref soundengine_query_pos
1535  /// - \ref concept_events
1537  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1538  AkSourcePosition* out_puPositions, ///< Audio Node IDs and positions of sources associated with the specified playing ID
1539  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
1540  bool in_bExtrapolate = true ///< Position is extrapolated based on time elapsed since last sound engine update
1541  );
1542 
1543  /// Gets the stream buffering of the sources associated with this playing ID, obtained from PostEvent().
1544  /// Notes:
1545  /// - You need to pass AK_EnableGetSourceStreamBuffering to PostEvent() in order to use this function, otherwise
1546  /// it returns AK_Fail, even if the playing ID is valid.
1547  /// - The sources stream buffering is updated at every audio frame. If there are multiple sources associated with this playing ID,
1548  /// the value returned corresponds to the least buffered source.
1549  /// - The returned buffering status out_bIsBuffering will be true If any of the sources associated with the playing ID are actively being buffered.
1550  /// 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.
1551  /// - Purely in-memory sources are excluded from this database. If all sources are in-memory, GetSourceStreamBuffering() will return AK_Fail.
1552  /// - 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.
1553  /// 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.
1554  /// \return
1555  /// - \c AK_Success if successful.
1556  /// - \c AK_PlayingIDNotFound 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.
1557  /// \sa
1558  /// - \ref concept_events
1560  AkPlayingID in_PlayingID, ///< Playing ID returned by <tt>AK::SoundEngine::PostEvent()</tt>
1561  AkTimeMs & out_buffering, ///< Returned amount of buffering (in ms) of the source (or one of the sources) associated with that playing ID
1562  bool & out_bIsBuffering ///< Returned buffering status of the source(s) associated with that playing ID
1563  );
1564 
1565  /// Stops the current content playing associated to the specified game object ID.
1566  /// If no game object is specified, all sounds will be stopped.
1568  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT ///< (Optional)Specify a game object to stop only playback associated to the provided game object ID.
1569  );
1570 
1571  /// Stop the current content playing associated to the specified playing ID.
1572  /// \aknote
1573  /// This function is deprecated. Please use ExecuteActionOnPlayingID() in its place.
1574  /// \endaknote
1575  /// \sa
1576  /// - <tt>AK::SoundEngine::ExecuteActionOnPlayingID()</tt>
1578  AkPlayingID in_playingID, ///< Playing ID to be stopped.
1579  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
1580  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear ///< Curve type to be used for the transition
1581  );
1582 
1583  /// Executes an Action on the content associated to the specified playing ID.
1584  /// \sa
1585  /// - <tt>AK::SoundEngine::AkActionOnEventType</tt>
1587  AkActionOnEventType in_ActionType, ///< Action to execute on the specified playing ID.
1588  AkPlayingID in_playingID, ///< Playing ID on which to execute the action.
1589  AkTimeMs in_uTransitionDuration = 0, ///< Fade duration
1590  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear ///< Curve type to be used for the transition
1591  );
1592 
1593  /// Sets the random seed value. Can be used to synchronize randomness
1594  /// across instances of the Sound Engine.
1595  /// \remark This seeds the number generator used for all container randomizations
1596  /// and the plug-in RNG; since it acts globally, this should be called right
1597  /// before any PostEvent call where randomness synchronization is required,
1598  /// and cannot guarantee similar results for continuous containers.
1599  /// \sa
1600  /// - <tt>AK::IAkPluginServiceRNG</tt>
1602  AkUInt32 in_uSeed ///< Random seed.
1603  );
1604 
1605  /// Mutes/Unmutes the busses tagged as background music.
1606  /// This is automatically called for platforms that have user-music support.
1607  /// This function is provided to give the same behavior on platforms that don't have user-music support.
1609  bool in_bMute ///< Sets true to mute, false to unmute.
1610  );
1611  //@}
1612 
1613  /// Gets the state of the Background Music busses. This state is either set directly
1614  /// with \c AK::SoundEngine::MuteBackgroundMusic or by the OS, if it has User Music services.
1615  /// \return true if the background music busses are muted, false if not.
1617  //@}
1618 
1619 
1620  /// Sends custom game data to a plug-in that resides on a bus (insert Effect or mixer plug-in).
1621  /// Data will be copied and stored into a separate list.
1622  /// Previous entry is deleted when a new one is sent.
1623  /// Sets the data pointer to NULL to clear item from the list.
1624  /// \aknote The plug-in type and ID is passed and matched with plugins set on the desired bus.
1625  /// This means that you cannot send different data to various instances of the plug-in on a same bus.\endaknote
1626  /// \return AK_Success if data was sent successfully.
1628  AkUniqueID in_busID, ///< Bus ID
1629  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.
1630  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
1631  AkUInt32 in_uCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
1632  AkUInt32 in_uPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
1633  const void* in_pData, ///< The data blob
1634  AkUInt32 in_uSizeInBytes ///< Size of data
1635  );
1636  //@}
1637 
1638  ////////////////////////////////////////////////////////////////////////
1639  /// @name Game Objects
1640  //@{
1641 
1642  /// Registers a game object.
1643  /// \return
1644  /// - \c AK_Success if successful
1645  /// - \c AK_InvalidParameter if the specified AkGameObjectID is invalid (0 and -1 are invalid)
1646  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1647  /// matter how many times it has been registered.
1648  /// \sa
1649  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1650  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1651  /// - \ref concept_gameobjects
1653  AkGameObjectID in_gameObjectID ///< ID of the game object to be registered
1654  );
1655 
1656  /// Registers a game object.
1657  /// \return
1658  /// - \c AK_Success if successful
1659  /// - \c AK_InvalidParameter if the specified AkGameObjectID is invalid (0 and -1 are invalid)
1660  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1661  /// matter how many times it has been registered.
1662  /// \sa
1663  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1664  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1665  /// - \ref concept_gameobjects
1667  AkGameObjectID in_gameObjectID, ///< ID of the game object to be registered
1668  const char * in_pszObjName ///< Name of the game object (for monitoring purpose)
1669  );
1670 
1671  /// Unregisters a game object.
1672  /// \return
1673  /// - \c AK_Success if successful
1674  /// - \c AK_InvalidParameter if the specified AkGameObjectID is invalid (0 is an invalid ID)
1675  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1676  /// matter how many times it has been registered. Unregistering a game object while it is
1677  /// in use is allowed, but the control over the parameters of this game object is lost.
1678  /// For example, say a sound associated with this game object is a 3D moving sound. This sound will
1679  /// stop moving when the game object is unregistered, and there will be no way to regain control over the game object.
1680  /// \sa
1681  /// - <tt>AK::SoundEngine::RegisterGameObj()</tt>
1682  /// - <tt>AK::SoundEngine::UnregisterAllGameObj()</tt>
1683  /// - \ref concept_gameobjects
1685  AkGameObjectID in_gameObjectID ///< ID of the game object to be unregistered. Use
1686  /// AK_INVALID_GAME_OBJECT to unregister all game objects.
1687  );
1688 
1689  /// Unregister all game objects, or all game objects with a particular matching set of property flags.
1690  /// This function to can be used to unregister all game objects.
1691  /// \return
1692  /// - \c AK_Success if successful
1693  /// \remark Registering a game object twice does nothing. Unregistering it once unregisters it no
1694  /// matter how many times it has been registered. Unregistering a game object while it is
1695  /// in use is allowed, but the control over the parameters of this game object is lost.
1696  /// For example, if a sound associated with this game object is a 3D moving sound, it will
1697  /// stop moving once the game object is unregistered, and there will be no way to recover
1698  /// the control over this game object.
1699  /// \sa
1700  /// - <tt>AK::SoundEngine::RegisterGameObj()</tt>
1701  /// - <tt>AK::SoundEngine::UnregisterGameObj()</tt>
1702  /// - \ref concept_gameobjects
1704  );
1705 
1706  /// Sets the position of a game object.
1707  /// \warning The object's orientation vector (in_Position.Orientation) must be normalized.
1708  /// \return
1709  /// - \c AK_Success when successful
1710  /// - \c AK_InvalidParameter if parameters are not valid, for example:
1711  /// + in_Position makes an invalid transform
1712  /// + in_eFlags is not one of the valid enum values
1713  /// + the game object ID is in the reserved ID range.
1714  /// \sa
1715  /// - \ref soundengine_3dpositions
1717  AkGameObjectID in_GameObjectID, ///< Game Object identifier
1718  const AkSoundPosition & in_Position,///< Position to set; in_Position.Orientation must be normalized.
1719  AkSetPositionFlags in_eFlags = AkSetPositionFlags_Default ///< Optional flags to independently set the position of the emitter or listener component.
1720  );
1721 
1722  /// Sets multiple positions to a single game object.
1723  /// Setting multiple positions on a single game object is a way to simulate multiple emission sources while using the resources of only one voice.
1724  /// This can be used to simulate wall openings, area sounds, or multiple objects emitting the same sound in the same area.
1725  /// \aknote
1726  /// - Calling <tt>AK::SoundEngine::SetMultiplePositions()</tt> with only one position is the same as calling <tt>AK::SoundEngine::SetPosition()</tt>
1727  /// - If a sound has diffraction enabled, it is treated as <tt>MultiPositionType_MultiDirections</tt>. <tt>MultiPositionType_MultiSources</tt> is not supported in this case.
1728  /// \endaknote
1729  /// \return
1730  /// - \c AK_Success when successful
1731  /// - \c AK_CommandTooLarge if the number of positions is too large for the command queue. Reduce the number of positions.
1732  /// - \c AK_InvalidParameter if parameters are not valid, for example:
1733  /// + in_Position makes an invalid transform
1734  /// + in_eFlags is not one of the valid enum values
1735  /// + the game object ID is in the reserved ID range.
1736  /// \sa
1737  /// - \ref soundengine_3dpositions
1738  /// - \ref soundengine_3dpositions_multiplepos
1739  /// - \ref AK::SoundEngine::MultiPositionType
1741  AkGameObjectID in_GameObjectID, ///< Game Object identifier.
1742  const AkSoundPosition * in_pPositions, ///< Array of positions to apply.
1743  AkUInt16 in_NumPositions, ///< Number of positions specified in the provided array.
1744  MultiPositionType in_eMultiPositionType = MultiPositionType_MultiDirections, ///< \ref AK::SoundEngine::MultiPositionType
1745  AkSetPositionFlags in_eFlags = AkSetPositionFlags_Default ///< Optional flags to independently set the position of the emitter or listener component.
1746  );
1747 
1748  /// Sets multiple positions to a single game object, with flexible assignment of input channels.
1749  /// Setting multiple positions on a single game object is a way to simulate multiple emission sources while using the resources of only one voice.
1750  /// This can be used to simulate wall openings, area sounds, or multiple objects emitting the same sound in the same area.
1751  /// \aknote Calling <tt>AK::SoundEngine::SetMultiplePositions()</tt> with only one position is the same as calling <tt>AK::SoundEngine::SetPosition()</tt> \endaknote
1752  /// \return
1753  /// - \c AK_Success when successful
1754  /// - \c AK_CommandTooLarge if the number of positions is too large for the command queue. Reduce the number of positions.
1755  /// - \c AK_InvalidParameter if parameters are not valid.
1756  /// \sa
1757  /// - \ref soundengine_3dpositions
1758  /// - \ref soundengine_3dpositions_multiplepos
1759  /// - \ref AK::SoundEngine::MultiPositionType
1761  AkGameObjectID in_GameObjectID, ///< Game Object identifier.
1762  const AkChannelEmitter * in_pPositions, ///< Array of positions to apply, each using its own channel mask.
1763  AkUInt16 in_NumPositions, ///< Number of positions specified in the provided array.
1764  MultiPositionType in_eMultiPositionType = MultiPositionType_MultiDirections, ///< \ref AK::SoundEngine::MultiPositionType
1765  AkSetPositionFlags in_eFlags = AkSetPositionFlags_Default ///< Optional flags to independently set the position of the emitter or listener component.
1766  );
1767 
1768  /// Sets the scaling factor of a Game Object.
1769  /// Modify the attenuation computations on this Game Object to simulate sounds with a larger or smaller area of effect.
1770  /// \return
1771  /// - \c AK_Success when successful
1772  /// - \c AK_InvalidParameter if the scaling factor specified was 0 or negative.
1773  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
1775  AkGameObjectID in_GameObjectID, ///< Game object identifier
1776  AkReal32 in_fAttenuationScalingFactor ///< Scaling Factor, 1 means 100%, 0.5 means 50%, 2 means 200%, and so on.
1777  );
1778 
1779  /// Use the position of a separate game object for distance calculations for a specified listener.
1780  /// When <tt>AK::SoundEngine::SetDistanceProbe()</tt> is called, Wwise calculates distance attenuation and filtering
1781  /// based on the distance between the distance probe Game Object (\c in_distanceProbeGameObjectID) and the emitter Game Object's position.
1782  /// In third-person perspective applications, the distance probe Game Object may be set to the player character's position,
1783  /// and the listener Game Object's position to that of the camera. In this scenario, attenuation is based on
1784  /// the distance between the character and the sound, whereas panning, spatialization, and spread and focus calculations are base on the camera.
1785  /// Both Game Objects, \c in_listenerGameObjectID and \c in_distanceProbeGameObjectID must have been previously registered using <tt>AK::SoundEngine::RegisterGameObj</tt>.
1786  /// This funciton is optional. if <tt>AK::SoundEngine::SetDistanceProbe()</tt> is never called, distance calculations are based on the listener Game Object position.
1787  /// To clear the distance probe, and revert to using the listener position for distance calculations, pass \c AK_INVALID_GAME_OBJECT to \c in_distanceProbeGameObjectID.
1788  /// \aknote If the distance probe Game Object is assigned multiple positions, then the first position is used for distance calculations by the listener. \endaknote
1789  /// \return
1790  /// - \c AK_Success when successful
1791  /// \sa
1792  /// - <tt>AK::SoundEngine::SetPosition()</tt>
1794  AkGameObjectID in_listenerGameObjectID, ///< Game object identifier for the listener. Must have been previously registered via RegisterGameObj.
1795  AkGameObjectID in_distanceProbeGameObjectID ///< Game object identifier for the distance probe, or \c AK_INVALID_GAME_OBJECT to reset distance probe. If valid, must have been previously registered via RegisterGameObj.
1796  );
1797 
1798  //@}
1799 
1800  ////////////////////////////////////////////////////////////////////////
1801  /// @name Bank Management
1802  //@{
1803 
1804  /// Unload all currently loaded banks.
1805  /// It also internally calls ClearPreparedEvents() since at least one bank must have been loaded to allow preparing events.
1806  /// \return
1807  /// - \c AK_Success if successful
1808  /// - \c AK_NotInitialized if the sound engine was not correctly initialized or if there is not enough memory to handle the command
1809  /// \sa
1810  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1811  /// - <tt>AK::SoundEngine::LoadBank()</tt>
1812  /// - \ref soundengine_banks
1814 
1815  /// Sets the I/O settings of the bank load and prepare event processes.
1816  /// The sound engine uses default values unless explicitly set by calling this method.
1817  /// \warning This function must be called before loading banks.
1818  /// \return
1819  /// - \c AK_Success if successful
1820  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
1821  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
1822  /// \sa
1823  /// - \ref soundengine_banks
1824  /// - \ref streamingdevicemanager
1826  AkReal32 in_fThroughput, ///< Average throughput of bank data streaming (bytes/ms) (the default value is AK_DEFAULT_BANK_THROUGHPUT)
1827  AkPriority in_priority ///< Priority of bank streaming (the default value is AK_DEFAULT_PRIORITY)
1828  );
1829 
1830 #ifdef AK_SUPPORT_WCHAR
1831  /// Load a bank synchronously (by Unicode string).\n
1832  /// The bank name and type are passed to the Stream Manager.
1833  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1834  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1835  /// The function returns when the request has been completely processed.
1836  /// \return
1837  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1838  /// You may use this ID with UnloadBank().
1839  /// - \c AK_Success: Load or unload successful.
1840  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
1841  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
1842  /// - \c AK_BankReadError: I/O error.
1843  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that you used to generate the SoundBanks matches that of the SDK you are currently using.
1844  /// - \c AK_InvalidFile: File specified could not be opened.
1845  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
1846  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
1847  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
1848  /// - \c AK_InvalidBankType if the bank type parameter is out of range.
1849  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure, check the debug console)
1850  /// \remarks
1851  /// - The initialization bank must be loaded first.
1852  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1853  /// initialization bank. If you need to load SoundBanks from a different project, you
1854  /// must first unload ALL banks, including the initialization bank, then load the
1855  /// initialization bank from the other project, and finally load banks from that project.
1856  /// - Codecs and plug-ins must be registered before loading banks that use them.
1857  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1858  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1859  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1860  /// posting the event will fail.
1861  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1862  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1863  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1864  /// your implementation of the Stream Manager, or in the Low-Level I/O module if you use the default Stream Manager's implementation.
1865  /// \sa
1866  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1867  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1868  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
1869  /// - \ref soundengine_banks
1870  /// - \ref integrating_elements_plugins
1871  /// - \ref streamingdevicemanager
1872  /// - \ref streamingmanager_lowlevel
1873  /// - \ref sdk_bank_training
1875  const wchar_t* in_pszString, ///< Name of the bank to load
1876  AkBankID & out_bankID, ///< Returned bank ID
1877  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
1878  );
1879 #endif //AK_SUPPORT_WCHAR
1880 
1881  /// Loads a bank synchronously.\n
1882  /// The bank name and type are passed to the Stream Manager.
1883  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1884  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1885  /// The function returns when the request has been completely processed.
1886  /// \return
1887  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
1888  /// You may use this ID with UnloadBank().
1889  /// - \c AK_Success: Load or unload successful.
1890  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
1891  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
1892  /// - \c AK_BankReadError: I/O error.
1893  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1894  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1895  /// - \c AK_InvalidFile: File specified could not be opened.
1896  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
1897  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
1898  /// - \c AK_InvalidBankType if the bank type parameter is out of range.
1899  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1900  /// \remarks
1901  /// - The initialization bank must be loaded first.
1902  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1903  /// initialization bank. If you need to load SoundBanks from a different project, you
1904  /// must first unload ALL banks, including the initialization bank, then load the
1905  /// initialization bank from the other project, and finally load banks from that project.
1906  /// - Codecs and plug-ins must be registered before loading banks that use them.
1907  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1908  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1909  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1910  /// posting the event will fail.
1911  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
1912  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
1913  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
1914  /// your implementation of the Stream Manager, or in the Low-Level I/O module if you use the default Stream Manager's implementation.
1915  /// \sa
1916  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1917  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1918  /// - <tt>AK::SoundEngine::GetIDFromString</tt>
1919  /// - \ref soundengine_banks
1920  /// - \ref integrating_elements_plugins
1921  /// - \ref streamingdevicemanager
1922  /// - \ref streamingmanager_lowlevel
1923  /// - \ref sdk_bank_training
1925  const char* in_pszString, ///< Name of the bank to load
1926  AkBankID & out_bankID, ///< Returned bank ID
1927  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
1928  );
1929 
1930  /// Loads a bank synchronously (by ID).\n
1931  /// \aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
1932  /// The bank ID is passed to the Stream Manager.
1933  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
1934  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1935  /// The function returns when the request has been completely processed.
1936  /// \return
1937  /// - \c AK_Success: Load or unload successful.
1938  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
1939  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
1940  /// - \c AK_BankReadError: I/O error. The bank is either shorter than expected or its data corrupted.
1941  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1942  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1943  /// - \c AK_InvalidFile: File specified could not be opened.
1944  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
1945  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console or Wwise Profiler
1946  /// - \c AK_InvalidBankType if the bank type parameter is out of range.
1947  /// - \c AK_FileNotFound if the bank file was not found on disk.
1948  /// - \c AK_FilePermissionError if the file permissions are wrong for the file
1949  /// - \c AK_Fail: Load or unload failed for any other reason. , check the debug console or Wwise Profiler
1950  /// \remarks
1951  /// - The initialization bank must be loaded first.
1952  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
1953  /// initialization bank. If you need to load SoundBanks from a different project, you
1954  /// must first unload ALL banks, including the initialization bank, then load the
1955  /// initialization bank from the other project, and finally load banks from that project.
1956  /// - Codecs and plug-ins must be registered before loading banks that use them.
1957  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1958  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1959  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1960  /// posting the event will fail.
1961  /// \sa
1962  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
1963  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
1964  /// - \ref soundengine_banks
1965  /// - \ref integrating_elements_plugins
1966  /// - \ref sdk_bank_training
1968  AkBankID in_bankID, ///< Bank ID of the bank to load
1969  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
1970  );
1971 
1972  /// Loads a bank synchronously (from in-memory data, in-place, user bank only).\n
1973  ///
1974  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
1975  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
1976  ///
1977  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
1978  /// in a buffer and pass its address to the sound engine.
1979  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
1980  /// A bank load request will be posted, and consumed by the Bank Manager thread.
1981  /// The function returns when the request has been completely processed.
1982  /// \return
1983  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
1984  /// ID with UnloadBank().
1985  /// - \c AK_Success: Load or unload successful.
1986  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
1987  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
1988  /// - \c AK_BankReadError: I/O error.
1989  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
1990  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
1991  /// - \c AK_InvalidFile: File specified could not be opened.
1992  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
1993  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
1994  /// - \c AK_InvalidBankType if the bank is not a user-defined bank.
1995  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
1996  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
1997  /// \remarks
1998  /// - The initialization bank must be loaded first.
1999  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2000  /// initialization bank. If you need to load SoundBanks from a different project, you
2001  /// must first unload ALL banks, including the initialization bank, then load the
2002  /// initialization bank from the other project, and finally load banks from that project.
2003  /// - Codecs and plug-ins must be registered before loading banks that use them.
2004  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2005  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2006  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2007  /// posting the event will fail.
2008  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
2009  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
2010  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
2011  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
2012  /// \sa
2013  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2014  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2015  /// - \ref soundengine_banks
2016  /// - \ref integrating_elements_plugins
2017  /// - \ref sdk_bank_training
2019  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
2020  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2021  AkBankID & out_bankID ///< Returned bank ID
2022  );
2023 
2024  /// Loads a bank synchronously (from in-memory data, in-place, any bank type).\n
2025  ///
2026  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
2027  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
2028  ///
2029  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
2030  /// in a buffer and pass its address to the sound engine.
2031  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
2032  /// A bank load request will be posted, and consumed by the Bank Manager thread.
2033  /// The function returns when the request has been completely processed.
2034  /// \return
2035  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
2036  /// ID with UnloadBank().
2037  /// - \c AK_Success: Load or unload successful.
2038  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
2039  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2040  /// - \c AK_BankReadError: I/O error.
2041  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2042  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2043  /// - \c AK_InvalidFile: File specified could not be opened.
2044  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
2045  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
2046  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2047  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2048  /// \remarks
2049  /// - The initialization bank must be loaded first.
2050  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2051  /// initialization bank. If you need to load SoundBanks from a different project, you
2052  /// must first unload ALL banks, including the initialization bank, then load the
2053  /// initialization bank from the other project, and finally load banks from that project.
2054  /// - Codecs and plug-ins must be registered before loading banks that use them.
2055  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2056  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2057  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2058  /// posting the event will fail.
2059  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
2060  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
2061  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
2062  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
2063  /// \sa
2064  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2065  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2066  /// - \ref soundengine_banks
2067  /// - \ref integrating_elements_plugins
2068  /// - \ref sdk_bank_training
2070  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
2071  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2072  AkBankID & out_bankID, ///< Returned bank ID
2073  AkBankType & out_bankType ///< Returned bank type
2074  );
2075 
2076  /// Loads a bank synchronously (from in-memory data, out-of-place, user bank only).\n
2077  ///
2078  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
2079  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
2080  ///
2081  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
2082  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly
2083  /// allocated memory.
2084  /// In-memory loading is out-of-place: the buffer can be release as soon as the function returns. The advantage of using this
2085  /// over the in-place version is that there is no duplication of bank structures.
2086  /// A bank load request will be posted, and consumed by the Bank Manager thread.
2087  /// The function returns when the request has been completely processed.
2088  /// \return
2089  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
2090  /// ID with UnloadBank().
2091  /// - \c AK_Success: Load or unload successful.
2092  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
2093  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2094  /// - \c AK_BankReadError: I/O error.
2095  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2096  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2097  /// - \c AK_InvalidFile: File specified could not be opened.
2098  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
2099  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
2100  /// - \c AK_InvalidBankType if the bank is not a user-defined bank.
2101  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2102  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2103  /// \remarks
2104  /// - The initialization bank must be loaded first.
2105  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2106  /// initialization bank. If you need to load SoundBanks from a different project, you
2107  /// must first unload ALL banks, including the initialization bank, then load the
2108  /// initialization bank from the other project, and finally load banks from that project.
2109  /// - Codecs and plug-ins must be registered before loading banks that use them.
2110  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2111  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2112  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2113  /// posting the event will fail.
2114  /// \sa
2115  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2116  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2117  /// - \ref soundengine_banks
2118  /// - \ref integrating_elements_plugins
2119  /// - \ref sdk_bank_training
2121  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)
2122  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2123  AkBankID & out_bankID ///< Returned bank ID
2124  );
2125 
2126  /// Loads a bank synchronously (from in-memory data, out-of-place, any bank type).\n
2127  ///
2128  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
2129  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
2130  ///
2131  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
2132  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly
2133  /// allocated memory.
2134  /// In-memory loading is out-of-place: the buffer can be release as soon as the function returns. The advantage of using this
2135  /// over the in-place version is that there is no duplication of bank structures.
2136  /// A bank load request will be posted, and consumed by the Bank Manager thread.
2137  /// The function returns when the request has been completely processed.
2138  /// \return
2139  /// The bank ID, which is stored in the first few bytes of the bank file. You may use this
2140  /// ID with UnloadBank().
2141  /// - \c AK_Success: Load or unload successful.
2142  /// - \c AK_BankAlreadyLoaded: This bank is already loaded, nothing done.
2143  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2144  /// - \c AK_BankReadError: I/O error.
2145  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2146  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2147  /// - \c AK_InvalidFile: File specified could not be opened.
2148  /// - \c AK_NotInitialized if the sound engine was not correctly initialized
2149  /// - \c AK_InvalidParameter if some parameters are invalid, check the debug console
2150  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2151  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2152  /// \remarks
2153  /// - The initialization bank must be loaded first.
2154  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2155  /// initialization bank. If you need to load SoundBanks from a different project, you
2156  /// must first unload ALL banks, including the initialization bank, then load the
2157  /// initialization bank from the other project, and finally load banks from that project.
2158  /// - Codecs and plug-ins must be registered before loading banks that use them.
2159  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2160  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2161  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2162  /// posting the event will fail.
2163  /// \sa
2164  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2165  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2166  /// - \ref soundengine_banks
2167  /// - \ref integrating_elements_plugins
2168  /// - \ref sdk_bank_training
2170  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)
2171  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2172  AkBankID & out_bankID, ///< Returned bank ID
2173  AkBankType & out_bankType ///< Returned bank type
2174  );
2175 
2176  /// 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.
2177  /// \n
2178  /// 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.
2180  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)
2181  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to decode
2182  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.
2183  void * & out_pDecodedBankPtr, ///< Decoded bank memory location.
2184  AkUInt32 & out_uDecodedBankSize ///< Decoded bank memory size.
2185  );
2186 
2187 #ifdef AK_SUPPORT_WCHAR
2188  /// Loads a bank asynchronously (by Unicode string).\n
2189  /// The bank name is passed to the Stream Manager.
2190  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2191  /// A bank load request will be posted to the Bank Manager consumer thread.
2192  /// The function returns immediately.
2193  /// \return
2194  /// AK_Success if the scheduling was successful, AK_Fail otherwise.
2195  /// Use a callback to be notified when completed, and get the status of the request.
2196  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2197  /// You may use this ID with UnloadBank().
2198  /// \remarks
2199  /// - The initialization bank must be loaded first.
2200  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2201  /// initialization bank. If you need to load SoundBanks from a different project, you
2202  /// must first unload ALL banks, including the initialization bank, then load the
2203  /// initialization bank from the other project, and finally load banks from that project.
2204  /// - Codecs and plug-ins must be registered before loading banks that use them.
2205  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2206  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2207  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2208  /// posting the event will fail.
2209  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
2210  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2211  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
2212  /// your implementation of the Stream Manager (<tt>AK::IAkStreamMgr::CreateStd()</tt>), or in the Low-Level I/O module
2213  /// (<tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>) if you use the default Stream Manager's implementation.
2214  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
2215  // as AkFileSystemFlags::pCustomParam.
2216  /// \sa
2217  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2218  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2219  /// - AkBankCallbackFunc
2220  /// - \ref soundengine_banks
2221  /// - \ref integrating_elements_plugins
2222  /// - \ref streamingdevicemanager
2223  /// - \ref streamingmanager_lowlevel
2224  /// - \ref sdk_bank_training
2226  const wchar_t* in_pszString, ///< Name/path of the bank to load
2227  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2228  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)
2229  AkBankID & out_bankID, ///< Returned bank ID
2230  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
2231  );
2232 #endif //AK_SUPPORT_WCHAR
2233 
2234  /// Loads a bank asynchronously.\n
2235  /// The bank name is passed to the Stream Manager.
2236  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2237  /// A bank load request will be posted to the Bank Manager consumer thread.
2238  /// The function returns immediately.
2239  /// \return
2240  /// - \c AK_Success if the scheduling was successful,
2241  /// - \c AK_InvalidBankType if in_bankType was invalid
2242  /// Use a callback to be notified when completed, and get the status of the request.
2243  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2244  /// You may use this ID with UnloadBank().
2245  /// \remarks
2246  /// - The initialization bank must be loaded first.
2247  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2248  /// initialization bank. If you need to load SoundBanks from a different project, you
2249  /// must first unload ALL banks, including the initialization bank, then load the
2250  /// initialization bank from the other project, and finally load banks from that project.
2251  /// - Codecs and plug-ins must be registered before loading banks that use them.
2252  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2253  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2254  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2255  /// posting the Event will fail.
2256  /// - The sound engine internally calls GetIDFromString(in_pszString) to return the correct bank ID.
2257  /// Therefore, \c in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2258  /// not the name of the file (if you changed it), nor the full path of the file. The path should be resolved in
2259  /// your implementation of the Stream Manager (<tt>AK::IAkStreamMgr::CreateStd()</tt>), or in the Low-Level I/O module
2260  /// (<tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>) if you use the default Stream Manager's implementation.
2261  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
2262  // as <tt>AkFileSystemFlags::pCustomParam</tt>.
2263  /// \sa
2264  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2265  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2266  /// - AkBankCallbackFunc
2267  /// - \ref soundengine_banks
2268  /// - \ref integrating_elements_plugins
2269  /// - \ref streamingdevicemanager
2270  /// - \ref streamingmanager_lowlevel
2271  /// - \ref sdk_bank_training
2273  const char* in_pszString, ///< Name/path of the bank to load
2274  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2275  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)
2276  AkBankID & out_bankID, ///< Returned bank ID
2277  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
2278  );
2279 
2280  /// Loads a bank asynchronously (by ID).\n
2281  /// \aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2282  /// The bank ID is passed to the Stream Manager.
2283  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2284  /// A bank load request will be posted to the Bank Manager consumer thread.
2285  /// The function returns immediately.
2286  /// \return
2287  /// - \c AK_Success if the scheduling was successful,
2288  /// - \c AK_InvalidBankType if in_bankType was invalid
2289  /// Use a callback to be notified when completed, and get the status of the request.
2290  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2291  /// You may use this ID with \c UnloadBank().
2292  /// \remarks
2293  /// - The initialization bank must be loaded first.
2294  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2295  /// initialization bank. If you need to load SoundBanks from a different project, you
2296  /// must first unload ALL banks, including the initialization bank, then load the
2297  /// initialization bank from the other project, and finally load banks from that project.
2298  /// - Codecs and plug-ins must be registered before loading banks that use them.
2299  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2300  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2301  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2302  /// posting the event will fail.
2303  /// - The file path should be resolved in your implementation of the Stream Manager, or in the Low-Level I/O module if
2304  /// 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.
2305  /// - The cookie (in_pCookie) is passed to the Low-Level I/O module for your convenience, in <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>
2306  // as AkFileSystemFlags::pCustomParam.
2307  /// \sa
2308  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2309  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2310  /// - AkBankCallbackFunc
2311  /// - \ref soundengine_banks
2312  /// - \ref integrating_elements_plugins
2313  /// - \ref sdk_bank_training
2315  AkBankID in_bankID, ///< Bank ID of the bank to load
2316  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2317  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)
2318  AkBankType in_bankType = AkBankType_User ///< Type of the bank to load
2319  );
2320 
2321  /// Loads a bank asynchronously (from in-memory data, in-place, user bank only).\n
2322  ///
2323  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
2324  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
2325  ///
2326  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
2327  /// in a buffer and pass its address to the sound engine.
2328  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
2329  /// A bank load request will be posted to the Bank Manager consumer thread.
2330  /// The function returns immediately.
2331  /// \return
2332  /// - \c AK_Success if the scheduling was successful,
2333  /// - \c AK_InvalidBankType if the bank is not a user-defined bank.
2334  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2335  /// Use a callback to be notified when completed, and get the status of the request.
2336  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2337  /// You may use this ID with UnloadBank().
2338  /// \remarks
2339  /// - The initialization bank must be loaded first.
2340  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2341  /// initialization bank. If you need to load SoundBanks from a different project, you
2342  /// must first unload ALL banks, including the initialization bank, then load the
2343  /// initialization bank from the other project, and finally load banks from that project.
2344  /// - Codecs and plug-ins must be registered before loading banks that use them.
2345  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2346  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2347  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2348  /// posting the event will fail.
2349  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
2350  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
2351  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
2352  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
2353  /// \sa
2354  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2355  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2356  /// - AkBankCallbackFunc
2357  /// - \ref soundengine_banks
2358  /// - \ref integrating_elements_plugins
2359  /// - \ref sdk_bank_training
2361  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
2362  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2363  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2364  void * in_pCookie, ///< Callback cookie
2365  AkBankID & out_bankID ///< Returned bank ID
2366  );
2367 
2368  /// Loads a bank asynchronously (from in-memory data, in-place, any bank type).\n
2369  ///
2370  /// IMPORTANT: Banks loaded from memory with in-place data MUST be unloaded using the UnloadBank function
2371  /// providing the same memory pointer. Make sure you are using the correct UnloadBank(...) overload
2372  ///
2373  /// Use LoadBankMemoryView when you want to manage I/O on your side. Load the bank file
2374  /// in a buffer and pass its address to the sound engine.
2375  /// In-memory loading is in-place: *** the memory must be valid until the bank is unloaded. ***
2376  /// A bank load request will be posted to the Bank Manager consumer thread.
2377  /// The function returns immediately.
2378  /// \return
2379  /// - \c AK_Success if the scheduling was successful,
2380  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2381  /// Use a callback to be notified when completed, and get the status of the request.
2382  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2383  /// You may use this ID with UnloadBank().
2384  /// \remarks
2385  /// - The initialization bank must be loaded first.
2386  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2387  /// initialization bank. If you need to load SoundBanks from a different project, you
2388  /// must first unload ALL banks, including the initialization bank, then load the
2389  /// initialization bank from the other project, and finally load banks from that project.
2390  /// - Codecs and plug-ins must be registered before loading banks that use them.
2391  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2392  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2393  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2394  /// posting the event will fail.
2395  /// - The memory must be aligned on platform-specific AK_BANK_PLATFORM_DATA_ALIGNMENT bytes (see AkTypes.h).
2396  /// - (XboxOne only): If the bank may contain XMA in memory data, the memory must be allocated using the Device memory allocator.
2397  /// - Avoid using this function for banks containing a lot of events or structure data: this data will be unpacked into the sound engine heap,
2398  /// making the supplied bank memory redundant. For event/structure-only banks, prefer LoadBankMemoryCopy().
2399  /// \sa
2400  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2401  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2402  /// - AkBankCallbackFunc
2403  /// - \ref soundengine_banks
2404  /// - \ref integrating_elements_plugins
2405  /// - \ref sdk_bank_training
2407  const void * in_pInMemoryBankPtr, ///< Pointer to the in-memory bank to load (pointer is stored in sound engine, memory must remain valid)
2408  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2409  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2410  void * in_pCookie, ///< Callback cookie
2411  AkBankID & out_bankID, ///< Returned bank ID
2412  AkBankType & out_bankType ///< Returned bank type
2413  );
2414 
2415  /// Loads a bank asynchronously (from in-memory data, out-of-place, user bank only).\n
2416  ///
2417  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
2418  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
2419  ///
2420  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
2421  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly allocated
2422  /// memory.
2423  /// In-memory loading is out-of-place: the buffer can be released after the callback function is called. The advantage of using this
2424  /// over the in-place version is that there is no duplication of bank structures.
2425  /// A bank load request will be posted to the Bank Manager consumer thread.
2426  /// The function returns immediately.
2427  /// \return
2428  /// - \c AK_Success if the scheduling was successful,
2429  /// - \c AK_InvalidBankType if the bank is not a user-defined bank.
2430  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2431  /// Use a callback to be notified when completed, and get the status of the request.
2432  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2433  /// You may use this ID with UnloadBank().
2434  /// \remarks
2435  /// - The initialization bank must be loaded first.
2436  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2437  /// initialization bank. If you need to load SoundBanks from a different project, you
2438  /// must first unload ALL banks, including the initialization bank, then load the
2439  /// initialization bank from the other project, and finally load banks from that project.
2440  /// - Codecs and plug-ins must be registered before loading banks that use them.
2441  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2442  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2443  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2444  /// posting the event will fail.
2445  /// \sa
2446  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2447  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2448  /// - AkBankCallbackFunc
2449  /// - \ref soundengine_banks
2450  /// - \ref integrating_elements_plugins
2451  /// - \ref sdk_bank_training
2453  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)
2454  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2455  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2456  void* in_pCookie, ///< Callback cookie
2457  AkBankID& out_bankID ///< Returned bank ID
2458  );
2459 
2460  /// Loads a bank asynchronously (from in-memory data, out-of-place, any bank type).\n
2461  ///
2462  /// NOTE: Banks loaded from in-memory with out-of-place data must be unloaded using the standard UnloadBank function
2463  /// (with no memory pointer). Make sure you are using the correct UnloadBank(...) overload
2464  ///
2465  /// Use LoadBankMemoryCopy when you want to manage I/O on your side. Load the bank file
2466  /// in a buffer and pass its address to the sound engine, the media section of the bank will be copied into newly allocated
2467  /// memory.
2468  /// In-memory loading is out-of-place: the buffer can be released after the callback function is called. The advantage of using this
2469  /// over the in-place version is that there is no duplication of bank structures.
2470  /// A bank load request will be posted to the Bank Manager consumer thread.
2471  /// The function returns immediately.
2472  /// \return
2473  /// - \c AK_Success if the scheduling was successful,
2474  /// - \c AK_InvalidBankType if in_bankType was invalid
2475  /// - \c AK_DataAlignmentError if the data pointer is not aligned properly
2476  /// Use a callback to be notified when completed, and get the status of the request.
2477  /// The bank ID, which is obtained by hashing the bank name (see GetIDFromString()).
2478  /// You may use this ID with UnloadBank().
2479  /// \remarks
2480  /// - The initialization bank must be loaded first.
2481  /// - All SoundBanks subsequently loaded must come from the same Wwise project as the
2482  /// initialization bank. If you need to load SoundBanks from a different project, you
2483  /// must first unload ALL banks, including the initialization bank, then load the
2484  /// initialization bank from the other project, and finally load banks from that project.
2485  /// - Codecs and plug-ins must be registered before loading banks that use them.
2486  /// - Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
2487  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
2488  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
2489  /// posting the event will fail.
2490  /// \sa
2491  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2492  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2493  /// - AkBankCallbackFunc
2494  /// - \ref soundengine_banks
2495  /// - \ref integrating_elements_plugins
2496  /// - \ref sdk_bank_training
2498  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)
2499  AkUInt32 in_uInMemoryBankSize, ///< Size of the in-memory bank to load
2500  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2501  void * in_pCookie, ///< Callback cookie
2502  AkBankID & out_bankID, ///< Returned bank ID
2503  AkBankType & out_bankType ///< Returned bank type
2504  );
2505 
2506 #ifdef AK_SUPPORT_WCHAR
2507  /// Unloads a bank synchronously (by Unicode string).\n
2508  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2509  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2510  /// \remarks
2511  /// - The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2512  /// then it calls the synchronous version of UnloadBank() by ID.
2513  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2514  /// not the name of the file (if you changed it), nor the full path of the file.
2515  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2516  /// This means that streamed sounds or generated sounds will not be stopped.
2517  /// \sa
2518  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2519  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2520  /// - \ref soundengine_banks
2522  const wchar_t* in_pszString, ///< Name of the bank to unload
2523  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2524  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2525  );
2526 #endif //AK_SUPPORT_WCHAR
2527 
2528  /// Unloads a bank synchronously.\n
2529  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2530  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2531  /// \remarks
2532  /// - The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2533  /// then it calls the synchronous version of UnloadBank() by ID.
2534  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2535  /// not the name of the file (if you changed it), nor the full path of the file.
2536  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2537  /// This means that streamed sounds or generated sounds will not be stopped.
2538  /// \sa
2539  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2540  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2541  /// - \ref soundengine_banks
2543  const char* in_pszString, ///< Name of the bank to unload
2544  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2545  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2546  );
2547 
2548  /// Unloads a bank synchronously (by ID and memory pointer).\n
2549  /// \return AK_Success if successful, AK_Fail otherwise. AK_Success is returned when the bank was not loaded.
2550  /// \remarks
2551  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2552  /// This means that streamed sounds or generated sounds will not be stopped.
2553  /// \sa
2554  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2555  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2556  /// - \ref soundengine_banks
2558  AkBankID in_bankID, ///< ID of the bank to unload
2559  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2560  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2561  );
2562 
2563 #ifdef AK_SUPPORT_WCHAR
2564  /// Unloads a bank asynchronously (by Unicode string).\n
2565  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2566  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2567  /// \remarks
2568  /// The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2569  /// then it calls the synchronous version of UnloadBank() by ID.
2570  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2571  /// not the name of the file (if you changed it), nor the full path of the file.
2572  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2573  /// This means that streamed sounds or generated sounds will not be stopped.
2574  /// \sa
2575  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2576  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2577  /// - AkBankCallbackFunc
2578  /// - \ref soundengine_banks
2580  const wchar_t* in_pszString, ///< Name of the bank to unload
2581  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2582  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2583  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2584  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2585  );
2586 #endif //AK_SUPPORT_WCHAR
2587 
2588  /// Unloads a bank asynchronously.\n
2589  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2590  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2591  /// \remarks
2592  /// The sound engine internally calls GetIDFromString(in_pszString) to retrieve the bank ID,
2593  /// then it calls the synchronous version of UnloadBank() by ID.
2594  /// Therefore, in_pszString should be the real name of the SoundBank (with or without the BNK extension - it is trimmed internally),
2595  /// not the name of the file (if you changed it), nor the full path of the file.
2596  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2597  /// This means that streamed sounds or generated sounds will not be stopped.
2598  /// \sa
2599  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2600  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2601  /// - AkBankCallbackFunc
2602  /// - \ref soundengine_banks
2604  const char* in_pszString, ///< Name of the bank to unload
2605  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2606  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2607  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2608  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2609  );
2610 
2611  /// Unloads a bank asynchronously (by ID and memory pointer).\n
2612  /// Refer to \ref soundengine_banks_general for a discussion on using strings and IDs.
2613  /// \return AK_Success if scheduling successful (use a callback to be notified when completed)
2614  /// \remarks
2615  /// - In order to force the memory deallocation of the bank, sounds that use media from this bank will be stopped.
2616  /// This means that streamed sounds or generated sounds will not be stopped.
2617  /// \sa
2618  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2619  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2620  /// - AkBankCallbackFunc
2621  /// - \ref soundengine_banks
2623  AkBankID in_bankID, ///< ID of the bank to unload
2624  const void * in_pInMemoryBankPtr, ///< Memory pointer from where the bank was initially loaded from. (REQUIRED to determine which bank associated to a memory pointer must be unloaded). Pass NULL if NULL was passed when loading the bank or if LoadBankMemoryCopy was used to load the bank.
2625  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2626  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2627  AkBankType in_bankType = AkBankType_User ///< Type of the bank to unload
2628  );
2629 
2630  /// Cancels all Event callbacks associated with a specific callback cookie specified while loading Banks of preparing Events.\n
2631  /// \sa
2632  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2633  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2634  /// - <tt>AK::SoundEngine::UnloadBank()</tt>
2635  /// - <tt>AK::SoundEngine::ClearBanks()</tt>
2636  /// - AkBankCallbackFunc
2638  void * in_pCookie ///< Callback cookie to be canceled
2639  );
2640 
2641  /// Preparation type.
2642  /// \sa
2643  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2644  /// - <tt>AK::SoundEngine::PrepareGameSyncs()</tt>
2645  /// - <tt>AK::SoundEngine::PrepareBank()</tt>
2647  {
2648  Preparation_Load, ///< \c PrepareEvent() will load required information to play the specified event.
2649  Preparation_Unload, ///< \c PrepareEvent() will unload required information to play the specified event.
2650  Preparation_LoadAndDecode ///< Vorbis media is decoded when loading, and an uncompressed PCM version is used for playback.
2651  };
2652 
2653  /// Parameter to be passed to <tt>AK::SoundEngine::PrepareBank()</tt>.
2654  /// Use AkBankContent_All to load both the media and structural content from the bank.
2655  /// 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.
2656  /// \sa
2657  /// - <tt>AK::SoundEngine::PrepareBank()</tt>
2658  /// - \ref soundengine_banks_preparingbanks
2660  {
2661  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.
2662  AkBankContent_All ///< Use AkBankContent_All to load both the media and structural content.
2663  };
2664 
2665 #ifdef AK_SUPPORT_WCHAR
2666  /// 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
2667  /// 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(),
2668  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2669  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2670  /// allowing using PrepareEvent() to load media on demand.
2671  /// \sa
2672  /// - \ref soundengine_banks_preparingbanks
2673  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2674  /// - <tt>AK::SoundEngine::PreparationType</tt>
2675  /// \remarks
2676  /// 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
2677  /// 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;
2678  /// 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.
2680  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2681  const wchar_t* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2682  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2683  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2684  );
2685 #endif //AK_SUPPORT_WCHAR
2686 
2687  /// 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
2688  /// 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(),
2689  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2690  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2691  /// allowing using PrepareEvent() to load media on demand.
2692  /// \sa
2693  /// - \ref soundengine_banks_preparingbanks
2694  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2695  /// - <tt>AK::SoundEngine::PreparationType</tt>
2696  /// \remarks
2697  /// \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
2698  /// 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;
2699  /// 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.
2701  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2702  const char* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2703  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2704  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2705  );
2706 
2707  /// \n\aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2708  /// 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
2709  /// 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(),
2710  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2711  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2712  /// allowing using PrepareEvent() to load media on demand.
2713  /// \sa
2714  /// - \ref soundengine_banks_preparingbanks
2715  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2716  /// - <tt>AK::SoundEngine::PreparationType</tt>
2717  /// \remarks
2718  /// \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
2719  /// 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;
2720  /// 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.
2722  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2723  AkBankID in_bankID, ///< ID of the bank to Prepare/Unprepare.
2724  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2725  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2726  );
2727 
2728 #ifdef AK_SUPPORT_WCHAR
2729  /// 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
2730  /// 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(),
2731  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2732  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2733  /// allowing using PrepareEvent() to load media on demand.
2734  /// \sa
2735  /// - \ref soundengine_banks_preparingbanks
2736  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2737  /// - <tt>AK::SoundEngine::PreparationType</tt>
2738  /// \remarks
2739  /// 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
2740  /// 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;
2741  /// 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.
2743  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2744  const wchar_t* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2745  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2746  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2747  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2748  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2749  );
2750 #endif //AK_SUPPORT_WCHAR
2751 
2752  /// 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
2753  /// 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(),
2754  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2755  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2756  /// allowing using PrepareEvent() to load media on demand.
2757  /// \sa
2758  /// - \ref soundengine_banks_preparingbanks
2759  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2760  /// - <tt>AK::SoundEngine::PreparationType()</tt>
2761  /// \remarks
2762  /// 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
2763  /// 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;
2764  /// 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.
2766  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2767  const char* in_pszString, ///< Name of the bank to Prepare/Unprepare.
2768  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2769  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2770  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2771  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2772  );
2773 
2774  /// \n\aknote Requires that the "Use SoundBank names" option be unchecked in the Wwise Project Settings. \endaknote
2775  /// 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
2776  /// 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(),
2777  /// will prevent in-memory duplication of media at the cost of some memory fragmentation.
2778  /// Calling this function specifying the flag AkBankContent_StructureOnly will load only the structural part (including events) of this bank,
2779  /// allowing using PrepareEvent() to load media on demand.
2780  /// \sa
2781  /// - \ref soundengine_banks_preparingbanks
2782  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2783  /// - <tt>AK::SoundEngine::PreparationType()</tt>
2784  /// \remarks
2785  /// \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
2786  /// 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;
2787  /// 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.
2789  AK::SoundEngine::PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2790  AkBankID in_bankID, ///< ID of the bank to Prepare/Unprepare.
2791  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2792  void * in_pCookie, ///< Callback cookie (reserved to user, passed to the callback function)
2793  AK::SoundEngine::AkBankContent in_uFlags = AkBankContent_All, ///< Structures only (including events) or all content.
2794  AkBankType in_bankType = AkBankType_User ///< Type of the bank to Prepare/Unprepare.
2795  );
2796 
2797  /// Clear all previously prepared events.\n
2798  /// \return
2799  /// - \c AK_Success if successful.
2800  /// - \c AK_Fail if the sound engine was not correctly initialized or if there is not enough memory to handle the command.
2801  /// \remarks
2802  /// The function \c ClearBanks() also clears all prepared events.
2803  /// \sa
2804  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
2805  /// - \c <tt>AK::SoundEngine::ClearBanks()</tt>
2807 
2808 #ifdef AK_SUPPORT_WCHAR
2809  /// Prepares or unprepares Events synchronously (by Unicode string).\n
2810  /// The Events are identified by strings, and converted to IDs internally
2811  /// (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2812  /// Before invoking \c PrepareEvent(), use \c LoadBank() to explicitly load the SoundBank(s)
2813  /// that contain the Events and structures. When a request is posted to the
2814  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2815  /// successfully post the specified Events and load the required loose media files.
2816  /// \aknote Before version 2015.1, the required media files could be included
2817  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2818  /// however,\c PrepareEvent() now only looks for loose media files.
2819  /// \endaknote
2820  /// The function returns when the request is completely processed.
2821  /// \return
2822  /// - \c AK_Success: Prepare/un-prepare successful.
2823  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2824  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2825  /// - \c AK_BankReadError: I/O error.
2826  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2827  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2828  /// - \c AK_InvalidFile: File specified could not be opened.
2829  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2830  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2831  /// \remarks
2832  /// Whenever at least one event fails to be resolved, the actions performed for all
2833  /// other events are cancelled.
2834  /// \sa
2835  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2836  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2837  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2838  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2839  /// - \ref soundengine_banks
2840  /// - \ref sdk_bank_training
2842  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2843  const wchar_t** in_ppszString, ///< Array of event names
2844  AkUInt32 in_uNumEvent ///< Number of events in the array
2845  );
2846 #endif //AK_SUPPORT_WCHAR
2847 
2848  /// Prepares or unprepares events synchronously.\n
2849  /// The Events are identified by strings and converted to IDs internally
2850  /// (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2851  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2852  /// that contain the Events and structures. When a request is posted to the
2853  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2854  /// successfully post the specified Events and load the required loose media files.
2855  /// \aknote Before version 2015.1, the required media files could be included
2856  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2857  /// however, PrepareEvent() now only looks for loose media files.
2858  /// \endaknote
2859  /// The function returns when the request is completely processed.
2860  /// \return
2861  /// - \c AK_Success: Prepare/un-prepare successful.
2862  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2863  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2864  /// - \c AK_BankReadError: I/O error.
2865  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2866  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2867  /// - \c AK_InvalidFile: File specified could not be opened.
2868  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2869  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2870  /// \remarks
2871  /// Whenever at least one event fails to be resolved, the actions performed for all
2872  /// other events are cancelled.
2873  /// \aknote The use of PrepareEvent is incompatible with LoadBank, using in-memory data.
2874  /// \endaknote
2875  /// \sa
2876  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2877  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2878  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2879  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2880  /// - \ref soundengine_banks
2881  /// - \ref sdk_bank_training
2883  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2884  const char** in_ppszString, ///< Array of event names
2885  AkUInt32 in_uNumEvent ///< Number of events in the array
2886  );
2887 
2888  /// Prepares or unprepares events synchronously (by ID).
2889  /// The Events are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2890  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2891  /// that contain the Events and structures. When a request is posted to the
2892  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2893  /// successfully post the specified Events and load the required loose media files.
2894  /// \aknote Before version 2015.1, the required media files could be included
2895  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2896  /// however, PrepareEvent() now only looks for loose media files.
2897  /// \endaknote
2898  /// The function returns when the request is completely processed.
2899  /// \return
2900  /// - \c AK_Success: Prepare/un-prepare successful.
2901  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareEvent() does not exist.
2902  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
2903  /// - \c AK_BankReadError: I/O error.
2904  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
2905  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
2906  /// - \c AK_InvalidFile: File specified could not be opened.
2907  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
2908  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
2909  /// \remarks
2910  /// Whenever at least one event fails to be resolved, the actions performed for all
2911  /// other events are cancelled.
2912  /// \sa
2913  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2914  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2915  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2916  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2917  /// - \ref soundengine_banks
2918  /// - \ref sdk_bank_training
2920  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2921  AkUniqueID* in_pEventID, ///< Array of event IDs
2922  AkUInt32 in_uNumEvent ///< Number of event IDs in the array
2923  );
2924 
2925 #ifdef AK_SUPPORT_WCHAR
2926  /// Prepares or unprepares an event asynchronously (by Unicode string).
2927  /// The Events are identified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2928  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2929  /// that contain the Events and structures. When a request is posted to the
2930  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2931  /// successfully post the specified Events and load the required loose media files.
2932  /// \aknote Before version 2015.1, the required media files could be included
2933  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2934  /// however, \c PrepareEvent() now only looks for loose media files.
2935  /// \endaknote
2936  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2937  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2938  /// \remarks
2939  /// Whenever at least one Event fails to be resolved, the actions performed for all
2940  /// other Events are cancelled.
2941  /// \sa
2942  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2943  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2944  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2945  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2946  /// - AkBankCallbackFunc
2947  /// - \ref soundengine_banks
2948  /// - \ref sdk_bank_training
2950  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2951  const wchar_t** in_ppszString, ///< Array of event names
2952  AkUInt32 in_uNumEvent, ///< Number of events in the array
2953  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2954  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2955  );
2956 #endif //AK_SUPPORT_WCHAR
2957 
2958  /// Prepares or unprepares an event asynchronously.
2959  /// The Events are identified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2960  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2961  /// that contain the Events and structures. When a request is posted to the
2962  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2963  /// successfully post the specified Events and load the required loose media files.
2964  /// \aknote Before version 2015.1, the required media files could be included
2965  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2966  /// however, PrepareEvent() now only looks for loose media files.
2967  /// \endaknote
2968  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
2969  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
2970  /// \remarks
2971  /// Whenever at least one event fails to be resolved, the actions performed for all
2972  /// other events are cancelled.
2973  /// \sa
2974  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
2975  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
2976  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
2977  /// - <tt>AK::SoundEngine::LoadBank()</tt>
2978  /// - AkBankCallbackFunc
2979  /// - \ref soundengine_banks
2980  /// - \ref sdk_bank_training
2982  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
2983  const char** in_ppszString, ///< Array of event names
2984  AkUInt32 in_uNumEvent, ///< Number of events in the array
2985  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
2986  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
2987  );
2988 
2989  /// Prepares or unprepares events asynchronously (by ID).\n
2990  /// The Events are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
2991  /// Before invoking PrepareEvent(), use LoadBank() to explicitly load the SoundBank(s)
2992  /// that contain the Events and structures. When a request is posted to the
2993  /// Bank Manager consumer thread, it will resolve all dependencies needed to
2994  /// successfully post the specified Events and load the required loose media files.
2995  /// \aknote Before version 2015.1, the required media files could be included
2996  /// in a separate media SoundBank. As described in \ref whatsnew_2015_1_migration,
2997  /// however, PrepareEvent() now only looks for loose media files.
2998  /// \endaknote
2999  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
3000  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
3001  /// \remarks
3002  /// Whenever at least one event fails to be resolved, the actions performed for all
3003  /// other events are cancelled.
3004  /// \sa
3005  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
3006  /// - <tt>AK::SoundEngine::ClearPreparedEvents()</tt>
3007  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3008  /// - <tt>AK::SoundEngine::LoadBank()</tt>
3009  /// - AkBankCallbackFunc
3010  /// - \ref soundengine_banks
3011  /// - \ref sdk_bank_training
3013  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3014  AkUniqueID* in_pEventID, ///< Array of event IDs
3015  AkUInt32 in_uNumEvent, ///< Number of event IDs in the array
3016  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
3017  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
3018  );
3019 
3020  /// Indicates the location of a specific Media ID in memory
3021  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3022  /// \return AK_Success if operation was successful, AK_InvalidParameter if in_pSourceSettings is invalid or media sizes are 0.
3024  AkSourceSettings * in_pSourceSettings, ///< Array of Source Settings
3025  AkUInt32 in_uNumSourceSettings ///< Number of Source Settings in the array
3026  );
3027 
3028  /// Removes the specified source from the list of loaded media, even if this media is already in use.
3029  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3030  /// \aknote This function is unsafe and deprecated. Use TryUnsetMedia() in its place.
3031  /// Media that is still in use by the sound engine should not be unset by this function.
3032  /// If the media is still in use, this function will attempt to forcibly kill all sounds and effects referencing this media,
3033  /// and then return AK_ResourceInUse. The client should NOT presume that the memory can be safely released at this point.
3034  /// The moment at which the memory can be safely released is unknown, and the only safe course of action is to keep the memory
3035  /// alive until the sound engine is terminated.
3036  /// \endaknote
3037  /// \return
3038  /// - \c AK_Success: Operation was successful, and the memory can be released on the client side.
3039  /// - \c AK_ResourceInUse: Specified media is still in use by the sound engine, the client should not release the memory.
3040  /// - \c AK_InvalidParameter: in_pSourceSettings is invalid
3042  AkSourceSettings * in_pSourceSettings, ///< Array of Source Settings
3043  AkUInt32 in_uNumSourceSettings ///< Number of Source Settings in the array
3044  );
3045 
3046  /// Removes the specified source from the list of loaded media, only if this media is not already in use.
3047  /// The sources are identified by their ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3048  /// \aknote Media that is still in use by the sound engine should not be unset. It is marked for removal to prevent additional use.
3049  /// If this function returns AK_ResourceInUse, then the client must not release memory for this media.
3050  /// Instead, the client should retry the TryUnsetMedia operation later with the same parameters and check for AK_Success.
3051  /// \endaknote
3052  /// 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.
3053  /// out_pUnsetResults will be filled with either AK_Success or AK_ResourceInUse, indicating which media was still in use and not unset.
3054  /// \return
3055  /// - \c AK_Success: Operation was successful, and the memory can be released on the client side.
3056  /// - \c 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.
3057  /// - \c AK_InvalidParameter: in_pSourceSettings is invalid
3059  AkSourceSettings* in_pSourceSettings, ///< Array of Source Settings
3060  AkUInt32 in_uNumSourceSettings, ///< Number of Source Settings in the array
3061  AKRESULT* out_pUnsetResults ///< (optional, can be null) Array of result codes
3062  );
3063 
3064 #ifdef AK_SUPPORT_WCHAR
3065  /// Prepares or unprepares game syncs synchronously (by Unicode string).\n
3066  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3067  /// The game syncs definitions must already exist in the sound engine by having
3068  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
3069  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3070  /// dependencies needed to successfully set this game sync group to one of the
3071  /// game sync values specified, and load the required banks, if applicable.
3072  /// The function returns when the request has been completely processed.
3073  /// \return
3074  /// - \c AK_Success: Prepare/un-prepare successful.
3075  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
3076  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
3077  /// - \c AK_BankReadError: I/O error.
3078  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
3079  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
3080  /// - \c AK_InvalidFile: File specified could not be opened.
3081  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
3082  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
3083  /// \remarks
3084  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
3085  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
3086  /// so you never need to call this function.
3087  /// \sa
3088  /// - \c <tt>AK::SoundEngine::GetIDFromString()</tt>
3089  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
3090  /// - \c <tt>AK::SoundEngine::LoadBank()</tt>
3091  /// - \c AkInitSettings
3092  /// - \ref soundengine_banks
3093  /// - \ref sdk_bank_training
3095  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3096  AkGroupType in_eGameSyncType, ///< The type of game sync.
3097  const wchar_t* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
3098  const wchar_t** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
3099  AkUInt32 in_uNumGameSyncs ///< The number of game sync in the string array.
3100  );
3101 #endif //AK_SUPPORT_WCHAR
3102 
3103  /// Prepares or unprepares game syncs synchronously.\n
3104  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3105  /// The game syncs definitions must already exist in the sound engine by having
3106  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
3107  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3108  /// dependencies needed to successfully set this game sync group to one of the
3109  /// game sync values specified, and load the required banks, if applicable.
3110  /// The function returns when the request has been completely processed.
3111  /// \return
3112  /// - \c AK_Success: Prepare/un-prepare successful.
3113  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
3114  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
3115  /// - \c AK_BankReadError: I/O error.
3116  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
3117  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
3118  /// - \c AK_InvalidFile: File specified could not be opened.
3119  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
3120  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
3121  /// \remarks
3122  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
3123  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
3124  /// so you never need to call this function.
3125  /// \sa
3126  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3127  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
3128  /// - <tt>AK::SoundEngine::LoadBank()</tt>
3129  /// - AkInitSettings
3130  /// - \ref soundengine_banks
3131  /// - \ref sdk_bank_training
3133  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3134  AkGroupType in_eGameSyncType, ///< The type of game sync.
3135  const char* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
3136  const char** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
3137  AkUInt32 in_uNumGameSyncs ///< The number of game sync in the string array.
3138  );
3139 
3140  /// Prepares or unprepares game syncs synchronously (by ID).\n
3141  /// The group and game syncs are specified by ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3142  /// The game syncs definitions must already exist in the sound engine by having
3143  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
3144  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3145  /// dependencies needed to successfully set this game sync group to one of the
3146  /// game sync values specified, and load the required banks, if applicable.
3147  /// The function returns when the request has been completely processed.
3148  /// \return
3149  /// - \c AK_Success: Prepare/un-prepare successful.
3150  /// - \c AK_IDNotFound: At least one of the event/game sync identifiers passed to PrepareGameSyncs() does not exist.
3151  /// - \c AK_InsufficientMemory: Insufficient memory to store bank data.
3152  /// - \c AK_BankReadError: I/O error.
3153  /// - \c AK_WrongBankVersion: Invalid bank version: make sure the version of Wwise that
3154  /// you used to generate the SoundBanks matches that of the SDK you are currently using.
3155  /// - \c AK_InvalidFile: File specified could not be opened.
3156  /// - \c AK_InvalidParameter: Invalid parameter, invalid memory alignment.
3157  /// - \c AK_Fail: Load or unload failed for any other reason. (Most likely small allocation failure)
3158  /// \remarks
3159  /// You need to call \c PrepareGameSyncs() if the sound engine was initialized with \c AkInitSettings::bEnableGameSyncPreparation
3160  /// set to \c true. When set to \c false, the sound engine automatically prepares all game syncs when preparing Events,
3161  /// so you never need to call this function.
3162  /// \sa
3163  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3164  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
3165  /// - <tt>AK::SoundEngine::LoadBank()</tt>
3166  /// - AkInitSettings
3167  /// - \ref soundengine_banks
3168  /// - \ref sdk_bank_training
3170  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3171  AkGroupType in_eGameSyncType, ///< The type of game sync.
3172  AkUInt32 in_GroupID, ///< The State Group ID or the Switch Group ID.
3173  AkUInt32* in_paGameSyncID, ///< Array of ID of the game syncs to either support or not support.
3174  AkUInt32 in_uNumGameSyncs ///< The number of game sync ID in the array.
3175  );
3176 
3177 #ifdef AK_SUPPORT_WCHAR
3178  /// Prepares or unprepares game syncs asynchronously (by Unicode string).\n
3179  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3180  /// The game syncs definitions must already exist in the sound engine by having
3181  /// explicitly loaded the bank(s) that contain them (with <tt>LoadBank()</tt>).
3182  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3183  /// dependencies needed to successfully set this game sync group to one of the
3184  /// game sync values specified, and load the required banks, if applicable.
3185  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
3186  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
3187  /// \remarks
3188  /// You need to call \c PrepareGameSyncs() if the sound engine was initialized with \c AkInitSettings::bEnableGameSyncPreparation
3189  /// set to \c true. When set to \c false, the sound engine automatically prepares all game syncs when preparing Events,
3190  /// so you never need to call this function.
3191  /// \sa
3192  /// - \c <tt>AK::SoundEngine::GetIDFromString()</tt>
3193  /// - \c <tt>AK::SoundEngine::PrepareEvent()</tt>
3194  /// - \c <tt>AK::SoundEngine::LoadBank()</tt>
3195  /// - \c AkInitSettings
3196  /// - \c AkBankCallbackFunc
3197  /// - \ref soundengine_banks
3198  /// - \ref sdk_bank_training
3200  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3201  AkGroupType in_eGameSyncType, ///< The type of game sync.
3202  const wchar_t* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
3203  const wchar_t** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
3204  AkUInt32 in_uNumGameSyncs, ///< The number of game sync in the string array.
3205  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
3206  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
3207  );
3208 #endif //AK_SUPPORT_WCHAR
3209 
3210  /// Prepares or unprepares game syncs asynchronously.\n
3211  /// The group and game syncs are specified by string (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3212  /// The game syncs definitions must already exist in the sound engine by having
3213  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
3214  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3215  /// dependencies needed to successfully set this game sync group to one of the
3216  /// game sync values specified, and load the required banks, if applicable.
3217  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
3218  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
3219  /// \remarks
3220  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
3221  /// set to true. When set to false, the sound engine automatically prepares all game syncs when preparing events,
3222  /// so you never need to call this function.
3223  /// \sa
3224  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3225  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
3226  /// - <tt>AK::SoundEngine::LoadBank()</tt>
3227  /// - AkInitSettings
3228  /// - AkBankCallbackFunc
3229  /// - \ref soundengine_banks
3230  /// - \ref sdk_bank_training
3232  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3233  AkGroupType in_eGameSyncType, ///< The type of game sync.
3234  const char* in_pszGroupName, ///< The State Group Name or the Switch Group Name.
3235  const char** in_ppszGameSyncName, ///< The specific ID of the state to either support or not support.
3236  AkUInt32 in_uNumGameSyncs, ///< The number of game sync in the string array.
3237  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
3238  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
3239  );
3240 
3241  /// Prepares or un-prepare game syncs asynchronously (by ID).\n
3242  /// The group and game syncs are specified by ID (refer to \ref soundengine_banks_general for a discussion on using strings and IDs).
3243  /// The game syncs definitions must already exist in the sound engine by having
3244  /// explicitly loaded the bank(s) that contain them (with LoadBank()).
3245  /// A request is posted to the Bank Manager consumer thread. It will resolve all
3246  /// dependencies needed to successfully set this game sync group to one of the
3247  /// game sync values specified, and load the required banks, if applicable.
3248  /// The function returns immediately. Use a callback to be notified when the request has finished being processed.
3249  /// \return AK_Success if scheduling is was successful, AK_Fail otherwise.
3250  /// \remarks
3251  /// You need to call PrepareGameSyncs() if the sound engine was initialized with AkInitSettings::bEnableGameSyncPreparation
3252  /// set to true. When set to false, the sound engine automatically prepares all Game Syncs when preparing Events,
3253  /// so you never need to call this function.
3254  /// \sa
3255  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3256  /// - <tt>AK::SoundEngine::PrepareEvent()</tt>
3257  /// - <tt>AK::SoundEngine::LoadBank()</tt>
3258  /// - AkInitSettings
3259  /// - AkBankCallbackFunc
3260  /// - \ref soundengine_banks
3261  /// - \ref sdk_bank_training
3263  PreparationType in_PreparationType, ///< Preparation type ( Preparation_Load or Preparation_Unload )
3264  AkGroupType in_eGameSyncType, ///< The type of game sync.
3265  AkUInt32 in_GroupID, ///< The State Group ID or the Switch Group ID.
3266  AkUInt32* in_paGameSyncID, ///< Array of ID of the Game Syncs to either support or not support.
3267  AkUInt32 in_uNumGameSyncs, ///< The number of game sync ID in the array.
3268  AkBankCallbackFunc in_pfnBankCallback, ///< Callback function
3269  void * in_pCookie ///< Callback cookie (reserved to user, passed to the callback function)
3270  );
3271 
3272  //@}
3273 
3274 
3275  ////////////////////////////////////////////////////////////////////////
3276  /// @name Listeners
3277  //@{
3278 
3279  /// Sets a game object's associated listeners.
3280  /// 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.
3281  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
3282  /// \return
3283  /// - \c AK_Success if successful
3284  /// - \c AK_CommandTooLarge if the number of positions is too large for the command queue. Reduce the number of positions.
3285  /// \sa
3286  /// - <tt>AK::SoundEngine::AddListener</tt>
3287  /// - <tt>AK::SoundEngine::RemoveListener</tt>
3288  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3289  /// - \ref soundengine_listeners
3291  AkGameObjectID in_emitterGameObj, ///< Emitter game object. Must have been previously registered via RegisterGameObj.
3292  const AkGameObjectID* in_pListenerGameObjs, ///< Array of listener game object IDs that will be activated for in_emitterGameObj.
3293  AkUInt32 in_uNumListeners ///< Length of array
3294  );
3295 
3296  /// Add a single listener to a game object's set of associated listeners.
3297  /// 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.
3298  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
3299  /// \sa
3300  /// - <tt>AK::SoundEngine::SetListeners</tt>
3301  /// - <tt>AK::SoundEngine::RemoveListener</tt>
3302  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3303  /// - \ref soundengine_listeners
3305  AkGameObjectID in_emitterGameObj, ///< Emitter game object. Must have been previously registered via RegisterGameObj.
3306  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be activated for in_emitterGameObj.
3307  );
3308 
3309  /// Remove a single listener from a game object's set of active listeners.
3310  /// Calling this function will override the default set of listeners and in_emitterGameObj will now reference its own, unique set of listeners.
3311  /// \sa
3312  /// - <tt>AK::SoundEngine::SetListeners</tt>
3313  /// - <tt>AK::SoundEngine::AddListener</tt>
3314  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3315  /// - \ref soundengine_listeners
3317  AkGameObjectID in_emitterGameObj, ///< Emitter game object.
3318  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be deactivated for in_emitterGameObj. Game objects must have been previously registered.
3319  );
3320 
3321  /// 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
3322  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
3323  /// 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.
3324  /// \return Always returns AK_Success
3325  /// \sa
3326  /// - \ref soundengine_listeners
3328  const AkGameObjectID* in_pListenerObjs, ///< Array of listener game object IDs that will be activated for subsequent registrations. Game objects must have been previously registered.
3329  AkUInt32 in_uNumListeners ///< Length of array
3330  );
3331 
3332  /// Add a single listener to the default set of listeners. Upon registration, all game objects reference the default listener set, until
3333  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
3334  /// \sa
3335  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3336  /// - <tt>AK::SoundEngine::RemoveDefaultListener</tt>
3337  /// - \ref soundengine_listeners
3339  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be added to the default set of listeners.
3340  );
3341 
3342  /// Remove a single listener from the default set of listeners. Upon registration, all game objects reference the default listener set, until
3343  /// a call to AddListener, RemoveListener, SetListeners or SetGameObjectOutputBusVolume is made on that game object.
3344  /// \sa
3345  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3346  /// - <tt>AK::SoundEngine::AddDefaultListener</tt>
3347  /// - \ref soundengine_listeners
3349  AkGameObjectID in_listenerGameObj ///< Listener game object IDs that will be removed from the default set of listeners.
3350  );
3351 
3352  /// 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>.
3353  /// \return Always returns AK_Success
3354  /// \sa
3355  /// - <tt>AK::SoundEngine::SetListeners</tt>
3356  /// - <tt>AK::SoundEngine::SetDefaultListeners</tt>
3357  /// - <tt>AK::SoundEngine::SetGameObjectOutputBusVolume</tt>
3358  /// - \ref soundengine_listeners
3360  AkGameObjectID in_emitterGameObj ///< Emitter game object.
3361  );
3362 
3363  /// Sets a listener's spatialization parameters. This lets you define listener-specific
3364  /// volume offsets for each audio channel.
3365  /// If \c in_bSpatialized is false, only \c in_pVolumeOffsets is used for this listener (3D positions
3366  /// have no effect on the speaker distribution). Otherwise, \c in_pVolumeOffsets is added to the speaker
3367  /// distribution computed for this listener.
3368  /// Use helper functions of \c AK::SpeakerVolumes to manipulate the vector of volume offsets in_pVolumeOffsets.
3369  ///
3370  /// \remarks
3371  /// - If a sound is mixed into a bus that has a different speaker configuration than in_channelConfig,
3372  /// standard up/downmix rules apply.
3373  /// - Sounds with 3D Spatialization set to None will not be affected by these parameters.
3374  /// \return
3375  /// - \c AK_Success if message was successfully posted to sound engine queue
3376  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
3377  /// - \c AK_InsufficientMemory if there wasn't enough memory in the message queue
3378  /// \sa
3379  /// - \ref soundengine_listeners_spatial
3381  AkGameObjectID in_uListenerID, ///< Listener game object ID
3382  bool in_bSpatialized, ///< Spatialization toggle (True : enable spatialization, False : disable spatialization)
3383  AkChannelConfig in_channelConfig, ///< Channel configuration associated with volumes in_pVolumeOffsets. Ignored if in_pVolumeOffsets is NULL.
3384  AK::SpeakerVolumes::VectorPtr in_pVolumeOffsets = NULL ///< Per-speaker volume offset, in dB. See AkSpeakerVolumes.h for how to manipulate this vector.
3385  );
3386 
3387  //@}
3388 
3389 
3390  ////////////////////////////////////////////////////////////////////////
3391  /// @name Game Syncs
3392  //@{
3393 
3394  /// Sets the value of a real-time parameter control (by ID).
3395  /// With this function, you may set a game parameter value with global scope or with game object scope.
3396  /// 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
3397  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3398  /// To set a game parameter value with global scope, pass \c AK_INVALID_GAME_OBJECT as the game object.
3399  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3400  /// value for \c in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3401  /// according to the interpolation curve. If you call \c <tt><tt>SetRTPCValue()</tt></tt> with <tt>in_uValueChangeDuration = 0</tt> in the
3402  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3403  /// function at every game frame, you should not use \c in_uValueChangeDuration, as it would have no effect and it is less efficient.
3404  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3405  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3406  /// \return
3407  /// - \c AK_Success if the value was successfully set
3408  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3409  /// - \c AK_InvalidID if in_rtpcID is AK_INVALID_UNIQUE_ID (0)
3410  /// \sa
3411  /// - \ref soundengine_rtpc
3412  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3414  AkRtpcID in_rtpcID, ///< ID of the game parameter
3415  AkRtpcValue in_value, ///< Value to set
3416  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3417  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3418  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3419  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.
3420  );
3421 
3422 #ifdef AK_SUPPORT_WCHAR
3423  /// Sets the value of a real-time parameter control (by Unicode string name).
3424  /// With this function, you may set a game parameter value to global scope or to game object scope.
3425  /// 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
3426  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3427  /// To set a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3428  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3429  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3430  /// according to the interpolation curve. If you call SetRTPCValue() with in_uValueChangeDuration = 0 in the
3431  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3432  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3433  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3434  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3435  /// \return
3436  /// - \c AK_Success if the value was successfully set
3437  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3438  /// - \c AK_InvalidID if in_pszRtpcName is NULL.
3439  /// \aknote Strings are case-insensitive. \endaknote
3440  /// \sa
3441  /// - \ref soundengine_rtpc
3443  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3444  AkRtpcValue in_value, ///< Value to set
3445  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3446  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3447  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3448  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.
3449  );
3450 #endif //AK_SUPPORT_WCHAR
3451 
3452  /// Sets the value of a real-time parameter control.
3453  /// With this function, you may set a game parameter value with global scope or with game object scope.
3454  /// 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
3455  /// game objects that not yet registered, or already registered but not overridden with a value with game object scope.
3456  /// To set a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3457  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3458  /// value for \c in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3459  /// according to the interpolation curve. If you call SetRTPCValue() with in_uValueChangeDuration = 0 in the
3460  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3461  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3462  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3463  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3464  /// \return
3465  /// - \c AK_Success if the value was successfully set
3466  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3467  /// - \c AK_InvalidID if in_pszRtpcName is NULL.
3468  /// \aknote Strings are case-insensitive. \endaknote
3469  /// \sa
3470  /// - \ref soundengine_rtpc
3472  const char* in_pszRtpcName, ///< Name of the game parameter
3473  AkRtpcValue in_value, ///< Value to set
3474  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3475  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3476  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3477  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.
3478  );
3479 
3480  /// Sets the value of a real-time parameter control (by ID).
3481  /// With this function, you may set a game parameter value on playing id scope.
3482  /// Playing id scope supersedes both game object scope and global scope.
3483  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3484  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3485  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3486  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3487  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3488  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3489  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3490  /// - \c AK_Success if successful
3491  /// - \c AK_PlayingIDNotFound if in_playingID is not found.
3492  /// - \c AK_InvalidID if in_pszRtpcName is NULL.
3493  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3494  /// \sa
3495  /// - \ref soundengine_rtpc
3496  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3498  AkRtpcID in_rtpcID, ///< ID of the game parameter
3499  AkRtpcValue in_value, ///< Value to set
3500  AkPlayingID in_playingID, ///< Associated playing ID
3501  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3502  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3503  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.
3504  );
3505 
3506 #ifdef AK_SUPPORT_WCHAR
3507  /// Sets the value of a real-time parameter control (by Unicode string name).
3508  /// With this function, you may set a game parameter value on playing ID scope.
3509  /// Playing id scope supersedes both game object scope and global scope.
3510  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3511  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3512  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3513  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3514  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3515  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3516  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3517  /// - \c AK_Success if successful
3518  /// - \c AK_PlayingIDNotFound if in_playingID is not found.
3519  /// - \c AK_InvalidID if in_pszRtpcName is NULL.
3520  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3521  /// \sa
3522  /// - \ref soundengine_rtpc
3523  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3525  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3526  AkRtpcValue in_value, ///< Value to set
3527  AkPlayingID in_playingID, ///< Associated playing ID
3528  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3529  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3530  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.
3531  );
3532 #endif //AK_SUPPORT_WCHAR
3533 
3534  /// Sets the value of a real-time parameter control (by string name).
3535  /// With this function, you may set a game parameter value on playing id scope.
3536  /// Playing id scope supersedes both game object scope and global scope.
3537  /// With this function, you may also change the value of a game parameter over time. To do so, specify a non-zero
3538  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3539  /// according to the interpolation curve. If you call SetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3540  /// middle of an interpolation, the interpolation stops and the new value is set directly. Thus, if you call this
3541  /// function at every game frame, you should not use in_uValueChangeDuration, as it would have no effect and it is less efficient.
3542  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3543  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3544  /// - \c AK_Success if successful
3545  /// - \c AK_PlayingIDNotFound if in_playingID is not found.
3546  /// - \c AK_InvalidID if in_pszRtpcName is NULL.
3547  /// - \c AK_InvalidFloatValue if the value specified was NaN, Inf or FLT_MAX (3.402823e+38)
3548  /// \sa
3549  /// - \ref soundengine_rtpc
3550  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3552  const char* in_pszRtpcName, ///< Name of the game parameter
3553  AkRtpcValue in_value, ///< Value to set
3554  AkPlayingID in_playingID, ///< Associated playing ID
3555  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3556  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3557  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.
3558  );
3559 
3560  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3561  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3562  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3563  /// game objects that were not overridden with a value with game object scope.
3564  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3565  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3566  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3567  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3568  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3569  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3570  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3571  /// \return
3572  /// - \c AK_Success when successful
3573  /// - \c AK_InvalidID if in_rtpcID is AK_INVALID_UNIQUE_ID (0)
3574  /// \sa
3575  /// - \ref soundengine_rtpc
3576  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3577  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3579  AkRtpcID in_rtpcID, ///< ID of the game parameter
3580  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3581  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3582  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3583  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.
3584  );
3585 
3586 #ifdef AK_SUPPORT_WCHAR
3587  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3588  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3589  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3590  /// game objects that were not overridden with a value with game object scope.
3591  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3592  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3593  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3594  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3595  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3596  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3597  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3598  /// \return
3599  /// - \c AK_Success if successful
3600  /// - \c AK_InvalidID if in_pszParamName is NULL.
3601  /// \aknote Strings are case-insensitive. \endaknote
3602  /// \sa
3603  /// - \ref soundengine_rtpc
3604  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3606  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3607  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3608  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3609  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3610  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.
3611  );
3612 #endif //AK_SUPPORT_WCHAR
3613 
3614  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3615  /// With this function, you may reset a game parameter to its default value with global scope or with game object scope.
3616  /// Game object scope supersedes global scope. Game parameter values reset with global scope are applied to all
3617  /// game objects that were not overridden with a value with game object scope.
3618  /// To reset a game parameter value with global scope, pass AK_INVALID_GAME_OBJECT as the game object.
3619  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3620  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3621  /// according to the interpolation curve. If you call SetRTPCValue() or ResetRTPCValue() with in_uValueChangeDuration = 0 in the
3622  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3623  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3624  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3625  /// \return
3626  /// - \c AK_Success if successful
3627  /// - \c AK_InvalidID if in_pszParamName is NULL.
3628  /// \aknote Strings are case-insensitive. \endaknote
3629  /// \sa
3630  /// - \ref soundengine_rtpc
3631  /// - <tt>AK::SoundEngine::SetRTPCValue()</tt>
3633  const char* in_pszRtpcName, ///< Name of the game parameter
3634  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
3635  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3636  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3637  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.
3638  );
3639 
3640  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3641  /// With this function, you may reset a game parameter to its default value on playing id scope.
3642  /// Playing id scope supersedes both game object scope and global scope.
3643  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3644  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3645  /// according to the interpolation curve.
3646  /// If you call SetRTPCValueByPlayingID() or ReetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3647  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3648  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3649  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3650  /// \return
3651  /// - \c AK_Success when successful
3652  /// - \c AK_InvalidID if in_playingID is AK_INVALID_PLAYING_ID (0)
3653  /// \sa
3654  /// - \ref soundengine_rtpc
3655  /// - <tt>AK::SoundEngine::SetRTPCValueByPlayingID()</tt>
3657  AkRtpcID in_rtpcID, ///< ID of the game parameter
3658  AkPlayingID in_playingID, ///< Associated playing ID
3659  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3660  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3661  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.
3662  );
3663 
3664 #ifdef AK_SUPPORT_WCHAR
3665  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3666  /// With this function, you may reset a game parameter to its default value on playing id scope.
3667  /// Playing id scope supersedes both game object scope and global scope.
3668  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3669  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3670  /// according to the interpolation curve.
3671  /// If you call SetRTPCValueByPlayingID() or ReetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3672  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3673  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3674  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3675  /// \return
3676  /// - \c AK_Success when successful
3677  /// - \c AK_InvalidID if in_playingID is AK_INVALID_PLAYING_ID (0) or if if in_pszParamName is NULL.
3678  /// \aknote Strings are case-insensitive. \endaknote
3679  /// \sa
3680  /// - \ref soundengine_rtpc
3681  /// - <tt>AK::SoundEngine::SetRTPCValueByPlayingID()</tt>
3682  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3684  const wchar_t* in_pszRtpcName, ///< Name of the game parameter
3685  AkPlayingID in_playingID, ///< Associated playing ID
3686  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
3687  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3688  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.
3689  );
3690 #endif //AK_SUPPORT_WCHAR
3691 
3692  /// Resets the value of the game parameter to its default value, as specified in the Wwise project.
3693  /// With this function, you may reset a game parameter to its default value on playing id scope.
3694  /// Playing id scope supersedes both game object scope and global scope.
3695  /// With this function, you may also reset the value of a game parameter over time. To do so, specify a non-zero
3696  /// value for in_uValueChangeDuration. At each audio frame, the game parameter value will be updated internally
3697  /// according to the interpolation curve.
3698  /// If you call SetRTPCValueByPlayingID() or ReetRTPCValueByPlayingID() with in_uValueChangeDuration = 0 in the
3699  /// middle of an interpolation, the interpolation stops and the new value is set directly.
3700  /// Refer to \ref soundengine_rtpc_pergameobject, \ref soundengine_rtpc_buses and
3701  /// \ref soundengine_rtpc_effects for more details on RTPC scope.
3702  /// \return
3703  /// - \c AK_Success when successful
3704  /// - \c AK_InvalidID if in_playingID is AK_INVALID_PLAYING_ID (0) or if if in_pszParamName is NULL.
3705  /// \aknote Strings are case-insensitive. \endaknote
3706  /// \sa
3707  /// - \ref soundengine_rtpc
3708  /// - <tt>AK::SoundEngine::SetRTPCValueByPlayingID()</tt>
3709  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3711  const char* in_pszRtpcName, ///< Name of the game parameter
3712  AkPlayingID in_playingID, ///< Associated playing ID
3713  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards its default value
3714  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
3715  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.
3716  );
3717 
3718  /// Sets the State of a Switch Group (by IDs).
3719  /// \return Always returns AK_Success
3720  /// \sa
3721  /// - \ref soundengine_switch
3722  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3724  AkSwitchGroupID in_switchGroup, ///< ID of the Switch Group
3725  AkSwitchStateID in_switchState, ///< ID of the Switch
3726  AkGameObjectID in_gameObjectID ///< Associated game object ID
3727  );
3728 
3729 #ifdef AK_SUPPORT_WCHAR
3730  /// Sets the State of a Switch Group (by Unicode string names).
3731  /// \return
3732  /// - \c AK_Success if successful
3733  /// - \c AK_InvalidID if the switch or Switch Group name was not resolved to an existing ID\n
3734  /// Make sure that the banks were generated with the "include string" option.
3735  /// \aknote Strings are case-insensitive. \endaknote
3736  /// \sa
3737  /// - \ref soundengine_switch
3739  const wchar_t* in_pszSwitchGroup, ///< Name of the Switch Group
3740  const wchar_t* in_pszSwitchState, ///< Name of the Switch
3741  AkGameObjectID in_gameObjectID ///< Associated game object ID
3742  );
3743 #endif //AK_SUPPORT_WCHAR
3744 
3745  /// Sets the state of a Switch Group.
3746  /// \return
3747  /// - \c AK_Success if successful
3748  /// - \c AK_InvalidID if the switch or Switch Group name was not resolved to an existing ID\n
3749  /// Make sure that the banks were generated with the "include string" option.
3750  /// \aknote Strings are case-insensitive. \endaknote
3751  /// \sa
3752  /// - \ref soundengine_switch
3754  const char* in_pszSwitchGroup, ///< Name of the Switch Group
3755  const char* in_pszSwitchState, ///< Name of the Switch
3756  AkGameObjectID in_gameObjectID ///< Associated game object ID
3757  );
3758 
3759  /// Post the specified trigger (by IDs).
3760  /// \return Always returns AK_Success
3761  /// \sa
3762  /// - \ref soundengine_triggers
3763  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3765  AkTriggerID in_triggerID, ///< ID of the trigger
3766  AkGameObjectID in_gameObjectID ///< Associated game object ID
3767  );
3768 
3769 #ifdef AK_SUPPORT_WCHAR
3770  /// Posts the specified trigger (by Unicode string name).
3771  /// \return
3772  /// - \c AK_Success if successful
3773  /// - \c AK_InvalidID if the trigger name was null
3774  /// Make sure that the banks were generated with the "include string" option.
3775  /// \aknote Strings are case-insensitive. \endaknote
3776  /// \sa
3777  /// - \ref soundengine_triggers
3779  const wchar_t* in_pszTrigger, ///< Name of the trigger
3780  AkGameObjectID in_gameObjectID ///< Associated game object ID
3781  );
3782 #endif //AK_SUPPORT_WCHAR
3783 
3784  /// Posts the specified trigger.
3785  /// \return
3786  /// - \c AK_Success if successful
3787  /// - \c AK_InvalidID if the trigger name was null
3788  /// Make sure that the banks were generated with the "include string" option.
3789  /// \aknote Strings are case-insensitive. \endaknote
3790  /// \sa
3791  /// - \ref soundengine_triggers
3793  const char* in_pszTrigger, ///< Name of the trigger
3794  AkGameObjectID in_gameObjectID ///< Associated game object ID
3795  );
3796 
3797  /// Sets the state of a State Group (by IDs).
3798  /// \return Always returns AK_Success
3799  /// \sa
3800  /// - \ref soundengine_states
3801  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3803  AkStateGroupID in_stateGroup, ///< ID of the State Group
3804  AkStateID in_state ///< ID of the state
3805  );
3806 
3807 #ifdef AK_SUPPORT_WCHAR
3808  /// Sets the state of a State Group (by Unicode string names).
3809  /// \return
3810  /// - \c AK_Success if successful
3811  /// - \c AK_InvalidID if the state or State Group name was null
3812  /// Make sure that the banks were generated with the "include string" option.
3813  /// \aknote Strings are case-insensitive. \endaknote
3814  /// \sa
3815  /// - \ref soundengine_states
3816  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3818  const wchar_t* in_pszStateGroup, ///< Name of the State Group
3819  const wchar_t* in_pszState ///< Name of the state
3820  );
3821 #endif //AK_SUPPORT_WCHAR
3822 
3823  /// Sets the state of a State Group.
3824  /// \return
3825  /// - \c AK_Success if successful
3826  /// - \c AK_InvalidID if the state or State Group name was null
3827  /// Make sure that the banks were generated with the "include string" option.
3828  /// \aknote Strings are case-insensitive. \endaknote
3829  /// \sa
3830  /// - \ref soundengine_states
3831  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3833  const char* in_pszStateGroup, ///< Name of the State Group
3834  const char* in_pszState ///< Name of the state
3835  );
3836 
3837  //@}
3838 
3839  ////////////////////////////////////////////////////////////////////////
3840  /// @name Environments
3841  //@{
3842 
3843  /// Sets the Auxiliary Busses to route the specified game object
3844  /// To clear the game object's auxiliary sends, \c in_uNumSendValues must be 0.
3845  /// \sa
3846  /// - \ref soundengine_environments
3847  /// - \ref soundengine_environments_dynamic_aux_bus_routing
3848  /// - \ref soundengine_environments_id_vs_string
3849  /// - <tt>AK::SoundEngine::GetIDFromString()</tt>
3850  /// \return
3851  /// - \c AK_Success if successful
3852  /// - \c AK_InvalidParameter if a duplicated environment is found in the array
3853  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
3855  AkGameObjectID in_gameObjectID, ///< Associated game object ID
3856  AkAuxSendValue* in_aAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
3857  ///< (it may be NULL if no environment must be set)
3858  AkUInt32 in_uNumSendValues ///< The number of auxiliary busses at the pointer's address
3859  ///< (it must be 0 if no environment is set)
3860  );
3861 
3862  /// Registers a callback to allow the game to modify or override the volume to be applied at the output of an audio bus.
3863  /// The callback must be registered once per bus ID.
3864  /// Call with <tt>in_pfnCallback = NULL</tt> to unregister.
3865  /// \aknote The bus in_busID needs to be a mixing bus.\endaknote
3866  /// \aknote The callback function will not be called for the Master Audio Bus, since the output of this bus is not a bus, but is instead an Audio Device.\endaknote
3867  /// \sa
3868  /// - \ref goingfurther_speakermatrixcallback
3869  /// - \ref soundengine_environments
3870  /// - AkSpeakerVolumeMatrixCallbackInfo
3871  /// - <tt>AK::IAkMixerInputContext</tt>
3872  /// - <tt>AK::IAkMixerPluginContext</tt>
3873  /// \return
3874  /// - \c AK_Success if successful
3875  /// - \c AK_IDNotFound if the bus is not found
3876  /// - \c AK_NotInitialized if the sound engine is not initialized
3877  /// - \c AK_InsufficientMemory if there is not enough memory to complete the operation
3879  AkUniqueID in_busID, ///< Bus ID, as obtained by GetIDFromString( bus_name ).
3880  AkBusCallbackFunc in_pfnCallback, ///< Callback function.
3881  void* in_pCookie = NULL ///< User cookie.
3882  );
3883 
3884  /// 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
3885  /// by accessing the peak, RMS, True Peak and K-weighted power (according to loudness standard ITU BS.1770). See \ref goingfurther_speakermatrixcallback for an example.
3886  /// The callback must be registered once per bus ID.
3887  /// Call with in_pfnCallback = NULL to unregister.
3888  /// \aknote The bus in_busID needs to be a mixing bus.\endaknote
3889  /// \sa
3890  /// - \ref goingfurther_speakermatrixcallback
3891  /// - AkBusMeteringCallbackFunc
3892  /// - <tt>AK::AkMetering</tt>
3893  /// \return
3894  /// - \c AK_Success if successful
3895  /// - \c AK_IDNotFound if the bus is not found
3896  /// - \c AK_NotInitialized if the sound engine is not initialized
3897  /// - \c AK_InsufficientMemory if there is not enough memory to complete the operation
3899  AkUniqueID in_busID, ///< Bus ID, as obtained by GetIDFromString( bus_name ).
3900  AkBusMeteringCallbackFunc in_pfnCallback, ///< Callback function.
3901  AkMeteringFlags in_eMeteringFlags, ///< Metering flags.
3902  void* in_pCookie = NULL ///< User cookie.
3903  );
3904 
3905  /// Registers a callback to be called to allow the game to access metering data from any output device. You may use this to monitor loudness as sound leaves the Wwise sound engine
3906  /// by accessing the peak, RMS, True Peak and K-weighted power (according to loudness standard ITU BS.1770). See \ref goingfurther_speakermatrixcallback for an example.
3907  /// The callback must be registered once per device shareset ID.
3908  /// Call with in_pfnCallback = NULL to unregister.
3909  /// \sa
3910  /// - \ref goingfurther_speakermatrixcallback
3911  /// - AkOutputDeviceMeteringCallbackFunc
3912  /// - <tt>AK::AkMetering</tt>
3913  /// \return
3914  /// - \c AK_Success if successful
3915  /// - \c AK_DeviceNotFound if the device is not found
3916  /// - \c AK_NotInitialized if the sound engine is not initialized
3917  /// - \c AK_InsufficientMemory if there is not enough memory to complete the operation
3919  AkOutputDeviceID in_idOutput, ///< Output ID, as returned from AddOutput or GetOutputID. You can pass 0 for the main (default) output
3920  AkOutputDeviceMeteringCallbackFunc in_pfnCallback, ///< Callback function.
3921  AkMeteringFlags in_eMeteringFlags, ///< Metering flags.
3922  void* in_pCookie = NULL ///< User cookie.
3923  );
3924 
3925  /// Sets the Output Bus Volume (direct) to be used for the specified game object.
3926  /// The control value is a number ranging from 0.0f to 1.0f.
3927  /// 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
3928  /// 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.
3929  /// \sa
3930  /// - \ref AK::SoundEngine::ResetListenersToDefault
3931  /// - \ref soundengine_environments
3932  /// - \ref soundengine_environments_setting_dry_environment
3933  /// - \ref soundengine_environments_id_vs_string
3934  /// \return
3935  /// - \c AK_Success when successful
3936  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
3938  AkGameObjectID in_emitterObjID, ///< Associated emitter game object ID
3939  AkGameObjectID in_listenerObjID, ///< Associated listener game object ID. Pass AK_INVALID_GAME_OBJECT to set the Output Bus Volume for all connected listeners.
3940  AkReal32 in_fControlValue ///< A multiplier in the range [0.0f:16.0f] ( -∞ dB to +24 dB).
3941  ///< A value greater than 1.0f will amplify the sound.
3942  );
3943 
3944  /// Sets an Effect ShareSet at the specified audio node and Effect slot index.
3945  /// \aknote
3946  /// Replacing effects is preferably done through a Set Effect Event Action.
3947  /// \endaknote
3948  /// The target node cannot be a Bus, to set effects on a bus, use SetBusEffect() instead.
3949  /// \aknote The option "Override Parent" in
3950  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's effect will
3951  /// still be the one in use and the call to SetActorMixerEffect will have no impact.
3952  /// \endaknote
3953  /// \return Always returns AK_Success
3955  AkUniqueID in_audioNodeID, ///< Can be a member of the Actor-Mixer or Interactive Music Hierarchy (not a bus).
3956  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3957  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
3958  );
3959 
3960  /// Sets an Effect ShareSet at the specified bus and Effect slot index.
3961  /// \aknote
3962  /// Replacing effects is preferably done through a Set Effect Event Action.
3963  /// \endaknote
3964  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
3965  /// This adds a reference on the audio node to an existing ShareSet.
3966  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
3967  /// Bus which does not have any Effects, or removing the last Effect on a currently playing bus.
3968  /// \endaknote
3969  /// \aknote This function will replace existing Effects on the node. If the target node is not at
3970  /// the top of the hierarchy and is in the actor-mixer hierarchy, the option "Override Parent" in
3971  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
3972  /// still be the one in use and the call to SetBusEffect will have no impact.
3973  /// \endaknote
3974  /// \return
3975  /// - \c AK_Success when successfully posted.
3976  /// - \c AK_IDNotFound if the Bus isn't found by in_audioNodeID
3977  /// - \c AK_InvalidParameter if in_uFXIndex isn't in range
3979  AkUniqueID in_audioNodeID, ///< Bus Short ID.
3980  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
3981  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the Effect slot
3982  );
3983 
3984 #ifdef AK_SUPPORT_WCHAR
3985  /// Sets an Effect ShareSet at the specified Bus and Effect slot index.
3986  /// \aknote
3987  /// Replacing effects is preferably done through a Set Effect Event Action.
3988  /// \endaknote
3989  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
3990  /// This adds a reference on the audio node to an existing ShareSet.
3991  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
3992  /// bus which does not have any Effects, or removing the last Effect on a currently playing Bus.
3993  /// \endaknote
3994  /// \aknote This function will replace existing Effects on the node. If the target node is not at
3995  /// the top of the hierarchy and is in the Actor-Mixer Hierarchy, the option "Override Parent" in
3996  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
3997  /// still be the one in use and the call to \c SetBusEffect will have no impact.
3998  /// \endaknote
3999  /// \returns
4000  /// - \c AK_Success when successfully posted.
4001  /// - \c AK_IDNotFound if the Bus name doesn't point to a valid bus.
4002  /// - \c AK_InvalidID if in_pszBusName is null
4003  /// - \c AK_InvalidParameter if in_uFXIndex isn't in range or in_pszBusName is null
4005  const wchar_t* in_pszBusName, ///< Bus name
4006  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
4007  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
4008  );
4009 #endif //AK_SUPPORT_WCHAR
4010 
4011  /// Sets an Effect ShareSet at the specified Bus and Effect slot index.
4012  /// \aknote
4013  /// Replacing effects is preferably done through a Set Effect Event Action.
4014  /// \endaknote
4015  /// The Bus can either be an Audio Bus or an Auxiliary Bus.
4016  /// This adds a reference on the audio node to an existing ShareSet.
4017  /// \aknote This function has unspecified behavior when adding an Effect to a currently playing
4018  /// Bus which does not have any effects, or removing the last Effect on a currently playing bus.
4019  /// \endaknote
4020  /// \aknote Make sure the new effect shareset is included in a soundbank, and that sound bank is loaded. Otherwise you will see errors in the Capture Log.\endaknote
4021  /// \aknote This function will replace existing Effects on the node. If the target node is not at
4022  /// the top of the hierarchy and is in the Actor-Mixer Hierarchy, the option "Override Parent" in
4023  /// the Effect section in Wwise must be enabled for this node, otherwise the parent's Effect will
4024  /// still be the one in use and the call to SetBusEffect will have no impact.
4025  /// \endaknote
4026  /// \returns
4027  /// - \c AK_Success when successfully posted.
4028  /// - \c AK_IDNotFound if the Bus name doesn't point to a valid bus.
4029  /// - \c AK_InvalidParameter if in_uFXIndex isn't in range
4030  /// - \c AK_InvalidID if in_pszBusName is null
4032  const char* in_pszBusName, ///< Bus name
4033  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
4034  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to clear the effect slot
4035  );
4036 
4037  /// Sets an audio device effect shareset on the specified output device and effect slot index.
4038  /// \aknote
4039  /// Replacing effects is preferably done through a Set Effect Event Action.
4040  /// \endaknote
4041  /// \aknote Make sure the new effect shareset is included in a soundbank, and that sound bank is loaded. Otherwise you will see errors in the Capture Log.\endaknote
4042  /// \aknote This function will replace existing effects of the audio device shareset. \endaknote
4043  /// \aknote Audio device effects support is limited to one shareset per plug-in type at any time. \endaknote
4044  /// \aknote Errors are reported in the Wwise Capture Log if the effect cannot be set on the output device. \endaknote
4045 
4046  /// \returns Always returns AK_Success
4048  AkOutputDeviceID in_outputDeviceID, ///< Output ID, as returned from AddOutput or GetOutputID. Most of the time this should be 0 to designate the main (default) output
4049  AkUInt32 in_uFXIndex, ///< Effect slot index (0-3)
4050  AkUniqueID in_FXShareSetID ///< Effect ShareSet ID
4051  );
4052 
4053  /// Sets a Mixer ShareSet at the specified bus.
4054  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
4055  /// Bus which does not have any Effects or mixer, or removing the last mixer on a currently playing Bus.
4056  /// \endaknote
4057  /// \aknote Make sure the new mixer shareset is included in a soundbank, and that sound bank is loaded. Otherwise you will see errors in the Capture Log.\endaknote
4058  /// \aknote This function will replace existing mixers on the node.
4059  /// \endaknote
4060  /// \return Always returns AK_Success
4062  AkUniqueID in_audioNodeID, ///< Bus Short ID.
4063  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
4064  );
4065 
4066 #ifdef AK_SUPPORT_WCHAR
4067  /// Sets a Mixer ShareSet at the specified bus.
4068  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
4069  /// bus which does not have any effects nor mixer, or removing the last mixer on a currently playing bus.
4070  /// \endaknote
4071  /// \aknote Make sure the new mixer shareset is included in a soundbank, and that sound bank is loaded. Otherwise you will see errors in the Capture Log.\endaknote
4072  /// \aknote This function will replace existing mixers on the node.
4073  /// \endaknote
4074  /// \returns
4075  /// - \c AK_Success when successful
4076  /// - \c AK_InvalidID if in_pszBusName is null
4078  const wchar_t* in_pszBusName, ///< Bus name
4079  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
4080  );
4081 #endif //AK_SUPPORT_WCHAR
4082 
4083  /// Sets a Mixer ShareSet at the specified bus.
4084  /// \aknote This function has unspecified behavior when adding a mixer to a currently playing
4085  /// bus which does not have any effects nor mixer, or removing the last mixer on a currently playing bus.
4086  /// \endaknote
4087  /// \aknote Make sure the new mixer shareset is included in a soundbank, and that sound bank is loaded. Otherwise you will see errors in the Capture Log.\endaknote
4088  /// \aknote This function will replace existing mixers on the node.
4089  /// \endaknote
4090  /// \returns
4091  /// - \c AK_Success when successful
4092  /// - \c AK_InvalidID if in_pszBusName is null
4094  const char* in_pszBusName, ///< Bus name
4095  AkUniqueID in_shareSetID ///< ShareSets ID; pass AK_INVALID_UNIQUE_ID to remove.
4096  );
4097 
4098  /// Forces channel configuration for the specified bus.
4099  /// \aknote You cannot change the configuration of the master bus.\endaknote
4100  ///
4101  /// \return Always returns AK_Success
4103  AkUniqueID in_audioNodeID, ///< Bus Short ID.
4104  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
4105  );
4106 
4107 #ifdef AK_SUPPORT_WCHAR
4108  /// Forces channel configuration for the specified bus.
4109  /// \aknote You cannot change the configuration of the master bus.\endaknote
4110  ///
4111  /// \returns
4112  /// - \c AK_Success when successful
4113  /// - \c AK_InvalidID if in_pszBusName is null
4115  const wchar_t* in_pszBusName, ///< Bus name
4116  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
4117  );
4118 #endif //AK_SUPPORT_WCHAR
4119 
4120  /// Forces channel configuration for the specified bus.
4121  /// \aknote You cannot change the configuration of the master bus.\endaknote
4122  ///
4123  /// \returns
4124  /// - \c AK_Success when successful
4125  /// - \c AK_InvalidID if in_pszBusName is null
4127  const char* in_pszBusName, ///< Bus name
4128  AkChannelConfig in_channelConfig ///< Desired channel configuration. An invalid configuration (from default constructor) means "as parent".
4129  );
4130 
4131  /// Sets a game object's obstruction and occlusion levels. If SetMultiplePositions were used, values are set for all positions.
4132  /// To assign a unique obstruction and occlusion value to each sound position, instead use AK::SoundEngine::SetMultipleObstructionAndOcclusion.
4133  /// This function is used to affect how an object should be heard by a specific listener.
4134  /// \sa
4135  /// - \ref soundengine_obsocc
4136  /// - \ref soundengine_environments
4137  /// \return Always returns AK_Success
4139  AkGameObjectID in_EmitterID, ///< Emitter game object ID
4140  AkGameObjectID in_ListenerID, ///< Listener game object ID
4141  AkReal32 in_fObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
4142  AkReal32 in_fOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
4143  );
4144 
4145  /// Sets a game object's obstruction and occlusion value for each position defined by AK::SoundEngine::SetMultiplePositions.
4146  /// This function differs from AK::SoundEngine::SetObjectObstructionAndOcclusion as a list of obstruction/occlusion pair is provided
4147  /// and each obstruction/occlusion pair will affect the corresponding position defined at the same index.
4148  /// \aknote In the case the number of obstruction/occlusion pairs is smaller than the number of positions, remaining positions'
4149  /// obstrucion/occlusion values are set to 0.0. \endaknote
4150  /// \return
4151  /// - \c AK_Success if successful
4152  /// - \c AK_CommandTooLarge if the number of obstruction values is too large for the command queue.
4153  /// - \c AK_InvalidParameter if one of the parameter is out of range (check the debug console)
4154  /// - \c AK_InvalidFloatValue if one of the occlusion/obstruction values is NaN or Inf.
4155  /// \sa
4156  /// - \ref soundengine_obsocc
4157  /// - \ref soundengine_environments
4158  /// \return AK_Success if occlusion/obstruction values are successfully stored for this emitter
4160  AkGameObjectID in_EmitterID, ///< Emitter game object ID
4161  AkGameObjectID in_uListenerID, ///< Listener game object ID
4162  AkObstructionOcclusionValues* in_fObstructionOcclusionValues, ///< Array of obstruction/occlusion pairs to apply
4163  ///< ObstructionLevel: [0.0f..1.0f]
4164  ///< OcclusionLevel: [0.0f..1.0f]
4165  AkUInt32 in_uNumOcclusionObstruction ///< Number of obstruction/occlusion pairs specified in the provided array
4166  );
4167 
4168  /// Saves the playback history of container structures.
4169  /// This function will write history data for all currently loaded containers and instantiated game
4170  /// objects (for example, current position in Sequence Containers and previously played elements in
4171  /// Random Containers).
4172  /// \remarks
4173  /// This function acquires the main audio lock, and may block the caller for several milliseconds.
4174  /// \return
4175  /// - \c AK_Success when successful
4176  /// - \c AK_Fail is in_pBytes could not be parsed (corruption or data is truncated)
4177  /// \sa
4178  /// - <tt>AK::SoundEngine::SetContainerHistory()</tt>
4180  AK::IWriteBytes * in_pBytes ///< Pointer to IWriteBytes interface used to save the history.
4181  );
4182 
4183  /// Restores the playback history of container structures.
4184  /// This function will read history data from the passed-in stream reader interface, and apply it to all
4185  /// currently loaded containers and instantiated game objects. Game objects are matched by
4186  /// ID. History for unloaded structures and unknown game objects will be skipped.
4187  /// \remarks
4188  /// This function acquires the main audio lock, and may block the caller for several milliseconds.
4189  /// \return
4190  /// - \c AK_Success if successful
4191  /// - \c AK_InsufficientMemory if not enough memory is available for IReadBytes operation
4192  /// \sa
4193  /// - <tt>AK::SoundEngine::GetContainerHistory()</tt>
4195  AK::IReadBytes * in_pBytes ///< Pointer to IReadBytes interface used to load the history.
4196  );
4197 
4198  //@}
4199 
4200  ////////////////////////////////////////////////////////////////////////
4201  /// @name Capture
4202  //@{
4203 
4204  /// Starts recording the sound engine audio output.
4205  /// StartOutputCapture outputs a wav file per current output device of the sound engine.
4206  /// If more than one device is active, the system will create multiple files in the same output
4207  /// directory and will append numbers at the end of the provided filename.
4208  ///
4209  /// If no device is running yet, the system will return success AK_Success despite doing nothing.
4210  /// Use RegisterAudioDeviceStatusCallback to get notified when devices are created/destructed.
4211  ///
4212  /// \return AK_Success if successful, AK_Fail if there was a problem starting the output capture.
4213  /// \remark
4214  /// - The sound engine opens a stream for writing using <tt>AK::IAkStreamMgr::CreateStd()</tt>. If you are using the
4215  /// default implementation of the Stream Manager, file opening is executed in your implementation of
4216  /// the Low-Level IO interface <tt>AK::StreamMgr::IAkFileLocationResolver::Open()</tt>. The following
4217  /// AkFileSystemFlags are passed: uCompanyID = AKCOMPANYID_AUDIOKINETIC and uCodecID = AKCODECID_PCM,
4218  /// and the AkOpenMode is AK_OpenModeWriteOvrwr. Refer to \ref streamingmanager_lowlevel_location for
4219  /// more details on managing the deployment of your Wwise generated data.
4220  /// \return
4221  /// - \c AK_Success when successful
4222  /// - \c AK_InvalidParameter if in_CaptureFileName is null.
4223  /// - \c AK_InsufficientMemory if not enough memory is available.
4224  /// \sa
4225  /// - <tt>AK::SoundEngine::StopOutputCapture()</tt>
4226  /// - <tt>AK::StreamMgr::SetFileLocationResolver()</tt>
4227  /// - \ref streamingdevicemanager
4228  /// - \ref streamingmanager_lowlevel_location
4229  /// - RegisterAudioDeviceStatusCallback
4231  const AkOSChar* in_CaptureFileName ///< Name of the output capture file
4232  );
4233 
4234  /// Stops recording the sound engine audio output.
4235  /// \return AK_Success if successful, AK_Fail if there was a problem stopping the output capture.
4236  /// \sa
4237  /// - <tt>AK::SoundEngine::StartOutputCapture()</tt>
4239 
4240  /// Adds text marker in audio output file.
4241  /// \return
4242  /// - \c AK_Success when successful
4243  /// - \c AK_InvalidParameter if in_MarkerText is null.
4244  /// - \c AK_InsufficientMemory if not enough memory is available.
4245  /// \sa
4246  /// - <tt>AK::SoundEngine::StartOutputCapture()</tt>
4248  const char* in_MarkerText ///< Text of the marker
4249  );
4250 
4251  /// Gets the system sample rate.
4252  /// \return The sample rate.
4254 
4255  /// Registers a callback used for retrieving audio samples.
4256  /// The callback will be called from the audio thread during real-time rendering and from the main thread during offline rendering.
4257  /// \return
4258  /// - \c AK_Success when successful
4259  /// - \c AK_DeviceNotFound if the audio device ID doesn't match to a device in use.
4260  /// - \c AK_InvalidParameter when in_pfnCallback is null
4261  /// - \c AK_NotInitialized if the sound engine is not initialized at this time
4262  /// \sa
4263  /// - <tt>AK::SoundEngine::AddOutput()</tt>
4264  /// - <tt>AK::SoundEngine::GetOutputID()</tt>
4265  /// - <tt>AK::SoundEngine::UnregisterCaptureCallback()</tt>
4267  AkCaptureCallbackFunc in_pfnCallback, ///< Capture callback function to register.
4268  AkOutputDeviceID in_idOutput = AK_INVALID_OUTPUT_DEVICE_ID, ///< The audio device specific id, return by AK::SoundEngine::AddOutput or AK::SoundEngine::GetOutputID
4269  void* in_pCookie = NULL ///< Callback cookie that will be sent to the callback function along with additional information
4270  );
4271 
4272  /// Unregisters a callback used for retrieving audio samples.
4273  /// \return
4274  /// - \c AK_Success when successful
4275  /// - \c AK_DeviceNotFound if the audio device ID doesn't match to a device in use.
4276  /// - \c AK_InvalidParameter when in_pfnCallback is null
4277  /// - \c AK_NotInitialized if the sound engine is not initialized at this time
4278  /// \sa
4279  /// - <tt>AK::SoundEngine::AddOutput()</tt>
4280  /// - <tt>AK::SoundEngine::GetOutputID()</tt>
4281  /// - <tt>AK::SoundEngine::RegisterCaptureCallback()</tt>
4283  AkCaptureCallbackFunc in_pfnCallback, ///< Capture callback function to unregister.
4284  AkOutputDeviceID in_idOutput = AK_INVALID_OUTPUT_DEVICE_ID, ///< The audio device specific id, return by AK::SoundEngine::AddOutput or AK::SoundEngine::GetOutputID
4285  void* in_pCookie = NULL ///< Callback cookie that will be sent to the callback function along with additional information
4286  );
4287 
4288  /// Starts recording the sound engine profiling information into a file. This file can be read
4289  /// by Wwise Authoring. The file is created at the base path. If you have integrated Wwise I/O,
4290  /// you can use <tt>CAkDefaultIOHookBlocking::SetBasePath()</tt> (or <tt>CAkDefaultIOHookBlocking::AddBasePath()</tt>)
4291  /// to change the location where the file is saved. The profiling session records all data types possible.
4292  /// Note that this call captures peak metering for all the busses loaded and mixing
4293  /// while this call is invoked.
4294  /// \remark This function is provided as a utility tool only. It does nothing if it is
4295  /// called in the release configuration and returns AK_NotCompatible.
4297  const AkOSChar* in_CaptureFileName ///< Name of the output profiler file (.prof extension recommended)
4298  );
4299 
4300  /// Stops recording the sound engine profiling information.
4301  /// \remark This function is provided as a utility tool only. It does nothing if it is
4302  /// called in the release configuration and returns AK_NotCompatible.
4304 
4305  //@}
4306 
4307  ////////////////////////////////////////////////////////////////////////
4308  /// @name Offline Rendering
4309  //@{
4310 
4311  /// Sets the offline rendering frame time in seconds.
4312  /// When offline rendering is enabled, every call to \ref RenderAudio() will generate sample data as if this much time has elapsed. If the frame time argument is less than or equal to zero, every call to RenderAudio() will generate one audio buffer.
4313  /// \return Always returns AK_Success
4315  AkReal32 in_fFrameTimeInSeconds ///< frame time in seconds used during offline rendering
4316  );
4317 
4318  /// Enables/disables offline rendering.
4319  /// \return Always returns AK_Success
4321  bool in_bEnableOfflineRendering ///< enables/disables offline rendering
4322  );
4323 
4324  //@}
4325 
4326  ////////////////////////////////////////////////////////////////////////
4327  /// @name Secondary Outputs
4328  //@{
4329 
4330  /// Adds an output to the sound engine. Use this to add controller-attached headphones, controller speakers, DVR output, etc.
4331  /// 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).
4332  ///
4333  /// Like most functions of AK::SoundEngine, AddOutput is asynchronous. A successful return code merely indicates that the request is properly queued.
4334  /// Error codes returned by this function indicate various invalid parameters. To know if this function succeeds or not, and the failure code,
4335  /// register an AkDeviceStatusCallbackFunc callback with RegisterAudioDeviceStatusCallback.
4336  ///
4337  /// \sa AkOutputSettings for more details.
4338  /// \sa \ref integrating_secondary_outputs
4339  /// \sa \ref default_audio_devices
4340  /// \sa AK::SoundEngine::RegisterAudioDeviceStatusCallback
4341  /// \sa AK::AkDeviceStatusCallbackFunc
4342  /// \return
4343  /// The following codes are returned directly from the function, as opposed to the AkDeviceStatusCallback
4344  /// - \c AK_NotImplemented: Feature not supported, some platforms don't have other outputs.
4345  /// - \c AK_InvalidParameter: Out of range parameters or unsupported parameter combinations (see parameter list below).
4346  /// - \c 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.
4347  /// - \c 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.
4348  /// - \c AK_NotInitialized: If AK::SoundEngine::Init was not called or if the Init.bnk was not loaded before the call.
4349  /// - \c AK_Success: Parameters are valid.
4350  ///
4351  /// The following codes are returned from the callback.
4352  /// - \c AK_InsufficientMemory : Not enough memory to complete the operation.
4353  /// - \c 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.
4354  /// - \c AK_PluginNotRegistered: The audioDeviceShareset exists but the plug-in it refers to is not installed or statically linked with the game.
4355  /// - \c 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.
4356  /// - \c AK_DeviceNotCompatible: The hardware does not support this type of output. Wwise will NOT fallback to any other type of output.
4357  /// - \c 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.
4358  /// - \c 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.
4360  const AkOutputSettings & in_Settings, ///< Creation parameters for this output. \ref AkOutputSettings
4361  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
4362  const AkGameObjectID* in_pListenerIDs = NULL, ///< Specific listener(s) to attach to this device.
4363  ///< If specified, only the sounds routed to game objects linked to those listeners will play in this device.
4364  ///< It is necessary to have separate listeners if multiple devices of the same type can coexist (e.g. controller speakers)
4365  ///< If not specified, sound routing simply obey the associations between Master Busses and Audio Devices setup in the Wwise Project.
4366  AkUInt32 in_uNumListeners = 0 ///< The number of elements in the in_pListenerIDs array.
4367  );
4368 
4369  /// Removes one output added through AK::SoundEngine::AddOutput
4370  /// If a listener was associated with the device, you should consider unregistering the listener prior to call RemoveOutput
4371  /// so that Game Object/Listener routing is properly updated according to your game scenario.
4372  /// \sa \ref integrating_secondary_outputs
4373  /// \sa AK::SoundEngine::AddOutput
4374  /// \return AK_Success: Parameters are valid.
4376  AkOutputDeviceID in_idOutput ///< ID of the output to remove. Use the returned ID from AddOutput, GetOutputID, or ReplaceOutput
4377  );
4378 
4379  /// Replaces an output device previously created during engine initialization or from AddOutput, with a new output device.
4380  /// 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
4381  /// that the old output device was associated with, and preserve all listeners that were attached to the old output device.
4382  ///
4383  /// Like most functions of AK::SoundEngine, AddOutput is asynchronous. A successful return code merely indicates that the request is properly queued.
4384  /// Error codes returned by this function indicate various invalid parameters. To know if this function succeeds or not, and the failure code,
4385  /// register an AkDeviceStatusCallbackFunc callback with RegisterAudioDeviceStatusCallback.
4386  ///
4387  /// \sa AK::SoundEngine::AddOutput
4388  /// \sa AK::SoundEngine::RegisterAudioDeviceStatusCallback
4389  /// \sa AK::AkDeviceStatusCallbackFunc
4390  /// \return
4391  /// - \c AK_InvalidID: The audioDeviceShareset on in_settings was not valid.
4392  /// - \c 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.
4393  /// - \c 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.
4394  /// - \c AK_DeviceNotFound: The in_outputDeviceId provided does not match with any of the output devices that the sound engine is currently using.
4395  /// - \c AK_InvalidParameter: Out of range parameters or unsupported parameter combinations on in_settings
4396  /// - \c AK_Success: parameters were valid, and the remove and add will occur.
4398  const AkOutputSettings & in_Settings, ///< Creation parameters for this output. \ref AkOutputSettings
4399  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()
4400  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.
4401  );
4402 
4403  /// Gets the compounded output ID from shareset and device id.
4404  /// 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.
4405  /// Use 0 for in_idShareset & in_idDevice to get the Main Output ID (the one usually initialized during AK::SoundEngine::Init)
4406  /// \return The id of the output
4408  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.
4409  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
4410  /// \sa \ref obtaining_device_id
4411  );
4412 
4414  const char* in_szShareSet, ///< Audio Device ShareSet Name, as defined in the Wwise Project. If Null, will select the Default Output shareset (always available)
4415  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
4416  /// \sa \ref obtaining_device_id
4417  );
4418 
4419  #ifdef AK_SUPPORT_WCHAR
4421  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)
4422  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
4423  /// \sa \ref obtaining_device_id
4424  );
4425  #endif
4426 
4427  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
4428  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
4429  /// \aknote This function is useful only if used before the creation of an output, at the beginning of the sound engine setup.
4430  /// Once active outputs using this Bus have been created, it is imperative to use AK::SoundEngine:ReplaceOutput instead to change the type of output.
4431  /// \return
4432  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
4433  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
4435  AkUniqueID in_idBus, ///< Id of the master bus
4436  AkUniqueID in_idNewDevice ///< New device shareset to replace with.
4437  );
4438 
4439  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
4440  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
4441  /// \aknote This function is useful only if used before the creation of an output, at the beginning of the sound engine setup.
4442  /// Once active outputs using this Bus have been created, it is imperative to use AK::SoundEngine:ReplaceOutput instead to change the type of output.
4443  /// \return
4444  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
4445  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
4447  const char* in_BusName, ///< Name of the master bus
4448  const char* in_DeviceName ///< New device shareset to replace with.
4449  );
4450 
4451  #ifdef AK_SUPPORT_WCHAR
4452  /// Sets the Audio Device to which a master bus outputs. This overrides the setting in the Wwise project.
4453  /// Can only be set on top-level busses. The Init bank should be successfully loaded prior to this call.
4454  /// SetBusDevice must be preceded by a call to AddOutput for the new device shareset to be registered as an output.
4455  /// \return
4456  /// AK_IDNotFound when either the Bus ID or the Device ID are not present in the Init bank or the bank was not loaded
4457  /// AK_InvalidParameter when the specified bus is not a Master Bus. This function can be called only on busses that have no parent bus.
4459  const wchar_t* in_BusName, ///< Name of the master bus
4460  const wchar_t* in_DeviceName ///< New device shareset to replace with.
4461  );
4462  #endif
4463 
4464  /// Returns a listing of the current devices for a given sink plug-in, including Device ID, friendly name, and state.
4465  /// This call is only valid for sink plug-ins that support device enumeration.
4466  /// Prerequisites: the plug-in must have been initialized by loading the init bank or by calling \ref AK::SoundEngine::RegisterPlugin.
4467  /// \return
4468  /// - \c AK_NotImplemented if the sink plug-in does not implement device enumeration
4469  /// - \c AK_PluginNotRegistered if the plug-in has not been registered yet either by loading the init bank or by calling RegisterPluginDLL.
4470  /// - \c AK_NotCompatible if no device of this type are supported on the current platform
4471  /// - \c AK_Fail in case of system device manager failure (OS related)
4472  ///
4474  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
4475  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
4476  AkUInt32& io_maxNumDevices, ///< In: The length of the out_deviceDescriptions array. Out: If out_deviceDescriptions is not-null, this will be set to the number of entries in out_deviceDescriptions that was populated. If out_deviceDescriptions is null, this will be set to the number of devices that may be available.
4477  AkDeviceDescription* out_deviceDescriptions ///< The output array of device descriptions.
4478  );
4479 
4480  /// Returns a listing of the current devices for a given sink plug-in, including Device ID, friendly name, and state.
4481  /// This call is only valid for sink plug-ins that support device enumeration.
4482  /// Prerequisites:
4483  /// * The plug-in must have been initialized by loading the init bank or by calling \ref AK::SoundEngine::RegisterPlugin.
4484  /// * The audio device shareset must have been loaded from a soundbank and a device with this shareset must exist in the pipeline.
4485  /// \return
4486  /// AK_NotImplemented if the sink plug-in does not implement device enumeration
4487  /// AK_PluginNotRegistered if the plug-in has not been registered yet either by loading the init bank or by calling RegisterPluginDLL.
4489  AkUniqueID in_audioDeviceShareSetID, ///< In: The audio device shareset ID for which to list the sink plug-in devices.
4490  AkUInt32& io_maxNumDevices, ///< In: The length of the out_deviceDescriptions array. Out: If out_deviceDescriptions is not-null, this will be set to the number of entries in out_deviceDescriptions that was populated. If out_deviceDescriptions is null, this will be set to the number of devices that may be available.
4491  AkDeviceDescription* out_deviceDescriptions ///< The output array of device descriptions.
4492  );
4493 
4494  /// Sets the volume of a output device.
4495  /// \return
4496  /// - \c AK_Success if successful
4497  /// - \c AK_InvalidFloatValue if the value specified was NaN or Inf
4499  AkOutputDeviceID in_idOutput, ///< Output ID to set the volume on. As returned from AddOutput or GetOutputID
4500  AkReal32 in_fVolume ///< Volume (0.0 = Muted, 1.0 = Volume max)
4501  );
4502 
4503  /// 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).
4504  /// 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
4505  /// 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
4506  /// 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.
4507  /// \return
4508  /// AK_NotCompatible when the device ID provided does not support spatial audio, or the platform does not support spatial audio
4509  /// AK_Fail when there is some other miscellaneous failure, or the device ID provided does not match a device that the system knows about
4510  /// AK_Success when the device ID provided does support spatial audio
4512  AkUInt32 in_idDevice ///< Device specific identifier, when multiple devices of the same type are possible. If only one device is possible, leave to 0.
4513  /// \sa \ref obtaining_device_id
4514  );
4515 
4516 
4517  //@}
4518 
4519  /// 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.
4520  /// Call \c WakeupFromSuspend when your application receives the message from the OS that the process is back in foreground.
4521  /// When suspended, the sound engine will process API messages (like PostEvent and SetSwitch) only when \ref RenderAudio() is called.
4522  /// It is recommended to match the <b>in_bRenderAnyway</b> parameter with the behavior of the rest of your game:
4523  /// 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.
4524  /// If you want to minimize CPU when in background, then don't allow rendering and never call RenderAudio from the game.
4525  ///
4526  /// Consult \ref workingwithsdks_system_calls to learn when it is appropriate to call this function for each platform.
4527  /// \sa WakeupFromSuspend
4528  /// \sa \ref workingwithsdks_system_calls
4530  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().
4531  bool in_bFadeOut = true ///< Delay the suspend by one audio frame in order to fade-out. When false, the suspend takes effect immediately but audio may glitch.
4532  );
4533 
4534  /// 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.
4535  ///
4536  /// Consult \ref workingwithsdks_system_calls to learn when it is appropriate to call this function for each platform.
4537  /// \sa Suspend
4538  /// \sa \ref workingwithsdks_system_calls
4540  AkUInt32 in_uDelayMs = 0 /// Delay (in milliseconds) before the wake up occurs. Rounded up to audio frame granularity. Adding a delay is useful if there is a possibility that another OS event may override the wake-up in the near future.
4541  );
4542 
4543  /// Obtains the current audio output buffer tick. This corresponds to the number of buffers produced by
4544  /// the sound engine since initialization.
4545  /// \return Tick count.
4547 
4548  /// Obtains the current audio output sample tick. This corresponds to the number of sapmles produced by
4549  /// the sound engine since initialization.
4550  /// \return Sample count.
4552  }
4553 }
4554 
4555 #endif // _AK_SOUNDENGINE_H_
AkOutputSettings settingsMainOutput
Main output device settings.
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.
AkUInt32 AkStateGroupID
State group ID
Definition: AkTypes.h:122
AKSOUNDENGINE_API AKRESULT RemoveDefaultListener(AkGameObjectID in_listenerGameObj)
AKSOUNDENGINE_API AKRESULT PrepareEvent(PreparationType in_PreparationType, const char **in_ppszString, AkUInt32 in_uNumEvent)
AKSOUNDENGINE_API AkUInt32 GetSampleRate()
void(* AkProfilerPostMarkerFunc)(AkPluginID in_uPluginID, const char *in_pszMarkerName)
AKSOUNDENGINE_API AKRESULT SetRTPCValue(AkRtpcID in_rtpcID, AkRtpcValue in_value, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkTimeMs in_uValueChangeDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear, bool in_bBypassInternalValueInterpolation=false)
AKSOUNDENGINE_API AKRESULT SetOutputDeviceEffect(AkOutputDeviceID in_outputDeviceID, AkUInt32 in_uFXIndex, AkUniqueID in_FXShareSetID)
uint16_t AkUInt16
Unsigned 16-bit integer
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:124
AkBackgroundMusicChangeCallbackFunc BGMCallback
Application-defined audio source change event callback function.
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:934
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:780
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
AkPanningRule ePanningRule
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:375
void(* AkJobWorkerFunc)(AkJobType in_jobType, AkUInt32 in_uExecutionTimeUsec)
AKSOUNDENGINE_API AKRESULT StopMIDIOnEvent(AkUniqueID in_eventID=AK_INVALID_UNIQUE_ID, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID)
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,...
IAkSoftwareCodec *(* AkCreateFileSourceCallback)(void *in_pCtx)
Registered file source creation function prototype.
Definition: AkTypes.h:1109
@ AkSetPositionFlags_Default
Definition: AkTypes.h:1187
AKSOUNDENGINE_API AKRESULT StartOutputCapture(const AkOSChar *in_CaptureFileName)
AkUInt32 AkRtpcID
Real time parameter control ID
Definition: AkTypes.h:141
AkProfilerPopTimerFunc fnProfilerPopTimer
External (optional) function for tracking performance of the sound engine that is called when a timer...
AKSOUNDENGINE_API AKRESULT SetMaxNumVoicesLimit(AkUInt16 in_maxNumberVoices)
AKSOUNDENGINE_API AKRESULT RegisterOutputDeviceMeteringCallback(AkOutputDeviceID in_idOutput, AkOutputDeviceMeteringCallbackFunc in_pfnCallback, AkMeteringFlags in_eMeteringFlags, void *in_pCookie=NULL)
AkUInt32 uNumSamplesPerFrame
Number of samples per audio frame (256, 512, 1024, or 2048).
@ AkFloorPlane_Default
The Wwise default floor plane is ZX.
AKSOUNDENGINE_API AKRESULT SetDefaultListeners(const AkGameObjectID *in_pListenerObjs, AkUInt32 in_uNumListeners)
AKSOUNDENGINE_API AKRESULT RegisterBusVolumeCallback(AkUniqueID in_busID, AkBusCallbackFunc in_pfnCallback, void *in_pCookie=NULL)
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:128
AkUInt32 AkBankID
Run time bank ID
Definition: AkTypes.h:143
#define AK_EXTERNAPIFUNC(_type, _name)
@ AkFloorPlane_XY
The floor is oriented along the XY-plane. The front vector points towards +X, the up vector towards +...
AkReal32 fDebugOutOfRangeLimit
Debug setting: Only used when bDebugOutOfRangeCheckEnabled is true. This defines the maximum values s...
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)
AKSOUNDENGINE_API void CancelEventCallbackCookie(void *in_pCookie)
AKRESULT
Standard function call result.
Definition: AkTypes.h:199
AkUInt32 updateBufferTick
Value of GetBufferTick() at the time the position was updated
AKRESULT(* AkGetDeviceListCallback)(AkUInt32 &io_maxNumDevices, AkDeviceDescription *out_deviceDescriptions)
Registered plugin device enumeration function prototype, used for providing lists of devices by plug-...
Definition: IAkPlugin.h:1335
AKSOUNDENGINE_API AKRESULT RegisterGameObj(AkGameObjectID in_gameObjectID)
void(* AkGlobalCallbackFunc)(AK::IAkGlobalPluginContext *in_pContext, AkGlobalCallbackLocation in_eLocation, void *in_pCookie)
Definition: AkCallback.h:368
@ Preparation_LoadAndDecode
Vorbis media is decoded when loading, and an uncompressed PCM version is used for playback.
AkMeteringFlags
Metering flags. Used for specifying bus metering, through AK::SoundEngine::RegisterBusVolumeCallback(...
Definition: AkTypes.h:1218
AKSOUNDENGINE_API AKRESULT GetContainerHistory(AK::IWriteBytes *in_pBytes)
AKSOUNDENGINE_API AKRESULT LoadBank(const char *in_pszString, AkBankID &out_bankID, AkBankType in_bankType=AkBankType_User)
AkInt32 AkMemPoolId
Memory pool ID
Definition: AkTypes.h:130
AKSOUNDENGINE_API AKRESULT SetState(AkStateGroupID in_stateGroup, AkStateID in_state)
Platform-independent initialization settings of output devices.
AKSOUNDENGINE_API bool IsInitialized()
@ Preparation_Unload
PrepareEvent() will unload required information to play the specified event.
@ AkBankContent_All
Use AkBankContent_All to load both the media and structural content.
void(* AkBusMeteringCallbackFunc)(AkBusMeteringCallbackInfo *in_pCallbackInfo)
Definition: AkCallback.h:286
AKSOUNDENGINE_API AKRESULT SetOfflineRenderingFrameTime(AkReal32 in_fFrameTimeInSeconds)
char AkOSChar
Generic character string
Definition: AkTypes.h:60
uint8_t AkUInt8
Unsigned 8-bit integer
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
AKSOUNDENGINE_API AKRESULT WakeupFromSuspend(AkUInt32 in_uDelayMs=0)
AKSOUNDENGINE_API AKRESULT SetMultipleObstructionAndOcclusion(AkGameObjectID in_EmitterID, AkGameObjectID in_uListenerID, AkObstructionOcclusionValues *in_fObstructionOcclusionValues, AkUInt32 in_uNumOcclusionObstruction)
AkUInt32 samplePosition
Position of the source (in samples) associated with that playing item
AKSOUNDENGINE_API AKRESULT SetOutputVolume(AkOutputDeviceID in_idOutput, AkReal32 in_fVolume)
AKSOUNDENGINE_API AKRESULT GetPanningRule(AkPanningRule &out_ePanningRule, AkOutputDeviceID in_idOutput=0)
void(* AkOutputDeviceMeteringCallbackFunc)(AkOutputDeviceMeteringCallbackInfo *in_pCallbackInfo)
Definition: AkCallback.h:296
AKSOUNDENGINE_API AKRESULT ResetRTPCValueByPlayingID(AkRtpcID in_rtpcID, AkPlayingID in_playingID, AkTimeMs in_uValueChangeDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear, bool in_bBypassInternalValueInterpolation=false)
AkFloorPlane eFloorPlane
AKSOUNDENGINE_API AKRESULT SetBankLoadIOSettings(AkReal32 in_fThroughput, AkPriority in_priority)
#define NULL
Definition: AkTypes.h:46
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)
float AkReal32
32-bit floating point
AKSOUNDENGINE_API AKRESULT PinEventInStreamCache(AkUniqueID in_eventID, AkPriority in_uActivePriority, AkPriority in_uInactivePriority)
AKSOUNDENGINE_API void CancelEventCallbackGameObject(AkGameObjectID in_gameObjectID)
Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
Definition: AkTypes.h:485
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)
FuncRequestJobWorker fnRequestJobWorker
Function called by the job manager when a new worker needs to be requested. When null,...
AKSOUNDENGINE_API AKRESULT SetActorMixerEffect(AkUniqueID in_audioNodeID, AkUInt32 in_uFXIndex, AkUniqueID in_shareSetID)
AkSetPositionFlags
Flags to independently set the position of the emitter or listener component on a game object.
Definition: AkTypes.h:1183
AKSOUNDENGINE_API AKRESULT RegisterCodec(AkUInt32 in_ulCompanyID, AkUInt32 in_ulCodecID, AkCreateFileSourceCallback in_pFileCreateFunc, AkCreateBankSourceCallback in_pBankCreateFunc)
@ MultiPositionType_MultiDirections
Simulate one sound coming from multiple directions. Useful for repositionning sounds based on wall op...
Definition: AkTypes.h:1158
bool bUseLEngineThread
Use a separate thread for processing audio. If set to false, audio processing will occur in RenderAud...
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)
AkUInt32 uMaxActiveWorkers[AK_NUM_JOB_TYPES]
The maximum number of concurrent workers that will be requested. Must be >= 1 for each jobType.
AkReal32 * VectorPtr
Volume vector. Access each element with the standard bracket [] operator.
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:120
AKSOUNDENGINE_API AKRESULT StartProfilerCapture(const AkOSChar *in_CaptureFileName)
void(* AkProfilerPopTimerFunc)()
External (optional) function for tracking performance of the sound engine that is called when a timer...
Configured audio settings
Definition: AkTypes.h:285
@ AkFloorPlane_XZ
The floor is oriented along the ZX-plane. The front vector points towards +Z, the up vector towards +...
AkUInt32 uContinuousPlaybackLookAhead
Default is 1 audio quantum, also known as an audio frame. Its size is equal to AkInitSettings::uNumSa...
AKSOUNDENGINE_API AKRESULT RemoveOutput(AkOutputDeviceID in_idOutput)
bool bEnableGameSyncPreparation
Sets to true to enable AK::SoundEngine::PrepareGameSync usage.
AkUInt32 AkPluginID
Source or effect plug-in ID
Definition: AkTypes.h:131
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...
void * pClientData
Arbitrary data that will be passed back to the client when calling FuncRequestJobWorker
AKSOUNDENGINE_API AKRESULT GetOutputDeviceConfiguration(AkOutputDeviceID in_idOutput, AkChannelConfig &io_channelConfig, Ak3DAudioSinkCapabilities &io_capabilities)
AKSOUNDENGINE_API AKRESULT GetDeviceSpatialAudioSupport(AkUInt32 in_idDevice)
AKSOUNDENGINE_API AKRESULT AddListener(AkGameObjectID in_emitterGameObj, AkGameObjectID in_listenerGameObj)
AkAssertHook pfnAssertHook
External assertion handling function (optional)
Necessary settings for setting externally-loaded sources
AkUInt32 uMemorySlabSize
Size of each memory slab used for job manager memory. Must be a power of two. Default is 8K.
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...
AKSOUNDENGINE_API AKRESULT SetScalingFactor(AkGameObjectID in_GameObjectID, AkReal32 in_fAttenuationScalingFactor)
AKSOUNDENGINE_API AKRESULT RegisterCaptureCallback(AkCaptureCallbackFunc in_pfnCallback, AkOutputDeviceID in_idOutput=AK_INVALID_OUTPUT_DEVICE_ID, void *in_pCookie=NULL)
@ Preparation_Load
PrepareEvent() will load required information to play the specified event.
AKSOUNDENGINE_API AKRESULT UnregisterGameObj(AkGameObjectID in_gameObjectID)
AKSOUNDENGINE_API AKRESULT SetJobMgrMaxActiveWorkers(AkJobType in_jobType, AkUInt32 in_uNewMaxActiveWorkers)
AKSOUNDENGINE_API AKRESULT RenderAudio(bool in_bAllowSyncRender=true)
AkJobMgrSettings settingsJobManager
Settings to configure the behavior of the Sound Engine's internal job manager
void(* AkCaptureCallbackFunc)(AkAudioBuffer &in_CaptureBuffer, AkOutputDeviceID in_idOutput, void *in_pCookie)
Definition: AkCallback.h:408
Positioning information for a sound, with specified subset of its channels.
Definition: AkTypes.h:787
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:135
AkGroupType
Game sync group type
Definition: AkTypes.h:277
Settings for the Sound Engine's internal job manager
AKSOUNDENGINE_API AkPlayingID PostMIDIOnEvent(AkUniqueID in_eventID, AkGameObjectID in_gameObjectID, AkMIDIPost *in_pPosts, AkUInt16 in_uNumPosts, bool in_bAbsoluteOffsets=false, AkUInt32 in_uFlags=0, AkCallbackFunc in_pfnCallback=NULL, void *in_pCookie=NULL, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID)
static const AkUInt32 AK_NUM_JOB_TYPES
Number of possible job types recognized by the Sound Engine
Definition: AkTypes.h:195
void(* AkCallbackFunc)(AkCallbackType in_eType, AkCallbackInfo *in_pCallbackInfo)
Definition: AkCallback.h:266
AKRESULT(* AkBackgroundMusicChangeCallbackFunc)(bool in_bBackgroundMusicMuted, void *in_pCookie)
AKSOUNDENGINE_API AKRESULT UnregisterCaptureCallback(AkCaptureCallbackFunc in_pfnCallback, AkOutputDeviceID in_idOutput=AK_INVALID_OUTPUT_DEVICE_ID, void *in_pCookie=NULL)
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
AKSOUNDENGINE_API AKRESULT UnloadBank(const char *in_pszString, const void *in_pInMemoryBankPtr, AkBankType in_bankType=AkBankType_User)
AkReal32 fGameUnitsToMeters
AKSOUNDENGINE_API AKRESULT RegisterBusMeteringCallback(AkUniqueID in_busID, AkBusMeteringCallbackFunc in_pfnCallback, AkMeteringFlags in_eMeteringFlags, void *in_pCookie=NULL)
static const AkUInt32 AK_INVALID_OUTPUT_DEVICE_ID
Invalid Device ID
Definition: AkTypes.h:175
AkCurveInterpolation
Curve interpolation types
Definition: AkTypes.h:911
AKSOUNDENGINE_API void SetRandomSeed(AkUInt32 in_uSeed)
#define AK_CALLBACK(_type, _name)
AkPanningRule
Headphone / speakers panning rules
Definition: AkTypes.h:1192
void(* AkBusCallbackFunc)(AkSpeakerVolumeMatrixCallbackInfo *in_pCallbackInfo)
Definition: AkCallback.h:276
AkUInt32 uNumMemorySlabs
Number of memory slabs to pre-allocate for job manager memory. At least one slab per worker thread sh...
AKSOUNDENGINE_API void GetDefaultPlatformInitSettings(AkPlatformInitSettings &out_platformSettings)
AKSOUNDENGINE_API AKRESULT TryUnsetMedia(AkSourceSettings *in_pSourceSettings, AkUInt32 in_uNumSourceSettings, AKRESULT *out_pUnsetResults)
AKSOUNDENGINE_API AKRESULT SetMultiplePositions(AkGameObjectID in_GameObjectID, const AkSoundPosition *in_pPositions, AkUInt16 in_NumPositions, MultiPositionType in_eMultiPositionType=MultiPositionType_MultiDirections, AkSetPositionFlags in_eFlags=AkSetPositionFlags_Default)
AKSOUNDENGINE_API AKRESULT GetSourcePlayPosition(AkPlayingID in_PlayingID, AkTimeMs *out_puPosition, bool in_bExtrapolate=true)
AKSOUNDENGINE_API AKRESULT SetDistanceProbe(AkGameObjectID in_listenerGameObjectID, AkGameObjectID in_distanceProbeGameObjectID)
AKSOUNDENGINE_API AKRESULT SetListeners(AkGameObjectID in_emitterGameObj, const AkGameObjectID *in_pListenerGameObjs, AkUInt32 in_uNumListeners)
AKSOUNDENGINE_API AKRESULT SetPosition(AkGameObjectID in_GameObjectID, const AkSoundPosition &in_Position, AkSetPositionFlags in_eFlags=AkSetPositionFlags_Default)
static const AkUniqueID AK_INVALID_UNIQUE_ID
Invalid unique 32-bit ID
Definition: AkTypes.h:163
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)
AkUInt32 AkStateID
State ID
Definition: AkTypes.h:121
AkPluginType
Definition: AkTypes.h:1232
@ AkPanningRule_Speakers
Left and right positioned 60 degrees apart (by default - see AK::SoundEngine::GetSpeakerAngles()).
Definition: AkTypes.h:1193
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:326
AKSOUNDENGINE_API void MuteBackgroundMusic(bool in_bMute)
@ AkCurveInterpolation_Linear
Linear (Default)
Definition: AkTypes.h:918
AKSOUNDENGINE_API AKRESULT SetContainerHistory(AK::IReadBytes *in_pBytes)
void(* AkAssertHook)(const char *in_pszExpression, const char *in_pszFileName, int in_lineNumber)
AKSOUNDENGINE_API AKRESULT SetMixer(AkUniqueID in_audioNodeID, AkUniqueID in_shareSetID)
static const AkPlayingID AK_INVALID_PLAYING_ID
Invalid playing ID
Definition: AkTypes.h:165
AKSOUNDENGINE_API AkUInt32 GetIDFromString(const char *in_pszString)
AKSOUNDENGINE_API AKRESULT PrepareBank(AK::SoundEngine::PreparationType in_PreparationType, const char *in_pszString, AK::SoundEngine::AkBankContent in_uFlags=AkBankContent_All, AkBankType in_bankType=AkBankType_User)
AKSOUNDENGINE_API AKRESULT SetOfflineRendering(bool in_bEnableOfflineRendering)
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)
uint64_t AkUInt64
Unsigned 64-bit integer
AKSOUNDENGINE_API AKRESULT AddDefaultListener(AkGameObjectID in_listenerGameObj)
AkUInt32 AkSwitchStateID
Switch ID
Definition: AkTypes.h:140
@ AkActionOnEventType_Resume
Resume
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)
AKSOUNDENGINE_API AKRESULT Suspend(bool in_bRenderAnyway=false, bool in_bFadeOut=true)
AKSOUNDENGINE_API AKRESULT StopOutputCapture()
AkUInt32 uCpuMonitorQueueMaxSize
Maximum size of the CPU monitoring queue, per thread, in bytes. This parameter is not used in Release...
AK::IAkPluginParam *(* AkCreateParamCallback)(AK::IAkPluginMemAlloc *in_pAllocator)
Registered plugin parameter node creation function prototype.
Definition: IAkPlugin.h:1333
AKSOUNDENGINE_API AKRESULT ResetListenersToDefault(AkGameObjectID in_emitterGameObj)
@ AkActionOnEventType_Break
Break
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)
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:162
AkUniqueID audioDeviceShareset
@ AkFloorPlane_YZ
The floor is oriented along the YZ-plane. The front vector points towards +Y, the up vector towards +...
AkTimeMs msTime
Position of the source (in ms) associated with that playing item
@ AkActionOnEventType_Stop
Stop
void * BGMCallbackCookie
Application-defined user data for the audio source change event callback function.
AkUniqueID sourceID
Source ID (available in the SoundBank content files)
uint32_t AkUInt32
Unsigned 32-bit integer
AkChannelConfig channelConfig
bool bUseSoundBankMgrThread
Use a separate thread for loading sound banks. Allows asynchronous operations.
void(* AkDeviceStatusCallbackFunc)(AK::IAkGlobalPluginContext *in_pContext, AkUniqueID in_idAudioDeviceShareset, AkUInt32 in_idDeviceID, AkAudioDeviceEvent in_idEvent, AKRESULT in_AkResult)
Definition: AkCallback.h:390
AkUniqueID mediaID
Media ID of playing item. (corresponds to 'ID' attribute of 'File' element in SoundBank metadata file...
@ AkPluginTypeNone
Unknown/invalid plug-in type.
Definition: AkTypes.h:1233
Definition: AkMidiTypes.h:237
AkUInt64 AkOutputDeviceID
Audio Output device ID
Definition: AkTypes.h:153
bool bDebugOutOfRangeCheckEnabled
Debug setting: Enable checks for out-of-range (and NAN) floats in the processing code....
AkUniqueID audioNodeID
Audio Node ID of playing item
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)
@ AkBankType_User
User-defined bank.
Definition: AkTypes.h:1132
AkReal32 AkRtpcValue
Real time parameter control value
Definition: AkTypes.h:142
AKSOUNDENGINE_API AKRESULT UnregisterResourceMonitorCallback(AkResourceMonitorCallbackFunc in_pCallback)
AKSOUNDENGINE_API AKRESULT UnregisterGlobalCallback(AkGlobalCallbackFunc in_pCallback, AkUInt32 in_eLocation=AkGlobalCallbackLocation_BeginRender)
AkProfilerPostMarkerFunc fnProfilerPostMarker
External (optional) function for tracking significant events in the sound engine, to act as a marker ...
AkUInt32 AkSwitchGroupID
Switch group ID
Definition: AkTypes.h:139
AKSOUNDENGINE_API AKRESULT ClearPreparedEvents()
Return values for GetSourcePlayPositions.
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
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)
AK::IAkPlugin *(* AkCreatePluginCallback)(AK::IAkPluginMemAlloc *in_pAllocator)
Registered plugin creation function prototype.
Definition: IAkPlugin.h:1331
IAkSoftwareCodec *(* AkCreateBankSourceCallback)(void *in_pCtx)
Registered bank source node creation function prototype.
Definition: AkTypes.h:1111
AKSOUNDENGINE_API AkUInt64 GetSampleTick()
AKSOUNDENGINE_API AK::IAkGlobalPluginContext * GetGlobalPluginContext()
AkUInt32 AkBankType
Run time bank type
Definition: AkTypes.h:144
AKSOUNDENGINE_API AKRESULT UnsetMedia(AkSourceSettings *in_pSourceSettings, AkUInt32 in_uNumSourceSettings)
@ AkActionOnEventType_ReleaseEnvelope
Release envelope
AkFloorPlane
AKSOUNDENGINE_API AKRESULT SetBusConfig(AkUniqueID in_audioNodeID, AkChannelConfig in_channelConfig)
AkUInt32 AkJobType
Job type identifier
Definition: AkTypes.h:157
AkUInt32 AkPlayingID
Playing ID
Definition: AkTypes.h:123
AKSOUNDENGINE_API bool GetBackgroundMusicMute()
@ AkActionOnEventType_Pause
Pause
void(* AkProfilerPushTimerFunc)(AkPluginID in_uPluginID, const char *in_pszZoneName)
AkProfilerPushTimerFunc fnProfilerPushTimer
External (optional) function for tracking performance of the sound engine that is called when a timer...
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:342
void(* FuncRequestJobWorker)(AkJobWorkerFunc in_fnJobWorker, AkJobType in_jobType, AkUInt32 in_uNumWorkers, void *in_pClientData)
Callback function prototype definition used for handling requests from JobMgr for new workers to perf...
AkUInt32 uBankReadBufferSize
The number of bytes read by the BankReader when new data needs to be loaded from disk during serializ...
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:147
AKSOUNDENGINE_API AKRESULT GetSpeakerAngles(AkReal32 *io_pfSpeakerAngles, AkUInt32 &io_uNumAngles, AkReal32 &out_fHeightAngle, AkOutputDeviceID in_idOutput=0)
AKSOUNDENGINE_API void CancelEventCallback(AkPlayingID in_playingID)

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요