Version
menu_open
link
Wwise SDK 2022.1.12
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) 2024 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 
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.
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
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_uListenerID, ///< Listener game object ID.
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  AkGameObjectID in_uListenerID, ///< Listener game object ID.
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 current Switch value of the specified Switch Group, for a game object
237  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
238  /// \sa
239  /// - \ref soundengine_switch
240  /// - \ref AK::SoundEngine::SetSwitch
242  AkSwitchGroupID in_switchGroup, ///< ID of the Switch Group
243  AkGameObjectID in_gameObjectID, ///< Associated game object ID
244  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
245  );
246 
247 #ifdef AK_SUPPORT_WCHAR
248  /// Get the current Switch value of the specified Switch Group, for a game object
249  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
250  /// \sa
251  /// - \ref soundengine_switch
252  /// - \ref AK::SoundEngine::SetSwitch
254  const wchar_t* in_pstrSwitchGroupName, ///< String name of the Switch Group
255  AkGameObjectID in_GameObj, ///< Associated game object ID
256  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
257  );
258 #endif //AK_SUPPORT_WCHAR
259 
260  /// Get the current Switch value of the specified Switch Group, for a game object
261  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
262  /// \sa
263  /// - \ref soundengine_switch
264  /// - \ref AK::SoundEngine::SetSwitch
266  const char* in_pstrSwitchGroupName, ///< String name of the Switch Group
267  AkGameObjectID in_GameObj, ///< Associated game object ID
268  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
269  );
270 
271  /// Get the current State value active in the specified State Group.
272  /// \return AK_Success if succeeded
273  /// \sa
274  /// - \ref soundengine_states
275  /// - \ref AK::SoundEngine::SetState
277  AkStateGroupID in_stateGroup, ///< ID of the State Group
278  AkStateID& out_rState ///< ID of the state
279  );
280 
281 #ifdef AK_SUPPORT_WCHAR
282  /// Get the current State value active in the specified State Group.
283  /// \return AK_Success if succeeded
284  /// \sa
285  /// - \ref soundengine_states
286  /// - \ref AK::SoundEngine::SetState
288  const wchar_t* in_pstrStateGroupName, ///< String name of the State Group
289  AkStateID& out_rState ///< ID of the State
290  );
291 #endif //AK_SUPPORT_WCHAR
292 
293  /// Get the current State value active in the specified State Group.
294  /// \return AK_Success if succeeded
295  /// \sa
296  /// - \ref soundengine_states
297  /// - \ref AK::SoundEngine::SetState
299  const char* in_pstrStateGroupName, ///< String name of the State Group
300  AkStateID& out_rState ///< ID of the State
301  );
302 
303  //@}
304 
305  ////////////////////////////////////////////////////////////////////////
306  /// @name Environments
307  //@{
308 
309  /// Get the environmental ratios used by the specified game object.
310  /// To clear the game object's environments, in_uNumEnvValues must be 0.
311  /// \sa
312  /// - \ref soundengine_environments
313  /// - \ref soundengine_environments_dynamic_aux_bus_routing
314  /// - \ref soundengine_environments_id_vs_string
315  /// \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
316  /// AK_InvalidParameter
318  AkGameObjectID in_gameObjectID, ///< Associated game object ID
319  AkAuxSendValue* out_paAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
320  ///< (it may be NULL if no aux send must be set)
321  AkUInt32& io_ruNumSendValues ///< The number of Auxilliary busses at the pointer's address
322  ///< (it must be 0 if no aux bus is set)
323  );
324 
325  /// Get the environmental dry level to be used for the specified game object
326  /// The control value is a number ranging from 0.0f to 1.0f.
327  /// 0.0f stands for 0% dry, while 1.0f stands for 100% dry.
328  /// \aknote Reducing the dry level does not mean increasing the wet level. \endaknote
329  /// \sa
330  /// - \ref soundengine_environments
331  /// - \ref soundengine_environments_setting_dry_environment
332  /// - \ref soundengine_environments_id_vs_string
333  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
335  AkGameObjectID in_EmitterID, ///< Associated emitter game object ID
336  AkGameObjectID in_ListenerID, ///< Associated listener game object ID
337  AkReal32& out_rfControlValue ///< Dry level control value, ranging from 0.0f to 1.0f
338  ///< (0.0f stands for 0% dry, while 1.0f stands for 100% dry)
339  );
340 
341  /// Get a game object's obstruction and occlusion levels.
342  /// \sa
343  /// - \ref soundengine_obsocc
344  /// - \ref soundengine_environments
345  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered
347  AkGameObjectID in_EmitterID, ///< Associated game object ID
348  AkGameObjectID in_ListenerID, ///< Listener object ID
349  AkReal32& out_rfObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
350  AkReal32& out_rfOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
351  );
352 
353  //@}
354 
355  /// Get the list of audio object IDs associated to an event.
356  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
357  /// structure that should be allocated for out_aObjectInfos. \endaknote
358  /// \return AK_Success if succeeded, AK_IDNotFound if the eventID cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
359  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
361  AkUniqueID in_eventID, ///< Event ID
362  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
363  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
364  );
365 
366 #ifdef AK_SUPPORT_WCHAR
367  /// Get the list of audio object IDs associated to a event name.
368  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
369  /// structure that should be allocated for out_aObjectInfos. \endaknote
370  /// \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
371  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
373  const wchar_t* in_pszEventName, ///< Event name
374  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
375  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
376  );
377 #endif //AK_SUPPORT_WCHAR
378 
379  /// Get the list of audio object IDs associated to an event name.
380  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
381  /// structure that should be allocated for out_aObjectInfos. \endaknote
382  /// \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
383  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
385  const char* in_pszEventName, ///< Event name
386  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
387  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
388  );
389 
390  /// Get positioning information associated to an audio object.
391  /// \return AK_Success if succeeded, AK_IDNotFound if the object ID cannot be found, AK_NotCompatible if the audio object cannot expose positioning
393  AkUniqueID in_ObjectID, ///< Audio object ID
394  AkPositioningInfo& out_rPositioningInfo ///< Positioning information structure to be filled
395  );
396 
397  /// List passed to GetActiveGameObjects.
398  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
399  /// Being active means that either a sound is playing or pending to be played using this game object.
400  /// The caller is responsible for calling Term() on the list when the list is not required anymore
401  /// \sa
402  /// - GetActiveGameObjects
404 
405  /// Fill the provided list with all the game object IDs that are currently active in the sound engine.
406  /// The function may be used to avoid updating game objects positions that are not required at the moment.
407  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
408  /// Being active means that either a sound is playing or pending to be played using this game object.
409  /// \sa
410  /// - AkGameObjectsList
412  AkGameObjectsList& io_GameObjectList ///< returned list of active game objects.
413  );
414 
415  /// Query if the specified game object is currently active.
416  /// Being active means that either a sound is playing or pending to be played using this game object.
418  AkGameObjectID in_GameObjId ///< Game object ID
419  );
420 
421  /// Game object and max distance association.
422  /// \sa
423  /// - \ref AkRadiusList
424  struct GameObjDst
425  {
426  /// Default constructor
429  , m_dst( -1.0f )
430  {}
431 
432  /// Easy constructor
433  GameObjDst( AkGameObjectID in_gameObjID, AkReal32 in_dst )
434  : m_gameObjID( in_gameObjID )
435  , m_dst( in_dst )
436  {}
437 
438  AkGameObjectID m_gameObjID; ///< Game object ID
439  AkReal32 m_dst; ///< MaxDistance
440  };
441 
442  /// List passed to GetMaxRadius.
443  /// \sa
444  /// - \ref AK::SoundEngine::Query::GetMaxRadius
446 
447  /// Returns the maximum distance used in attenuations associated to all sounds currently playing.
448  /// 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
449  /// if the object is out of reach anyway.
450  ///
451  /// Example usage:
452  /// \code
453  /// /*******************************************************/
454  /// AkRadiusList RadLst; //creating the list( array ).
455  /// // Do not reserve any size for the array,
456  /// // the system will reserve the correct size.
457  ///
458  /// GetMaxRadius( RadLst );
459  /// // Use the content of the list
460  /// (...)
461  ///
462  /// RadLst.Term();// the user is responsible to free the memory allocated
463  /// /*******************************************************/
464  /// \endcode
465  ///
466  /// \aknote The returned value is NOT the distance from a listener to an object but
467  /// the maximum attenuation distance of all sounds playing on this object. This is
468  /// not related in any way to the curent 3D position of the object. \endaknote
469  ///
470  /// \return
471  /// - AK_Success if succeeded
472  /// - AK_InsuficientMemory if there was not enough memory
473  ///
474  /// \aknote
475  /// The Scaling factor (if one was specified on the game object) is included in the return value.
476  /// The Scaling factor is not updated once a sound starts playing since it
477  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
478  /// be re-computed for every playback instance, always using the scaling factor available at this time.
479  /// \endaknote
480  ///
481  /// \sa
482  /// - AkRadiusList
484  AkRadiusList & io_RadiusList ///< List that will be filled with AK::SoundEngine::Query::GameObjDst objects.
485  );
486 
487  /// Returns the maximum distance used in attenuations associated to sounds playing using the specified game object.
488  /// 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
489  /// if the object is out of reach anyway.
490  ///
491  /// \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
492  ///
493  /// \return
494  /// - A negative number if the game object specified is not playing.
495  /// - 0, if the game object was only associated to sounds playing using no distance attenuation.
496  /// - A positive number represents the maximum of all the distance attenuations playing on this game object.
497  ///
498  /// \aknote
499  /// The Scaling factor (if one was specified on the game object) is included in the return value.
500  /// The Scaling factor is not updated once a sound starts playing since it
501  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
502  /// be re-computed for every playback instance, always using the scaling factor available at this time.
503  /// \endaknote
504  ///
505  /// \sa
506  /// - \ref AK::SoundEngine::SetScalingFactor
508  AkGameObjectID in_GameObjId ///< Game object ID
509  );
510 
511  /// Get the Event ID associated to the specified PlayingID.
512  /// This function does not acquire the main audio lock.
513  ///
514  /// \return AK_INVALID_UNIQUE_ID on failure.
516  AkPlayingID in_playingID ///< Associated PlayingID
517  );
518 
519  /// Get the ObjectID associated to the specified PlayingID.
520  /// This function does not acquire the main audio lock.
521  ///
522  /// \return AK_INVALID_GAME_OBJECT on failure.
524  AkPlayingID in_playingID ///< Associated PlayingID
525  );
526 
527  /// Get the list PlayingIDs associated with the given game object.
528  /// This function does not acquire the main audio lock.
529  ///
530  /// \aknote It is possible to call GetPlayingIDsFromGameObject with io_ruNumItems = 0 to get the total size of the
531  /// structure that should be allocated for out_aPlayingIDs. \endaknote
532  /// \return AK_Success if succeeded, AK_InvalidParameter if out_aPlayingIDs is NULL while io_ruNumItems > 0
534  AkGameObjectID in_GameObjId, ///< Game object ID
535  AkUInt32& io_ruNumIDs, ///< Number of items in array provided / Number of items filled in array
536  AkPlayingID* out_aPlayingIDs ///< Array of AkPlayingID items to fill
537  );
538 
539  /// Get the value of a custom property of integer or boolean type.
540  /// \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  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.
543  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
544  AkInt32& out_iValue ///< Property Value
545  );
546 
547  /// Get the value of a custom property of real type.
548  /// \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.
550  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.
551  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
552  AkReal32& out_fValue ///< Property Value
553  );
554 
555  } //namespace Query
556  } //namespace SoundEngine
557 } //namespace AK
558 
559 #endif // _AK_QUERYPARAMS_H_
AkUInt32 AkStateGroupID
State group ID.
Definition: AkTypes.h:122
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:923
@ 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)
AKSOUNDENGINE_API AKRESULT GetListenerPosition(AkGameObjectID in_uListenerID, AkListenerPosition &out_rPosition)
@ RTPCValue_Global
The value is the Global RTPC.
AkUInt32 AkRtpcID
Real time parameter control ID.
Definition: AkTypes.h:141
AkUInt64 AkGameObjectID
Game object ID.
Definition: AkTypes.h:128
#define AK_EXTERNAPIFUNC(_type, _name)
AkReal32 fVolAuxGameDefAtMaxDist
Volume wet at maximum distance (if any) (based on the Game defined distance attenuation)
AKSOUNDENGINE_API AKRESULT GetListenerSpatialization(AkGameObjectID in_uListenerID, bool &out_rbSpatialized, AK::SpeakerVolumes::VectorPtr &out_pVolumeOffsets, AkChannelConfig &out_channelConfig)
AKRESULT
Standard function call result.
Definition: AkTypes.h:199
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:129
AkReal32 fInnerAngle
Inner angle.
Specific implementation of array.
Definition: AkArray.h:241
AkReal32 fCenterPct
Center % [0..1].
float AkReal32
32-bit floating point
int32_t AkInt32
Signed 32-bit integer.
Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
Definition: AkTypes.h:474
@ 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.
AkUInt32 AkUniqueID
Unique 32-bit ID.
Definition: AkTypes.h:120
bool bHoldEmitterPosAndOrient
Hold emitter position and orientation values when starting playback.
Ak3DSpatializationMode
3D spatialization mode.
Definition: AkTypes.h:1189
AKSOUNDENGINE_API AKRESULT GetListeners(AkGameObjectID in_GameObjectID, AkGameObjectID *out_ListenerObjectIDs, AkUInt32 &oi_uNumListeners)
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:121
AkGameObjectID m_gameObjID
Game object ID.
Object information structure for QueryAudioObjectsIDs.
AkUInt32 AkSwitchStateID
Switch ID.
Definition: AkTypes.h:140
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:162
uint32_t AkUInt32
Unsigned 32-bit integer.
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:1155
AkLPFType LPFValueAtMaxDist
Low pass filter value at max distance (if any)
AkReal32 AkRtpcValue
Real time parameter control value.
Definition: AkTypes.h:142
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:139
Ak3DPositionType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
Definition: AkTypes.h:1164
AkUniqueID objID
Object ID.
AkUInt32 AkPlayingID
Playing ID.
Definition: AkTypes.h:123
@ 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