バージョン

menu_open
Wwise SDK 2024.1.1
AkQueryParameters.h
[詳解]
1 /*******************************************************************************
2 The content of this file includes portions of the AUDIOKINETIC Wwise Technology
3 released in source code form as part of the SDK installer package.
4 
5 Commercial License Usage
6 
7 Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
8 may use this file in accordance with the end user license agreement provided
9 with the software or, alternatively, in accordance with the terms contained in a
10 written agreement between you and Audiokinetic Inc.
11 
12 Apache License Usage
13 
14 Alternatively, this file may be used under the Apache License, Version 2.0 (the
15 "Apache License"); you may not use this file except in compliance with the
16 Apache License. You may obtain a copy of the Apache License at
17 http://www.apache.org/licenses/LICENSE-2.0.
18 
19 Unless required by applicable law or agreed to in writing, software distributed
20 under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
21 OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
22 the specific language governing permissions and limitations under the License.
23 
24  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  RTPCValue_Last, ///< End of enum, invalid value.
168  };
169 
170  /// Get the value of a real-time parameter control (by ID)
171  /// 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 (Event).
172  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
173  /// 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.
174  /// \note
175  /// 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.
176  /// 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.
177  /// 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.
178  /// \note
179  /// Contrary to most AK::Query functions, GetRTPCValue does not block. This means that GetRTPCValue does not wait for all previous API to be completed (which may take several milliseconds),
180  /// and instead returns the current value. Therefore calling SetRTPCValue, RenderAudio and then GetRTPCValue might not immediately give the value set by SetRTPCValue.
181  /// \return
182  /// - AK_Success if succeeded
183  /// - AK_IDNotFound if the RTPC does not exist
184  /// - AK_InvalidID if the GameObject does not exist.
185  /// \sa
186  /// - \ref soundengine_rtpc
187  /// - RTPCValue_type
189  AkRtpcID in_rtpcID, ///< ID of the RTPC
190  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
191  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
192  AkRtpcValue& out_rValue, ///< Value returned
193  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.
194  );
195 
196 #ifdef AK_SUPPORT_WCHAR
197 
198  /// Get the value of a real-time parameter control (by ID)
199  /// 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.
200  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
201  /// 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.
202  /// \note
203  /// 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.
204  /// 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.
205  /// 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.
206  /// \note
207  /// Contrary to most AK::Query functions, GetRTPCValue does not block. This means that GetRTPCValue does not wait for all previous API to be completed (which may take several milliseconds),
208  /// and instead returns the current value. Therefore calling SetRTPCValue, RenderAudio and then GetRTPCValue might not immediately give the value set by SetRTPCValue.
209  /// \return
210  /// - AK_Success if succeeded
211  /// - AK_IDNotFound if the RTPC does not exist
212  /// - AK_InvalidID if the GameObject does not exist.
213  /// \sa
214  /// - \ref soundengine_rtpc
215  /// - RTPCValue_type
217  const wchar_t* in_pszRtpcName, ///< String name of the RTPC
218  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
219  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
220  AkRtpcValue& out_rValue, ///< Value returned
221  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. );
222  );
223 
224 #endif //AK_SUPPORT_WCHAR
225 
226  /// Get the value of a real-time parameter control (by ID)
227  /// 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.
228  /// The value requested is determined by RTPCValue_type, in_gameObjectID and in_playingID.
229  /// 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.
230  /// \note
231  /// 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.
232  /// 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.
233  /// 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.
234  /// \note
235  /// Contrary to most AK::Query functions, GetRTPCValue does not block. This means that GetRTPCValue does not wait for all previous API to be completed (which may take several milliseconds),
236  /// and instead returns the current value. Therefore calling SetRTPCValue, RenderAudio and then GetRTPCValue might not immediately give the value set by SetRTPCValue.
237  /// \return
238  /// - AK_Success if succeeded
239  /// - AK_IDNotFound if the RTPC does not exist
240  /// - AK_InvalidID if the GameObject does not exist.
241  /// \sa
242  /// - \ref soundengine_rtpc
243  /// - RTPCValue_type
245  const char* in_pszRtpcName, ///< String name of the RTPC
246  AkGameObjectID in_gameObjectID, ///< Associated game object ID, ignored if io_rValueType is RTPCValue_Global.
247  AkPlayingID in_playingID, ///< Associated playing ID, ignored if io_rValueType is not RTPC_PlayingID.
248  AkRtpcValue& out_rValue, ///< Value returned
249  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. );
250  );
251 
252  /// Get the current Switch value of the specified Switch Group, for a game object
253  /// \note
254  /// Contrary to most AK::Query functions, GetSwitch does not block. This means that GetSwitch does not wait for all previous API to be completed (which may take several milliseconds),
255  /// and instead returns the current value. Therefore calling SetSwitch, RenderAudio and then GetSwitch might not immediately give the value set by SetSwitch.
256  /// \return
257  /// - AK_Success if succeeded
258  /// - AK_IDNotFound if the RTPC does not exist
259  /// - AK_InvalidID if the GameObject does not exist.
260  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
261  /// \sa
262  /// - \ref soundengine_switch
263  /// - \ref AK::SoundEngine::SetSwitch
265  AkSwitchGroupID in_switchGroup, ///< ID of the Switch Group
266  AkGameObjectID in_gameObjectID, ///< Associated game object ID
267  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
268  );
269 
270 #ifdef AK_SUPPORT_WCHAR
271  /// Get the current Switch value of the specified Switch Group, for a game object
272  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
273  /// \sa
274  /// - \ref soundengine_switch
275  /// - \ref AK::SoundEngine::SetSwitch
277  const wchar_t* in_pstrSwitchGroupName, ///< String name of the Switch Group
278  AkGameObjectID in_GameObj, ///< Associated game object ID
279  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
280  );
281 #endif //AK_SUPPORT_WCHAR
282 
283  /// Get the current Switch value of the specified Switch Group, for a game object
284  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered or the Switch Group name cannot be found
285  /// \sa
286  /// - \ref soundengine_switch
287  /// - \ref AK::SoundEngine::SetSwitch
289  const char* in_pstrSwitchGroupName, ///< String name of the Switch Group
290  AkGameObjectID in_GameObj, ///< Associated game object ID
291  AkSwitchStateID& out_rSwitchState ///< ID of the Switch
292  );
293 
294  /// Get the current State value active in the specified State Group.
295  /// \return AK_Success if succeeded
296  /// \sa
297  /// - \ref soundengine_states
298  /// - \ref AK::SoundEngine::SetState
300  AkStateGroupID in_stateGroup, ///< ID of the State Group
301  AkStateID& out_rState ///< ID of the state
302  );
303 
304 #ifdef AK_SUPPORT_WCHAR
305  /// Get the current State value active in the specified State Group.
306  /// \return AK_Success if succeeded
307  /// \sa
308  /// - \ref soundengine_states
309  /// - \ref AK::SoundEngine::SetState
311  const wchar_t* in_pstrStateGroupName, ///< String name of the State Group
312  AkStateID& out_rState ///< ID of the State
313  );
314 #endif //AK_SUPPORT_WCHAR
315 
316  /// Get the current State value active in the specified State Group.
317  /// \return AK_Success if succeeded
318  /// \sa
319  /// - \ref soundengine_states
320  /// - \ref AK::SoundEngine::SetState
322  const char* in_pstrStateGroupName, ///< String name of the State Group
323  AkStateID& out_rState ///< ID of the State
324  );
325 
326  //@}
327 
328  ////////////////////////////////////////////////////////////////////////
329  /// @name Environments
330  //@{
331 
332  /// Get the environmental ratios used by the specified game object.
333  /// \sa
334  /// - \ref soundengine_environments
335  /// - \ref soundengine_environments_dynamic_aux_bus_routing
336  /// - \ref soundengine_environments_id_vs_string
337  /// \return AK_Success if succeeded, or AK_InvalidParameter if io_ruNumSendValues is 0 or out_paEnvironmentValues is NULL, or AK_PartialSuccess if more environments exist than io_ruNumSendValues
339  AkGameObjectID in_gameObjectID, ///< Associated game object ID
340  AkAuxSendValue* out_paAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
341  ///< (it may be NULL if no aux send must be set)
342  AkUInt32& io_ruNumSendValues ///< The number of Auxiliary busses at the pointer's address
343  ///< (it must be 0 if no aux bus is set)
344  );
345 
346  /// Get the environmental dry level to be used for the specified game object
347  /// The control value is a number ranging from 0.0f to 1.0f.
348  /// 0.0f stands for 0% dry, while 1.0f stands for 100% dry.
349  /// \aknote Reducing the dry level does not mean increasing the wet level. \endaknote
350  /// \sa
351  /// - \ref soundengine_environments
352  /// - \ref soundengine_environments_setting_dry_environment
353  /// - \ref soundengine_environments_id_vs_string
354  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
356  AkGameObjectID in_EmitterID, ///< Associated emitter game object ID
357  AkGameObjectID in_ListenerID, ///< Associated listener game object ID
358  AkReal32& out_rfControlValue ///< Dry level control value, ranging from 0.0f to 1.0f
359  ///< (0.0f stands for 0% dry, while 1.0f stands for 100% dry)
360  );
361 
362  /// Get a game object's obstruction and occlusion levels.
363  /// \sa
364  /// - \ref soundengine_obsocc
365  /// - \ref soundengine_environments
366  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered
368  AkGameObjectID in_EmitterID, ///< Associated game object ID
369  AkGameObjectID in_ListenerID, ///< Listener object ID
370  AkReal32& out_rfObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
371  AkReal32& out_rfOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
372  );
373 
374  //@}
375 
376  /// Get the list of audio object IDs associated to an event.
377  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
378  /// structure that should be allocated for out_aObjectInfos. \endaknote
379  /// \return AK_Success if succeeded, AK_IDNotFound if the eventID cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
380  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
382  AkUniqueID in_eventID, ///< Event ID
383  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
384  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
385  );
386 
387 #ifdef AK_SUPPORT_WCHAR
388  /// Get the list of audio object IDs associated to a event name.
389  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
390  /// structure that should be allocated for out_aObjectInfos. \endaknote
391  /// \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
392  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
394  const wchar_t* in_pszEventName, ///< Event name
395  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
396  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
397  );
398 #endif //AK_SUPPORT_WCHAR
399 
400  /// Get the list of audio object IDs associated to an event name.
401  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
402  /// structure that should be allocated for out_aObjectInfos. \endaknote
403  /// \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
404  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
406  const char* in_pszEventName, ///< Event name
407  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
408  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
409  );
410 
411  /// Get positioning information associated to an audio object.
412  /// \return AK_Success if succeeded, AK_IDNotFound if the object ID cannot be found, AK_NotCompatible if the audio object cannot expose positioning
414  AkUniqueID in_ObjectID, ///< Audio object ID
415  AkPositioningInfo& out_rPositioningInfo ///< Positioning information structure to be filled
416  );
417 
418  /// List passed to GetActiveGameObjects.
419  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
420  /// Being active means that either a sound is playing or pending to be played using this game object.
421  /// The caller is responsible for calling Term() on the list when the list is not required anymore
422  /// \sa
423  /// - GetActiveGameObjects
425 
426  /// Fill the provided list with all the game object IDs that are currently active in the sound engine.
427  /// The function may be used to avoid updating game objects positions that are not required at the moment.
428  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
429  /// Being active means that either a sound is playing or pending to be played using this game object.
430  /// \sa
431  /// - AkGameObjectsList
433  AkGameObjectsList& io_GameObjectList ///< returned list of active game objects.
434  );
435 
436  /// Query if the specified game object is currently active.
437  /// Being active means that either a sound is playing or pending to be played using this game object.
439  AkGameObjectID in_GameObjId ///< Game object ID
440  );
441 
442  /// Game object and max distance association.
443  /// \sa
444  /// - \ref AkRadiusList
445  struct GameObjDst
446  {
447  /// Default constructor
450  , m_dst( -1.0f )
451  {}
452 
453  /// Easy constructor
454  GameObjDst( AkGameObjectID in_gameObjID, AkReal32 in_dst )
455  : m_gameObjID( in_gameObjID )
456  , m_dst( in_dst )
457  {}
458 
459  AkGameObjectID m_gameObjID; ///< Game object ID
460  AkReal32 m_dst; ///< MaxDistance
461  };
462 
463  /// List passed to GetMaxRadius.
464  /// \sa
465  /// - \ref AK::SoundEngine::Query::GetMaxRadius
467 
468  /// Returns the maximum distance used in attenuations associated to all sounds currently playing.
469  /// 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
470  /// if the object is out of reach anyway.
471  ///
472  /// Example usage:
473  /// \code
474  /// /*******************************************************/
475  /// AkRadiusList RadLst; //creating the list( array ).
476  /// // Do not reserve any size for the array,
477  /// // the system will reserve the correct size.
478  ///
479  /// GetMaxRadius( RadLst );
480  /// // Use the content of the list
481  /// (...)
482  ///
483  /// RadLst.Term();// the user is responsible to free the memory allocated
484  /// /*******************************************************/
485  /// \endcode
486  ///
487  /// \aknote The returned value is NOT the distance from a listener to an object but
488  /// the maximum attenuation distance of all sounds playing on this object. This is
489  /// not related in any way to the current 3D position of the object. \endaknote
490  ///
491  /// \return
492  /// - AK_Success if succeeded
493  /// - AK_InsufficientMemory if there was not enough memory
494  ///
495  /// \aknote
496  /// The Scaling factor (if one was specified on the game object) is included in the return value.
497  /// The Scaling factor is not updated once a sound starts playing since it
498  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
499  /// be re-computed for every playback instance, always using the scaling factor available at this time.
500  /// \endaknote
501  ///
502  /// \sa
503  /// - AkRadiusList
505  AkRadiusList & io_RadiusList ///< List that will be filled with AK::SoundEngine::Query::GameObjDst objects.
506  );
507 
508  /// Returns the maximum distance used in attenuations associated to sounds playing using the specified game object.
509  /// 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
510  /// if the object is out of reach anyway.
511  ///
512  /// \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
513  ///
514  /// \return
515  /// - A negative number if the game object specified is not playing.
516  /// - 0, if the game object was only associated to sounds playing using no distance attenuation.
517  /// - A positive number represents the maximum of all the distance attenuations playing on this game object.
518  ///
519  /// \aknote
520  /// The Scaling factor (if one was specified on the game object) is included in the return value.
521  /// The Scaling factor is not updated once a sound starts playing since it
522  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
523  /// be re-computed for every playback instance, always using the scaling factor available at this time.
524  /// \endaknote
525  ///
526  /// \sa
527  /// - \ref AK::SoundEngine::SetScalingFactor
529  AkGameObjectID in_GameObjId ///< Game object ID
530  );
531 
532  /// Get the Event ID associated to the specified PlayingID.
533  /// This function does not acquire the main audio lock.
534  ///
535  /// \return AK_INVALID_UNIQUE_ID on failure.
537  AkPlayingID in_playingID ///< Associated PlayingID
538  );
539 
540  /// Get the ObjectID associated to the specified PlayingID.
541  /// This function does not acquire the main audio lock.
542  ///
543  /// \return AK_INVALID_GAME_OBJECT on failure.
545  AkPlayingID in_playingID ///< Associated PlayingID
546  );
547 
548  /// Get the list PlayingIDs associated with the given game object.
549  /// This function does not acquire the main audio lock.
550  ///
551  /// \aknote It is possible to call GetPlayingIDsFromGameObject with io_ruNumItems = 0 to get the total size of the
552  /// structure that should be allocated for out_aPlayingIDs. \endaknote
553  /// \return AK_Success if succeeded, AK_InvalidParameter if out_aPlayingIDs is NULL while io_ruNumItems > 0
555  AkGameObjectID in_GameObjId, ///< Game object ID
556  AkUInt32& io_ruNumIDs, ///< Number of items in array provided / Number of items filled in array
557  AkPlayingID* out_aPlayingIDs ///< Array of AkPlayingID items to fill
558  );
559 
560  /// Get the value of a custom property of integer or boolean type.
561  /// \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.
563  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.
564  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
565  AkInt32& out_iValue ///< Property Value
566  );
567 
568  /// Get the value of a custom property of real type.
569  /// \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.
571  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.
572  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
573  AkReal32& out_fValue ///< Property Value
574  );
575 
576  } //namespace Query
577  } //namespace SoundEngine
578 } //namespace AK
579 
580 #endif // _AK_QUERYPARAMS_H_
AkUInt32 AkStateGroupID
State group ID
Definition: AkTypes.h:54
AKSOUNDENGINE_API AKRESULT GetSwitch(AkSwitchGroupID in_switchGroup, AkGameObjectID in_gameObjectID, AkSwitchStateID &out_rSwitchState)
bool bEnableAttenuation
Attenuation parameter set is active.
@ RTPCValue_Last
End of enum, invalid value.
AkUniqueID parentID
Object ID of the parent
GameObjDst(AkGameObjectID in_gameObjID, AkReal32 in_dst)
Easy constructor
Definition of data structures for AkAudioObject
Auxiliary bus sends information per game object per given auxiliary bus.
Definition: AkTypes.h:885
@ 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:73
AkUInt64 AkGameObjectID
Game object ID
Definition: AkTypes.h:60
#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:134
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:61
AkReal32 fInnerAngle
Inner angle
Specific implementation of array
Definition: AkArray.h:260
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:429
@ 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:52
bool bHoldEmitterPosAndOrient
Hold emitter position and orientation values when starting playback.
Ak3DSpatializationMode
3D spatialization mode.
Definition: AkTypes.h:1160
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:53
AkGameObjectID m_gameObjID
Game object ID
Object information structure for QueryAudioObjectsIDs
AkUInt32 AkSwitchStateID
Switch ID
Definition: AkTypes.h:72
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:96
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:1123
AkLPFType LPFValueAtMaxDist
Low pass filter value at max distance (if any)
AkReal32 AkRtpcValue
Real time parameter control value
Definition: AkTypes.h:74
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:71
Ak3DPositionType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
Definition: AkTypes.h:1133
AkUniqueID objID
Object ID
AkUInt32 AkPlayingID
Playing ID
Definition: AkTypes.h:55
@ 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)

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう