バージョン
menu_open
link
Wwise SDK 2023.1.2
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  };
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  /// \sa
311  /// - \ref soundengine_environments
312  /// - \ref soundengine_environments_dynamic_aux_bus_routing
313  /// - \ref soundengine_environments_id_vs_string
314  /// \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
316  AkGameObjectID in_gameObjectID, ///< Associated game object ID
317  AkAuxSendValue* out_paAuxSendValues, ///< Variable-size array of AkAuxSendValue structures
318  ///< (it may be NULL if no aux send must be set)
319  AkUInt32& io_ruNumSendValues ///< The number of Auxilliary busses at the pointer's address
320  ///< (it must be 0 if no aux bus is set)
321  );
322 
323  /// Get the environmental dry level to be used for the specified game object
324  /// The control value is a number ranging from 0.0f to 1.0f.
325  /// 0.0f stands for 0% dry, while 1.0f stands for 100% dry.
326  /// \aknote Reducing the dry level does not mean increasing the wet level. \endaknote
327  /// \sa
328  /// - \ref soundengine_environments
329  /// - \ref soundengine_environments_setting_dry_environment
330  /// - \ref soundengine_environments_id_vs_string
331  /// \return AK_Success if succeeded, or AK_IDNotFound if the game object was not registered
333  AkGameObjectID in_EmitterID, ///< Associated emitter game object ID
334  AkGameObjectID in_ListenerID, ///< Associated listener game object ID
335  AkReal32& out_rfControlValue ///< Dry level control value, ranging from 0.0f to 1.0f
336  ///< (0.0f stands for 0% dry, while 1.0f stands for 100% dry)
337  );
338 
339  /// Get a game object's obstruction and occlusion levels.
340  /// \sa
341  /// - \ref soundengine_obsocc
342  /// - \ref soundengine_environments
343  /// \return AK_Success if succeeded, AK_IDNotFound if the game object was not registered
345  AkGameObjectID in_EmitterID, ///< Associated game object ID
346  AkGameObjectID in_ListenerID, ///< Listener object ID
347  AkReal32& out_rfObstructionLevel, ///< ObstructionLevel: [0.0f..1.0f]
348  AkReal32& out_rfOcclusionLevel ///< OcclusionLevel: [0.0f..1.0f]
349  );
350 
351  //@}
352 
353  /// Get the list of audio object IDs associated to an event.
354  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
355  /// structure that should be allocated for out_aObjectInfos. \endaknote
356  /// \return AK_Success if succeeded, AK_IDNotFound if the eventID cannot be found, AK_InvalidParameter if out_aObjectInfos is NULL while io_ruNumItems > 0
357  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
359  AkUniqueID in_eventID, ///< Event ID
360  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
361  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
362  );
363 
364 #ifdef AK_SUPPORT_WCHAR
365  /// Get the list of audio object IDs associated to a event name.
366  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
367  /// structure that should be allocated for out_aObjectInfos. \endaknote
368  /// \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
369  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
371  const wchar_t* in_pszEventName, ///< Event name
372  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
373  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
374  );
375 #endif //AK_SUPPORT_WCHAR
376 
377  /// Get the list of audio object IDs associated to an event name.
378  /// \aknote It is possible to call QueryAudioObjectIDs with io_ruNumItems = 0 to get the total size of the
379  /// structure that should be allocated for out_aObjectInfos. \endaknote
380  /// \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
381  /// or AK_PartialSuccess if io_ruNumItems was set to 0 to query the number of available items.
383  const char* in_pszEventName, ///< Event name
384  AkUInt32& io_ruNumItems, ///< Number of items in array provided / Number of items filled in array
385  AkObjectInfo* out_aObjectInfos ///< Array of AkObjectInfo items to fill
386  );
387 
388  /// Get positioning information associated to an audio object.
389  /// \return AK_Success if succeeded, AK_IDNotFound if the object ID cannot be found, AK_NotCompatible if the audio object cannot expose positioning
391  AkUniqueID in_ObjectID, ///< Audio object ID
392  AkPositioningInfo& out_rPositioningInfo ///< Positioning information structure to be filled
393  );
394 
395  /// List passed to GetActiveGameObjects.
396  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
397  /// Being active means that either a sound is playing or pending to be played using this game object.
398  /// The caller is responsible for calling Term() on the list when the list is not required anymore
399  /// \sa
400  /// - GetActiveGameObjects
402 
403  /// Fill the provided list with all the game object IDs that are currently active in the sound engine.
404  /// The function may be used to avoid updating game objects positions that are not required at the moment.
405  /// After calling this function, the list will contain the list of all game objects that are currently active in the sound engine.
406  /// Being active means that either a sound is playing or pending to be played using this game object.
407  /// \sa
408  /// - AkGameObjectsList
410  AkGameObjectsList& io_GameObjectList ///< returned list of active game objects.
411  );
412 
413  /// Query if the specified game object is currently active.
414  /// Being active means that either a sound is playing or pending to be played using this game object.
416  AkGameObjectID in_GameObjId ///< Game object ID
417  );
418 
419  /// Game object and max distance association.
420  /// \sa
421  /// - \ref AkRadiusList
422  struct GameObjDst
423  {
424  /// Default constructor
427  , m_dst( -1.0f )
428  {}
429 
430  /// Easy constructor
431  GameObjDst( AkGameObjectID in_gameObjID, AkReal32 in_dst )
432  : m_gameObjID( in_gameObjID )
433  , m_dst( in_dst )
434  {}
435 
436  AkGameObjectID m_gameObjID; ///< Game object ID
437  AkReal32 m_dst; ///< MaxDistance
438  };
439 
440  /// List passed to GetMaxRadius.
441  /// \sa
442  /// - \ref AK::SoundEngine::Query::GetMaxRadius
444 
445  /// Returns the maximum distance used in attenuations associated to all sounds currently playing.
446  /// 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
447  /// if the object is out of reach anyway.
448  ///
449  /// Example usage:
450  /// \code
451  /// /*******************************************************/
452  /// AkRadiusList RadLst; //creating the list( array ).
453  /// // Do not reserve any size for the array,
454  /// // the system will reserve the correct size.
455  ///
456  /// GetMaxRadius( RadLst );
457  /// // Use the content of the list
458  /// (...)
459  ///
460  /// RadLst.Term();// the user is responsible to free the memory allocated
461  /// /*******************************************************/
462  /// \endcode
463  ///
464  /// \aknote The returned value is NOT the distance from a listener to an object but
465  /// the maximum attenuation distance of all sounds playing on this object. This is
466  /// not related in any way to the curent 3D position of the object. \endaknote
467  ///
468  /// \return
469  /// - AK_Success if succeeded
470  /// - AK_InsuficientMemory if there was not enough memory
471  ///
472  /// \aknote
473  /// The Scaling factor (if one was specified on the game object) is included in the return value.
474  /// The Scaling factor is not updated once a sound starts playing since it
475  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
476  /// be re-computed for every playback instance, always using the scaling factor available at this time.
477  /// \endaknote
478  ///
479  /// \sa
480  /// - AkRadiusList
482  AkRadiusList & io_RadiusList ///< List that will be filled with AK::SoundEngine::Query::GameObjDst objects.
483  );
484 
485  /// Returns the maximum distance used in attenuations associated to sounds playing using the specified game object.
486  /// 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
487  /// if the object is out of reach anyway.
488  ///
489  /// \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
490  ///
491  /// \return
492  /// - A negative number if the game object specified is not playing.
493  /// - 0, if the game object was only associated to sounds playing using no distance attenuation.
494  /// - A positive number represents the maximum of all the distance attenuations playing on this game object.
495  ///
496  /// \aknote
497  /// The Scaling factor (if one was specified on the game object) is included in the return value.
498  /// The Scaling factor is not updated once a sound starts playing since it
499  /// is computed only when the playback starts with the initial scaling factor of this game object. Scaling factor will
500  /// be re-computed for every playback instance, always using the scaling factor available at this time.
501  /// \endaknote
502  ///
503  /// \sa
504  /// - \ref AK::SoundEngine::SetScalingFactor
506  AkGameObjectID in_GameObjId ///< Game object ID
507  );
508 
509  /// Get the Event ID associated to the specified PlayingID.
510  /// This function does not acquire the main audio lock.
511  ///
512  /// \return AK_INVALID_UNIQUE_ID on failure.
514  AkPlayingID in_playingID ///< Associated PlayingID
515  );
516 
517  /// Get the ObjectID associated to the specified PlayingID.
518  /// This function does not acquire the main audio lock.
519  ///
520  /// \return AK_INVALID_GAME_OBJECT on failure.
522  AkPlayingID in_playingID ///< Associated PlayingID
523  );
524 
525  /// Get the list PlayingIDs associated with the given game object.
526  /// This function does not acquire the main audio lock.
527  ///
528  /// \aknote It is possible to call GetPlayingIDsFromGameObject with io_ruNumItems = 0 to get the total size of the
529  /// structure that should be allocated for out_aPlayingIDs. \endaknote
530  /// \return AK_Success if succeeded, AK_InvalidParameter if out_aPlayingIDs is NULL while io_ruNumItems > 0
532  AkGameObjectID in_GameObjId, ///< Game object ID
533  AkUInt32& io_ruNumIDs, ///< Number of items in array provided / Number of items filled in array
534  AkPlayingID* out_aPlayingIDs ///< Array of AkPlayingID items to fill
535  );
536 
537  /// Get the value of a custom property of integer or boolean type.
538  /// \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.
540  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.
541  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
542  AkInt32& out_iValue ///< Property Value
543  );
544 
545  /// Get the value of a custom property of real type.
546  /// \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.
548  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.
549  AkUInt32 in_uPropID, ///< Property ID of your custom property found under the Custom Properties tab of the Wwise project settings.
550  AkReal32& out_fValue ///< Property Value
551  );
552 
553  } //namespace Query
554  } //namespace SoundEngine
555 } //namespace AK
556 
557 #endif // _AK_QUERYPARAMS_H_
AkUInt32 AkStateGroupID
State group ID
Definition: AkTypes.h:136
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:947
@ 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:155
AkUInt64 AkGameObjectID
Game object ID
Definition: AkTypes.h:142
#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:213
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:143
AkReal32 fInnerAngle
Inner angle
Specific implementation of array
Definition: AkArray.h:258
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:493
@ 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:134
bool bHoldEmitterPosAndOrient
Hold emitter position and orientation values when starting playback.
Ak3DSpatializationMode
3D spatialization mode.
Definition: AkTypes.h:1217
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:135
AkGameObjectID m_gameObjID
Game object ID
Object information structure for QueryAudioObjectsIDs
AkUInt32 AkSwitchStateID
Switch ID
Definition: AkTypes.h:154
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:176
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:1183
AkLPFType LPFValueAtMaxDist
Low pass filter value at max distance (if any)
AkReal32 AkRtpcValue
Real time parameter control value
Definition: AkTypes.h:156
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:153
Ak3DPositionType
3D position type: defines what acts as the emitter position for computing spatialization against the ...
Definition: AkTypes.h:1192
AkUniqueID objID
Object ID
AkUInt32 AkPlayingID
Playing ID
Definition: AkTypes.h:137
@ 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からはじめよう