Table of Contents

Wwise SDK 2019.1.8
AkQueryParameters.h
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  Version: <VERSION> Build: <BUILDNUMBER>
25  Copyright (c) <COPYRIGHTYEAR> Audiokinetic Inc.
26 *******************************************************************************/
27 
28 // AkQueryParameters.h
29 
30 /// \file
31 /// The sound engine parameter query interface.
32 
33 
34 #ifndef _AK_QUERYPARAMS_H_
35 #define _AK_QUERYPARAMS_H_
36 
37 #include <AK/SoundEngine/Common/AkSoundEngineExport.h>
38 #include <AK/SoundEngine/Common/AkTypes.h>
39 #include <AK/SoundEngine/Common/AkCommonDefs.h>
40 #include <AK/Tools/Common/AkArray.h>
41 
42 /// Positioning information obtained from an object
44 {
45  AkReal32 fCenterPct; ///< Center % [0..1]
46  AkSpeakerPanningType pannerType; ///< Speaker panning type: type of panning logic when object is not 3D spatialized.
47  Ak3DPositionType e3dPositioningType; ///< 3D position type: defines what acts as the emitter position for computing spatialization against the listener.
48  bool bHoldEmitterPosAndOrient; ///< Hold emitter position and orientation values when starting playback.
49  Ak3DSpatializationMode e3DSpatializationMode; ///< Spatialization mode
50  bool bEnableAttenuation; ///< Attenuation parameter set is active.
51 
52  bool bUseConeAttenuation; ///< Use the cone attenuation
53  AkReal32 fInnerAngle; ///< Inner angle
54  AkReal32 fOuterAngle; ///< Outer angle
55  AkReal32 fConeMaxAttenuation; ///< Cone max attenuation
56  AkLPFType LPFCone; ///< Cone low pass filter value
57  AkLPFType HPFCone; ///< Cone low pass filter value
58 
59  AkReal32 fMaxDistance; ///< Maximum distance
60  AkReal32 fVolDryAtMaxDist; ///< Volume dry at maximum distance
61  AkReal32 fVolAuxGameDefAtMaxDist; ///< Volume wet at maximum distance (if any) (based on the Game defined distance attenuation)
62  AkReal32 fVolAuxUserDefAtMaxDist; ///< Volume wet at maximum distance (if any) (based on the User defined distance attenuation)
63  AkLPFType LPFValueAtMaxDist; ///< Low pass filter value at max distance (if any)
64  AkLPFType HPFValueAtMaxDist; ///< High pass filter value at max distance (if any)
65 };
66 
67 /// Object information structure for QueryAudioObjectsIDs
68 struct AkObjectInfo
69 {
70  AkUniqueID objID; ///< Object ID
71  AkUniqueID parentID; ///< Object ID of the parent
72  AkInt32 iDepth; ///< Depth in tree
73 };
74 
75 // Audiokinetic namespace
76 namespace AK
77 {
78  // Audiokinetic sound engine namespace
79  namespace SoundEngine
80  {
81  /// Query namespace
82  /// \remarks The functions in this namespace are thread-safe, unless stated otherwise.
83  ///
84  /// \warning Unless noted otherwise in the function definition that it will not acquire the main audio lock, the functions in this namespace
85  /// might stall for several milliseconds before returning (as they cannot execute while the
86  /// main sound engine thread is busy). They should therefore not be called from any
87  /// game critical thread, such as the main game loop.
88  ///
89  /// \warning There might be a significant delay between a Sound Engine call (such as PostEvent) and
90  /// the information being reflected in a Query (such as GetIsGameObjectActive).
91 
92  namespace Query
93  {
94  ////////////////////////////////////////////////////////////////////////
95  /// @name Game Objects
96  //@{
97 
98  /// Get the position of a game object.
99  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
100  /// \sa
101  /// - \ref soundengine_3dpositions
102  AK_EXTERNAPIFUNC( AKRESULT, GetPosition )(
103  AkGameObjectID in_GameObjectID, ///< Game object identifier
104  AkSoundPosition& out_rPosition ///< Position to get
105  );
106 
107  //@}
108 
109  ////////////////////////////////////////////////////////////////////////
110  /// @name Listeners
111  //@{
112 
113  /// Get a game object's listeners.
114  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
115  /// \sa
116  /// - \ref soundengine_listeners
117  AK_EXTERNAPIFUNC( AKRESULT, GetListeners )(
118  AkGameObjectID in_GameObjectID, ///< Source game object identifier
119  AkGameObjectID* out_ListenerObjectIDs, ///< Pointer to an array of AkGameObjectID's. Will be populated with the IDs of the listeners of in_GameObjectID. Pass NULL to querry the size required.
120  AkUInt32& oi_uNumListeners ///< Pass in the the available number of elements in the array 'out_ListenerObjectIDs'. After return, the number of valid elements filled in the array.
121  );
122 
123  /// Get a listener's position.
124  /// \return AK_Success if succeeded, or AK_InvalidParameter if the index is out of range
125  /// \sa
126  /// - \ref soundengine_listeners_settingpos
127  AK_EXTERNAPIFUNC( AKRESULT, GetListenerPosition )(
128  AkGameObjectID in_uIndex, ///< Listener index (0: first listener, 7: 8th listener)
129  AkListenerPosition& out_rPosition ///< Position set
130  );
131 
132  /// Get a listener's spatialization parameters.
133  /// \return AK_Success if succeeded, or AK_InvalidParameter if the index is out of range
134  /// \sa
135  /// - AK::SoundEngine::SetListenerSpatialization().
136  /// - \ref soundengine_listeners_spatial
137  AK_EXTERNAPIFUNC( AKRESULT, GetListenerSpatialization )(
138  AkUInt32 in_uIndex, ///< Listener index (0: first listener, 7: 8th listener)
139  bool& out_rbSpatialized, ///< Spatialization enabled
140  AK::SpeakerVolumes::VectorPtr & out_pVolumeOffsets, ///< Per-speaker vector of volume offsets, in decibels. Use the functions of AK::SpeakerVolumes::Vector to interpret it.
141  AkChannelConfig &out_channelConfig ///< Channel configuration associated with out_rpVolumeOffsets.
142  );
143 
144  //@}
145 
146 
147  ////////////////////////////////////////////////////////////////////////
148  /// @name Game Syncs
149  //@{
150 
151  /// Enum used to request a specific RTPC Value.
152  /// Also used to inform the user of where the RTPC Value comes from.
153  ///
154  /// For example, the user may request the GameObject specific value by specifying RTPCValue_GameObject
155  /// and can receive the Global Value if there was no GameObject specific value, and even the
156  /// default value is there was no Global value either.
157  /// \sa
158  /// - GetRTPCValue
160  {
161  RTPCValue_Default, ///< The value is the Default RTPC.
162  RTPCValue_Global, ///< The value is the Global RTPC.
163  RTPCValue_GameObject, ///< The value is the game object specific RTPC.
164  RTPCValue_PlayingID, ///< The value is the playing ID specific RTPC.
165  RTPCValue_Unavailable ///< The value is not available for the RTPC specified.
166  };
167 
168  /// Get the value of a real-time parameter control (by ID)
169  /// An RTPC can have a any combination of a global value, a unique value for each game object, or a unique value for each playing ID.
170  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
171  /// If a value at the requested scope (determined by RTPCValue_type) is not found, the value that is available at the the next broadest scope will be returned, and io_rValueType will be changed to indicate this.
172  /// \note
173  /// When looking up RTPC values via playing ID (ie. io_rValueType is RTPC_PlayingID), in_gameObjectID can be set to a specific game object (if it is available to the caller) to use as a fall back value.
174  /// If the game object is unknown or unavailable, AK_INVALID_GAME_OBJECT can be passed in in_gameObjectID, and the game object will be looked up via in_playingID.
175  /// However in this case, it is not possible to retrieve a game object value as a fall back value if the playing id does not exist. It is best to pass in the game object if possible.
176  ///
177  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered, or AK_Fail if the RTPC value could not be obtained
178  /// \sa
179  /// - \ref soundengine_rtpc
180  /// - RTPCValue_type
181  AK_EXTERNAPIFUNC(AKRESULT, GetRTPCValue)(
182  AkRtpcID in_rtpcID, ///< ID of the RTPC
183  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
184  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
185  AkRtpcValue& out_rValue, ///< Value returned
186  RTPCValue_type& io_rValueType ///< In/Out value, the user must specify the requested type. The function will return in this variable the type of the returned value.
187  );
188 
189 #ifdef AK_SUPPORT_WCHAR
190 
191  /// Get the value of a real-time parameter control (by ID)
192  /// An RTPC can have a any combination of a global value, a unique value for each game object, or a unique value for each playing ID.
193  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
194  /// If a value at the requested scope (determined by RTPCValue_type) is not found, the value that is available at the the next broadest scope will be returned, and io_rValueType will be changed to indicate this.
195  /// \note
196  /// When looking up RTPC values via playing ID (ie. io_rValueType is RTPC_PlayingID), in_gameObjectID can be set to a specific game object (if it is available to the caller) to use as a fall back value.
197  /// If the game object is unknown or unavailable, AK_INVALID_GAME_OBJECT can be passed in in_gameObjectID, and the game object will be looked up via in_playingID.
198  /// However in this case, it is not possible to retrieve a game object value as a fall back value if the playing id does not exist. It is best to pass in the game object if possible.
199  ///
200  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered or the rtpc name could not be found, or AK_Fail if the RTPC value could not be obtained
201  /// \sa
202  /// - \ref soundengine_rtpc
203  /// - RTPCValue_type
204  AK_EXTERNAPIFUNC(AKRESULT, GetRTPCValue)(
205  const wchar_t* in_pszRtpcName, ///< String name of the RTPC
206  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
207  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
208  AkRtpcValue& out_rValue, ///< Value returned
209  RTPCValue_type& io_rValueType ///< In/Out value, the user must specify the requested type. The function will return in this variable the type of the returned value. );
210  );
211 
212 #endif //AK_SUPPORT_WCHAR
213 
214  /// Get the value of a real-time parameter control (by ID)
215  /// An RTPC can have a any combination of a global value, a unique value for each game object, or a unique value for each playing ID.
216  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
217  /// If a value at the requested scope (determined by RTPCValue_type) is not found, the value that is available at the the next broadest scope will be returned, and io_rValueType will be changed to indicate this.
218  /// \note
219  /// When looking up RTPC values via playing ID (ie. io_rValueType is RTPC_PlayingID), in_gameObjectID can be set to a specific game object (if it is available to the caller) to use as a fall back value.
220  /// If the game object is unknown or unavailable, AK_INVALID_GAME_OBJECT can be passed in in_gameObjectID, and the game object will be looked up via in_playingID.
221  /// However in this case, it is not possible to retrieve a game object value as a fall back value if the playing id does not exist. It is best to pass in the game object if possible.
222  ///
223  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered or the rtpc name could not be found, or AK_Fail if the RTPC value could not be obtained
224  /// \sa
225  /// - \ref soundengine_rtpc
226  /// - RTPCValue_type
227  AK_EXTERNAPIFUNC(AKRESULT, GetRTPCValue)(
228  const char* in_pszRtpcName, ///< String name of the RTPC
229  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
230  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
231  AkRtpcValue& out_rValue, ///< Value returned
232  RTPCValue_type& io_rValueType ///< In/Out value, the user must specify the requested type. The function will return in this variable the type of the returned value. );
233  );
234 
235  /// Get the state of a switch group (by IDs).
236  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
237  /// \sa
238  /// - \ref soundengine_switch
239  AK_EXTERNAPIFUNC( AKRESULT, GetSwitch )(
240  AkSwitchGroupID in_switchGroup, ///< ID of the switch group
241  AkGameObjectID in_gameObjectID, ///< Associated game object ID
242  AkSwitchStateID& out_rSwitchState ///< ID of the switch
243  );
244 
245 #ifdef AK_SUPPORT_WCHAR
246  /// Get the state of a switch group.
247  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the switch group name can not be found
248  /// \sa
249  /// - \ref soundengine_switch
250  AK_EXTERNAPIFUNC( AKRESULT, GetSwitch )(
251  const wchar_t* in_pstrSwitchGroupName, ///< String name of the switch group
252  AkGameObjectID in_GameObj, ///< Associated game object ID
253  AkSwitchStateID& out_rSwitchState ///< ID of the switch
254  );
255 #endif //AK_SUPPORT_WCHAR
256 
257  /// Get the state of a switch group.
258  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the switch group name can not be found
259  /// \sa
260  /// - \ref soundengine_switch
261  AK_EXTERNAPIFUNC( AKRESULT, GetSwitch )(
262  const char* in_pstrSwitchGroupName, ///< String name of the switch group
263  AkGameObjectID in_GameObj, ///< Associated game object ID
264  AkSwitchStateID& out_rSwitchState ///< ID of the switch
265  );
266 
267  /// Get the state of a state group (by IDs).
268  /// \return AK_Success if succeeded
269  /// \sa
270  /// - \ref soundengine_states
271  AK_EXTERNAPIFUNC( AKRESULT, GetState )(
272  AkStateGroupID in_stateGroup, ///< ID of the state group
273  AkStateID& out_rState ///< ID of the state
274  );
275 
276 #ifdef AK_SUPPORT_WCHAR
277  /// Get the state of a state group.
278  /// \return AK_Success if succeeded, or AK_IDNotFound if the state group name can not be found
279  /// \sa
280  /// - \ref soundengine_states
281  AK_EXTERNAPIFUNC( AKRESULT, GetState )(
282  const wchar_t* in_pstrStateGroupName, ///< String name of the state group
283  AkStateID& out_rState ///< ID of the state
284  );
285 #endif //AK_SUPPORT_WCHAR
286 
287  /// Get the state of a state group.
288  /// \return AK_Success if succeeded, or AK_IDNotFound if the state group name can not be found
289  /// \sa
290  /// - \ref soundengine_states
291  AK_EXTERNAPIFUNC( AKRESULT, GetState )(
292  const char* in_pstrStateGroupName, ///< String name of the state group
293  AkStateID& out_rState ///< ID of the state
294  );
295 
296  //@}
297 
298  ////////////////////////////////////////////////////////////////////////
299  /// @name Environments
300  //@{
301 
302  /// Get the environmental ratios used by the specified game object.
303  /// To clear the game object's environments, in_uNumEnvValues must be 0.
304  /// \sa
305  /// - \ref soundengine_environments
306  /// - \ref soundengine_environments_dynamic_aux_bus_routing
307  /// - \ref soundengine_environments_id_vs_string
308  /// \return AK_Success if succeeded, or AK_InvalidParameter if io_ruNumEnvValues is 0 or out_paEnvironmentValues is NULL, or AK_PartialSuccess if more environments exist than io_ruNumEnvValues
309  /// AK_InvalidParameter
310  AK_EXTERNAPIFUNC( AKRESULT, GetGameObjectAuxSendValues )(
311  AkGameObjectID in_gameObjectID, ///< Associated game object ID
312  AkAuxSendValue* out_paAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
313  ///< (it may be NULL if no aux send must be set)
314  AkUInt32& io_ruNumSendValues ///< The number of Auxilliary busses at the pointer's address
315  ///< (it must be 0 if no aux bus is set)
316  );
317 
318  /// Get the environmental dry level to be used for the specified game object
319  /// The control value is a number ranging from 0.0f to 1.0f.
320  /// 0.0f stands for 0% dry, while 1.0f stands for 100% dry.
321  /// \aknote Reducing the dry level does not mean increasing the wet level. \endaknote
322  /// \sa
323  /// - \ref soundengine_environments
324  /// - \ref soundengine_environments_setting_dry_environment
325  /// - \ref soundengine_environments_id_vs_string
326  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
327  AK_EXTERNAPIFUNC( AKRESULT, GetGameObjectDryLevelValue )(
328  AkGameObjectID in_EmitterID, ///< Associated emitter game object ID
329  AkGameObjectID in_ListenerID, ///< Associated listener game object ID
330  AkReal32& out_rfControlValue ///< Dry level control value, ranging from 0.0f to 1.0f
331  ///< (0.0f stands for 0% dry, while 1.0f stands for 100% dry)
332  );
333 
334  /// Get a game object's obstruction and occlusion levels.
335  /// \sa
336  /// - \ref soundengine_obsocc
337  /// - \ref soundengine_environments
338  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered
339  AK_EXTERNAPIFUNC( AKRESULT, GetObjectObstructionAndOcclusion )(
340  AkGameObjectID in_EmitterID, ///< Associated game object ID
341  AkGameObjectID in_ListenerID, ///< Listener object ID
342  AkReal32& out_rfObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
343  AkReal32& out_rfOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
344  );
345 
346  //@}
347 
348  /// Get the list of audio object IDs associated to an event.
349  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
350  /// structure that should be allocated for out_aObjectInfos. \endaknote
351  /// \return AK_Success if succeeded, AK_IDNotFound if the eventID cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
352  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
353  AK_EXTERNAPIFUNC( AKRESULT, QueryAudioObjectIDs )(
354  AkUniqueID in_eventID, ///< Event ID
355  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
356  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
357  );
358 
359 #ifdef AK_SUPPORT_WCHAR
360  /// Get the list of audio object IDs associated to a event name.
361  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
362  /// structure that should be allocated for out_aObjectInfos. \endaknote
363  /// \return AK_Success if succeeded, AK_IDNotFound if the event name cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
364  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
365  AK_EXTERNAPIFUNC( AKRESULT, QueryAudioObjectIDs )(
366  const wchar_t* in_pszEventName, ///< Event name
367  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
368  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
369  );
370 #endif //AK_SUPPORT_WCHAR
371 
372  /// Get the list of audio object IDs associated to an event name.
373  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
374  /// structure that should be allocated for out_aObjectInfos. \endaknote
375  /// \return AK_Success if succeeded, AK_IDNotFound if the event name cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
376  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
377  AK_EXTERNAPIFUNC( AKRESULT, QueryAudioObjectIDs )(
378  const char* in_pszEventName, ///< Event name
379  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
380  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
381  );
382 
383  /// Get positioning information associated to an audio object.
384  /// \return AK_Success if succeeded, AK_IDNotFound if the object ID cannot be found, AK_NotCompatible if the audio object cannot expose positioning
385  AK_EXTERNAPIFUNC( AKRESULT, GetPositioningInfo )(
386  AkUniqueID in_ObjectID, ///< Audio object ID
387  AkPositioningInfo& out_rPositioningInfo ///< Positioning information structure to be filled
388  );
389 
390  /// List passed to GetActiveGameObjects.
391  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
392  /// Being active means that either a sound is playing or pending to be played using this game object.
393  /// The caller is responsible for calling Term() on the list when the list is not required anymore
394  /// \sa
395  /// - GetActiveGameObjects
397 
398  /// Fill the provided list with all the game object IDs that are currently active in the sound engine.
399  /// The function may be used to avoid updating game objects positions that are not required at the moment.
400  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
401  /// Being active means that either a sound is playing or pending to be played using this game object.
402  /// \sa
403  /// - AkGameObjectsList
404  AK_EXTERNAPIFUNC( AKRESULT, GetActiveGameObjects )(
405  AkGameObjectsList& io_GameObjectList ///< returned list of active game objects.
406  );
407 
408  /// Query if the specified game object is currently active.
409  /// Being active means that either a sound is playing or pending to be played using this game object.
410  AK_EXTERNAPIFUNC( bool, GetIsGameObjectActive )(
411  AkGameObjectID in_GameObjId ///< Game object ID
412  );
413 
414  /// Game object and max distance association.
415  /// \sa
416  /// - \ref AkRadiusList
417  struct GameObjDst
418  {
419  /// Default constructor
421  : m_gameObjID( AK_INVALID_GAME_OBJECT )
422  , m_dst( -1.0f )
423  {}
424 
425  /// Easy constructor
426  GameObjDst( AkGameObjectID in_gameObjID, AkReal32 in_dst )
427  : m_gameObjID( in_gameObjID )
428  , m_dst( in_dst )
429  {}
430 
431  AkGameObjectID m_gameObjID; ///< Game object ID
432  AkReal32 m_dst; ///< MaxDistance
433  };
434 
435  /// List passed to GetMaxRadius.
436  /// \sa
437  /// - \ref AK::SoundEngine::Query::GetMaxRadius
439 
440  /// Returns the maximum distance used in attenuations associated to all sounds currently playing.
441  /// This may be used for example by the game to know if some processing need to be performed on the game side, that would not be required
442  /// if the object is out of reach anyway.
443  ///
444  /// Example usage:
445  /// \code
446  /// /*******************************************************/
447  /// AkRadiusList RadLst; //creating the list( array ).
448  /// // Do not reserve any size for the array,
449  /// // the system will reserve the correct size.
450  ///
451  /// GetMaxRadius( RadLst );
452  /// // Use the content of the list
453  /// (...)
454  ///
455  /// RadLst.Term();// the user is responsible to free the memory allocated
456  /// /*******************************************************/
457  /// \endcode
458  ///
459  /// \aknote The returned value is NOT the distance from a listener to an object but
460  /// the maximum attenuation distance of all sounds playing on this object. This is
461  /// not related in any way to the curent 3D position of the object. \endaknote
462  ///
463  /// \return
464  /// - AK_Success if succeeded
465  /// - AK_InsuficientMemory if there was not enough memory
466  ///
467  /// \aknote
468  /// The Scaling factor (if one was specified on the game object) is included in the return value.
469  /// The Scaling factor is not updated once a sound starts playing since it
470  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
471  /// be re-computed for every playback instance, always using the scaling factor available at this time.
472  /// \endaknote
473  ///
474  /// \sa
475  /// - AkRadiusList
476  AK_EXTERNAPIFUNC( AKRESULT, GetMaxRadius )(
477  AkRadiusList & io_RadiusList ///< List that will be filled with AK::SoundEngine::Query::GameObjDst objects.
478  );
479 
480  /// Returns the maximum distance used in attenuations associated to sounds playing using the specified game object.
481  /// This may be used for example by the game to know if some processing need to be performed on the game side, that would not be required
482  /// if the object is out of reach anyway.
483  ///
484  /// \aknote The returned value is NOT the distance from a listener to an object but the maximum attenuation distance of all sounds playing on this object. \endaknote
485  ///
486  /// \return
487  /// - A negative number if the game object specified is not playing.
488  /// - 0, if the game object was only associated to sounds playing using no distance attenuation.
489  /// - A positive number represents the maximum of all the distance attenuations playing on this game object.
490  ///
491  /// \aknote
492  /// The Scaling factor (if one was specified on the game object) is included in the return value.
493  /// The Scaling factor is not updated once a sound starts playing since it
494  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
495  /// be re-computed for every playback instance, always using the scaling factor available at this time.
496  /// \endaknote
497  ///
498  /// \sa
499  /// - \ref AK::SoundEngine::SetScalingFactor
500  AK_EXTERNAPIFUNC( AkReal32, GetMaxRadius )(
501  AkGameObjectID in_GameObjId ///< Game object ID
502  );
503 
504  /// Get the Event ID associated to the specified PlayingID.
505  /// This function does not acquire the main audio lock.
506  ///
507  /// \return AK_INVALID_UNIQUE_ID on failure.
508  AK_EXTERNAPIFUNC( AkUniqueID, GetEventIDFromPlayingID )(
509  AkPlayingID in_playingID ///< Associated PlayingID
510  );
511 
512  /// Get the ObjectID associated to the specified PlayingID.
513  /// This function does not acquire the main audio lock.
514  ///
515  /// \return AK_INVALID_GAME_OBJECT on failure.
516  AK_EXTERNAPIFUNC( AkGameObjectID, GetGameObjectFromPlayingID )(
517  AkPlayingID in_playingID ///< Associated PlayingID
518  );
519 
520  /// Get the list PlayingIDs associated with the given game object.
521  /// This function does not acquire the main audio lock.
522  ///
523  /// \aknote It is possible to call GetPlayingIDsFromGameObject with io_ruNumItems = 0 to get the total size of the
524  /// structure that should be allocated for out_aPlayingIDs. \endaknote
525  /// \return AK_Success if succeeded, AK_InvalidParameter if out_aPlayingIDs is NULL while io_ruNumItems > 0
526  AK_EXTERNAPIFUNC( AKRESULT, GetPlayingIDsFromGameObject )(
527  AkGameObjectID in_GameObjId, ///< Game object ID
528  AkUInt32& io_ruNumIDs, ///< Number of items in array provided / Number of items filled in array
529  AkPlayingID* out_aPlayingIDs ///< Array of AkPlayingID items to fill
530  );
531 
532  /// Get the value of a custom property of integer or boolean type.
533  /// \return AK_PartialSuccess if the object was found but no matching custom property was found on this object. Note that it could mean this value is the default value.
534  AK_EXTERNAPIFUNC( AKRESULT, GetCustomPropertyValue )(
535  AkUniqueID in_ObjectID, ///< Object ID, this is the 32bit ShortID of the AudioFileSource or Sound object found in the .wwu XML file. At runtime it can only be retrieved by the AK_Duration callback when registered with PostEvent(), or by calling Query::QueryAudioObjectIDs() to get all the shortIDs associated with an event.
536  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
537  AkInt32& out_iValue ///< Property Value
538  );
539 
540  /// Get the value of a custom property of real type.
541  /// \return AK_PartialSuccess if the object was found but no matching custom property was found on this object. Note that it could mean this value is the default value.
542  AK_EXTERNAPIFUNC( AKRESULT, GetCustomPropertyValue )(
543  AkUniqueID in_ObjectID, ///< Object ID, this is the 32bit ShortID of the AudioFileSource or Sound object found in the .wwu XML file. At runtime it can only be retrieved by the AK_Duration callback when registered with PostEvent(), or by calling Query::QueryAudioObjectIDs() to get all the shortIDs associated with an event.
544  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
545  AkReal32& out_fValue ///< Property Value
546  );
547 
548  } //namespace Query
549  } //namespace SoundEngine
550 } //namespace AK
551 
552 #endif // _AK_QUERYPARAMS_H_
AkInt32 iDepth
Depth in tree.
AKRESULT __cdecl GetPositioningInfo(AkUniqueID in_ObjectID, AkPositioningInfo &out_rPositioningInfo)
AkLPFType HPFCone
Cone low pass filter value.
AKRESULT __cdecl GetActiveGameObjects(AkGameObjectsList &io_GameObjectList)
GameObjDst(AkGameObjectID in_gameObjID, AkReal32 in_dst)
Easy constructor.
AkUniqueID __cdecl GetEventIDFromPlayingID(AkPlayingID in_playingID)
Object information structure for QueryAudioObjectsIDs.
AkReal32 fCenterPct
Center % [0..1].
The value is the game object specific RTPC.
AKRESULT __cdecl GetGameObjectAuxSendValues(AkGameObjectID in_gameObjectID, AkAuxSendValue *out_paAuxSendValues, AkUInt32 &io_ruNumSendValues)
bool __cdecl GetIsGameObjectActive(AkGameObjectID in_GameObjId)
Audiokinetic namespace.
AKRESULT __cdecl GetListeners(AkGameObjectID in_GameObjectID, AkGameObjectID *out_ListenerObjectIDs, AkUInt32 &oi_uNumListeners)
AKRESULT __cdecl GetObjectObstructionAndOcclusion(AkGameObjectID in_EmitterID, AkGameObjectID in_ListenerID, AkReal32 &out_rfObstructionLevel, AkReal32 &out_rfOcclusionLevel)
Specific implementation of array.
Definition: AkArray.h:189
AkLPFType HPFValueAtMaxDist
High pass filter value at max distance (if any)
The value is the Default RTPC.
GameObjDst()
Default constructor.
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:565
Ak3DSpatializationMode e3DSpatializationMode
Spatialization mode.
Ak3DPositionType e3dPositioningType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
AkUniqueID objID
Object ID.
bool bEnableAttenuation
Attenuation parameter set is active.
AkLPFType LPFValueAtMaxDist
Low pass filter value at max distance (if any)
AKRESULT __cdecl GetGameObjectDryLevelValue(AkGameObjectID in_EmitterID, AkGameObjectID in_ListenerID, AkReal32 &out_rfControlValue)
AkGameObjectID __cdecl GetGameObjectFromPlayingID(AkPlayingID in_playingID)
AkReal32 fOuterAngle
Outer angle.
AkUniqueID parentID
Object ID of the parent.
AKRESULT __cdecl GetListenerSpatialization(AkUInt32 in_uIndex, bool &out_rbSpatialized, AK::SpeakerVolumes::VectorPtr &out_pVolumeOffsets, AkChannelConfig &out_channelConfig)
AkReal32 fInnerAngle
Inner angle.
The value is the playing ID specific RTPC.
AkReal32 fVolAuxGameDefAtMaxDist
Volume wet at maximum distance (if any) (based on the Game defined distance attenuation)
AKRESULT __cdecl GetPlayingIDsFromGameObject(AkGameObjectID in_GameObjId, AkUInt32 &io_ruNumIDs, AkPlayingID *out_aPlayingIDs)
AkReal32 fVolAuxUserDefAtMaxDist
Volume wet at maximum distance (if any) (based on the User defined distance attenuation)
AKRESULT __cdecl GetState(AkStateGroupID in_stateGroup, AkStateID &out_rState)
AKRESULT __cdecl GetPosition(AkGameObjectID in_GameObjectID, AkSoundPosition &out_rPosition)
AkReal32 fMaxDistance
Maximum distance.
AKRESULT __cdecl GetCustomPropertyValue(AkUniqueID in_ObjectID, AkUInt32 in_uPropID, AkInt32 &out_iValue)
AkGameObjectID m_gameObjID
Game object ID.
AkReal32 m_dst
MaxDistance.
AKRESULT __cdecl GetListenerPosition(AkGameObjectID in_uIndex, AkListenerPosition &out_rPosition)
Positioning information obtained from an object.
AkLPFType LPFCone
Cone low pass filter value.
AKRESULT __cdecl QueryAudioObjectIDs(AkUniqueID in_eventID, AkUInt32 &io_ruNumItems, AkObjectInfo *out_aObjectInfos)
AkReal32 * VectorPtr
Volume vector. Access each element with the standard bracket [] operator.
Definition: AkSpeakerVolumes.h:49
bool bHoldEmitterPosAndOrient
Hold emitter position and orientation values when starting playback.
Position and orientation of game objects.
Definition: AkTypes.h:305
AKRESULT __cdecl GetMaxRadius(AkRadiusList &io_RadiusList)
The value is not available for the RTPC specified.
AkArray< GameObjDst, const GameObjDst &, ArrayPoolDefault, 32 > AkRadiusList
AkReal32 fVolDryAtMaxDist
Volume dry at maximum distance.
AkSpeakerPanningType pannerType
Speaker panning type: type of panning logic when object is not 3D spatialized.
The value is the Global RTPC.
bool bUseConeAttenuation
Use the cone attenuation.
AKRESULT __cdecl GetRTPCValue(AkRtpcID in_rtpcID, AkGameObjectID in_gameObjectID, AkPlayingID in_playingID, AkRtpcValue &out_rValue, RTPCValue_type &io_rValueType)
AkReal32 fConeMaxAttenuation
Cone max attenuation.
AKRESULT __cdecl GetSwitch(AkSwitchGroupID in_switchGroup, AkGameObjectID in_gameObjectID, AkSwitchStateID &out_rSwitchState)
AkArray< AkGameObjectID, AkGameObjectID, ArrayPoolDefault, 32 > AkGameObjectsList