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

Was this page helpful?

Need Support?

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

Visit our Support page

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

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

Get started with Wwise