Version
menu_open
link
Wwise SDK 2018.1.11
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  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 
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 bUseAttenuation; ///< Use attenuation parameter set
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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_UnknownObject if the event contains an unknown audio object,
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_UnknownObject if the event contains an unknown audio object,
366  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
368  const wchar_t* in_pszEventName, ///< Event name
369  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
370  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
371  );
372 #endif //AK_SUPPORT_WCHAR
373 
374  /// Get the list of audio object IDs associated to an event name.
375  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
376  /// structure that should be allocated for out_aObjectInfos. \endaknote
377  /// \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
378  /// or AK_UnknownObject if the event contains an unknown audio object,
379  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
381  const char* in_pszEventName, ///< Event name
382  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
383  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
384  );
385 
386  /// Get positioning information associated to an audio object.
387  /// \return AK_Success if succeeded, AK_IDNotFound if the object ID cannot be found, AK_NotCompatible if the audio object cannot expose positioning
389  AkUniqueID in_ObjectID, ///< Audio object ID
390  AkPositioningInfo& out_rPositioningInfo ///< Positioning information structure to be filled
391  );
392 
393  /// List passed to GetActiveGameObjects.
394  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
395  /// Being active means that either a sound is playing or pending to be played using this game object.
396  /// The caller is responsible for calling Term() on the list when the list is not required anymore
397  /// \sa
398  /// - GetActiveGameObjects
400 
401  /// Fill the provided list with all the game object IDs that are currently active in the sound engine.
402  /// The function may be used to avoid updating game objects positions that are not required at the moment.
403  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
404  /// Being active means that either a sound is playing or pending to be played using this game object.
405  /// \sa
406  /// - AkGameObjectsList
408  AkGameObjectsList& io_GameObjectList ///< returned list of active game objects.
409  );
410 
411  /// Query if the specified game object is currently active.
412  /// Being active means that either a sound is playing or pending to be played using this game object.
414  AkGameObjectID in_GameObjId ///< Game object ID
415  );
416 
417  /// Game object and max distance association.
418  /// \sa
419  /// - \ref AkRadiusList
420  struct GameObjDst
421  {
422  /// Default constructor
425  , m_dst( -1.0f )
426  {}
427 
428  /// Easy constructor
429  GameObjDst( AkGameObjectID in_gameObjID, AkReal32 in_dst )
430  : m_gameObjID( in_gameObjID )
431  , m_dst( in_dst )
432  {}
433 
434  AkGameObjectID m_gameObjID; ///< Game object ID
435  AkReal32 m_dst; ///< MaxDistance
436  };
437 
438  /// List passed to GetMaxRadius.
439  /// \sa
440  /// - \ref AK::SoundEngine::Query::GetMaxRadius
442 
443  /// Returns the maximum distance used in attenuations associated to all sounds currently playing.
444  /// 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
445  /// if the object is out of reach anyway.
446  ///
447  /// Example usage:
448  /// \code
449  /// /*******************************************************/
450  /// AkRadiusList RadLst; //creating the list( array ).
451  /// // Do not reserve any size for the array,
452  /// // the system will reserve the correct size.
453  ///
454  /// GetMaxRadius( RadLst );
455  /// // Use the content of the list
456  /// (...)
457  ///
458  /// RadLst.Term();// the user is responsible to free the memory allocated
459  /// /*******************************************************/
460  /// \endcode
461  ///
462  /// \aknote The returned value is NOT the distance from a listener to an object but
463  /// the maximum attenuation distance of all sounds playing on this object. This is
464  /// not related in any way to the curent 3D position of the object. \endaknote
465  ///
466  /// \return
467  /// - AK_Success if succeeded
468  /// - AK_InsuficientMemory if there was not enough memory
469  ///
470  /// \aknote
471  /// The Scaling factor (if one was specified on the game object) is included in the return value.
472  /// The Scaling factor is not updated once a sound starts playing since it
473  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
474  /// be re-computed for every playback instance, always using the scaling factor available at this time.
475  /// \endaknote
476  ///
477  /// \sa
478  /// - AkRadiusList
480  AkRadiusList & io_RadiusList ///< List that will be filled with AK::SoundEngine::Query::GameObjDst objects.
481  );
482 
483  /// Returns the maximum distance used in attenuations associated to sounds playing using the specified game object.
484  /// 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
485  /// if the object is out of reach anyway.
486  ///
487  /// \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
488  ///
489  /// \return
490  /// - A negative number if the game object specified is not playing.
491  /// - 0, if the game object was only associated to sounds playing using no distance attenuation.
492  /// - A positive number represents the maximum of all the distance attenuations playing on this game object.
493  ///
494  /// \aknote
495  /// The Scaling factor (if one was specified on the game object) is included in the return value.
496  /// The Scaling factor is not updated once a sound starts playing since it
497  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
498  /// be re-computed for every playback instance, always using the scaling factor available at this time.
499  /// \endaknote
500  ///
501  /// \sa
502  /// - \ref AK::SoundEngine::SetScalingFactor
504  AkGameObjectID in_GameObjId ///< Game object ID
505  );
506 
507  /// Get the Event ID associated to the specified PlayingID.
508  /// This function does not acquire the main audio lock.
509  ///
510  /// \return AK_INVALID_UNIQUE_ID on failure.
512  AkPlayingID in_playingID ///< Associated PlayingID
513  );
514 
515  /// Get the ObjectID associated to the specified PlayingID.
516  /// This function does not acquire the main audio lock.
517  ///
518  /// \return AK_INVALID_GAME_OBJECT on failure.
520  AkPlayingID in_playingID ///< Associated PlayingID
521  );
522 
523  /// Get the list PlayingIDs associated with the given game object.
524  /// This function does not acquire the main audio lock.
525  ///
526  /// \aknote It is possible to call GetPlayingIDsFromGameObject with io_ruNumItems = 0 to get the total size of the
527  /// structure that should be allocated for out_aPlayingIDs. \endaknote
528  /// \return AK_Success if succeeded, AK_InvalidParameter if out_aPlayingIDs is NULL while io_ruNumItems > 0
530  AkGameObjectID in_GameObjId, ///< Game object ID
531  AkUInt32& io_ruNumIDs, ///< Number of items in array provided / Number of items filled in array
532  AkPlayingID* out_aPlayingIDs ///< Array of AkPlayingID items to fill
533  );
534 
535  /// Get the value of a custom property of integer or boolean type.
536  /// \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.
538  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.
539  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
540  AkInt32& out_iValue ///< Property Value
541  );
542 
543  /// Get the value of a custom property of real type.
544  /// \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.
546  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.
547  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
548  AkReal32& out_fValue ///< Property Value
549  );
550 
551  } //namespace Query
552  } //namespace SoundEngine
553 } //namespace AK
554 
555 #endif // _AK_QUERYPARAMS_H_
AkInt32 iDepth
Depth in tree.
AKRESULT __cdecl GetPositioningInfo(AkUniqueID in_ObjectID, AkPositioningInfo &out_rPositioningInfo)
AkUInt32 AkStateID
State ID.
Definition: AkTypes.h:63
AkLPFType HPFCone
Cone low pass filter value.
AKRESULT __cdecl GetActiveGameObjects(AkGameObjectsList &io_GameObjectList)
bool bUseAttenuation
Use attenuation parameter set.
GameObjDst(AkGameObjectID in_gameObjID, AkReal32 in_dst)
Easy constructor.
AkUniqueID __cdecl GetEventIDFromPlayingID(AkPlayingID in_playingID)
AkUInt32 AkStateGroupID
State group ID.
Definition: AkTypes.h:64
Object information structure for QueryAudioObjectsIDs.
AKRESULT
Standard function call result.
Definition: AkTypes.h:126
AkUInt32 AkRtpcID
Real time parameter control ID.
Definition: AkTypes.h:83
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:152
#define AK_EXTERNAPIFUNC(__TYPE__, __NAME__)
AkLPFType HPFValueAtMaxDist
High pass filter value at max distance (if any)
The value is the Default RTPC.
GameObjDst()
Default constructor.
AkReal32 AkRtpcValue
Real time parameter control value.
Definition: AkTypes.h:84
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:594
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.
AkLPFType LPFValueAtMaxDist
Low pass filter value at max distance (if any)
AkUInt32 AkUniqueID
Unique 32-bit ID.
Definition: AkTypes.h:62
AKRESULT __cdecl GetGameObjectDryLevelValue(AkGameObjectID in_EmitterID, AkGameObjectID in_ListenerID, AkReal32 &out_rfControlValue)
AkGameObjectID __cdecl GetGameObjectFromPlayingID(AkPlayingID in_playingID)
AkReal32 fOuterAngle
Outer angle.
int32_t AkInt32
Signed 32-bit integer.
Definition: AkTypes.h:92
AkUniqueID parentID
Object ID of the parent.
AKRESULT __cdecl GetListenerSpatialization(AkUInt32 in_uIndex, bool &out_rbSpatialized, AK::SpeakerVolumes::VectorPtr &out_pVolumeOffsets, AkChannelConfig &out_channelConfig)
AkUInt64 AkGameObjectID
Game object ID.
Definition: AkTypes.h:70
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)
AkReal32 AkLPFType
Low-pass filter type.
Definition: AkTypes.h:71
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.
Ak3DPositionType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
Definition: AkTypes.h:778
AkUInt32 AkPlayingID
Playing ID.
Definition: AkTypes.h:65
AkUInt32 AkSwitchStateID
Switch ID.
Definition: AkTypes.h:82
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:334
AKRESULT __cdecl GetMaxRadius(AkRadiusList &io_RadiusList)
The value is not available for the RTPC specified.
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:98
AkArray< GameObjDst, const GameObjDst &, ArrayPoolDefault, 32 > AkRadiusList
uint32_t AkUInt32
Unsigned 32-bit integer.
Definition: AkTypes.h:79
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.
float AkReal32
32-bit floating point
Definition: AkTypes.h:97
AkSpeakerPanningType
Speaker panning type: type of panning logic when object is not 3D spatialized (i.e....
Definition: AkTypes.h:770
bool bUseConeAttenuation
Use the cone attenuation.
Ak3DSpatializationMode
3D spatialization mode.
Definition: AkTypes.h:794
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
AkUInt32 AkSwitchGroupID
Switch group ID.
Definition: AkTypes.h:81

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