版本
menu_open
link
Wwise SDK 2023.1.3
IAkPlugin.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 /// \file
28 /// Software source plug-in and effect plug-in interfaces.
29 
30 #ifndef _IAK_PLUGIN_H_
31 #define _IAK_PLUGIN_H_
32 
38 #include <AK/Tools/Common/AkLock.h>
41 #include <AK/Tools/Common/AkRng.h>
48 #include <AK/AkWwiseSDKVersion.h>
49 
50 #include <math.h>
51 
52 #if defined AK_CPU_X86 || defined AK_CPU_X86_64 || defined (AK_CPU_WASM)
53 #include <xmmintrin.h>
54 #endif
55 
56 /// Plug-in information structure.
57 /// \remarks The bIsInPlace field is only relevant for effect plug-ins.
58 /// \sa
59 /// - \ref iakeffect_geteffectinfo
61 {
62  /// Constructor for default values
65  , uBuildVersion( 0 )
66  , bIsInPlace(true)
67  , bCanChangeRate(false)
68  , bReserved(false)
69  , bCanProcessObjects(false)
70  , bIsDeviceEffect(false)
71  , bCanRunOnObjectConfig(true)
72  , bUsesGainAttribute(false)
73  {}
74 
75  AkPluginType eType; ///< Plug-in type
76  AkUInt32 uBuildVersion; ///< Plug-in build version, must match the AK_WWISESDK_VERSION_COMBINED macro from AkWwiseSDKVersion.h. Prevents usage of plugins compiled for other versions, avoiding crashes or data issues.
77  bool bIsInPlace; ///< Buffer usage (in-place or not). If true, and the plug-in is an insert effect, it should implement IAkInPlaceEffectPlugin, otherwise it should implement IAkOutOfPlaceEffectPlugin. If it is an object processor (see CanProcessObjects, below), it should implement IAkInPlaceObjectPlugin or IAkOutOfPlaceObjectPlugin respectively.
78  bool bCanChangeRate; ///< True for effects whose sample throughput is different between input and output. Effects that can change rate need to be out-of-place (!bIsInPlace), and cannot exist on busses.
79  bool bReserved; ///< Legacy bIsAsynchronous plug-in flag, now unused. Preserved for plug-in backward compatibility. bReserved should be false for all plug-in.
80  bool bCanProcessObjects; ///< Plug-in can process audio objects. They must implement IAkInPlaceObjectPlugin or IAkOutOfPlaceObjectPlugin, depending on if they work in-place or out-of-place. Out-of-place object processors only work on busses.
81  bool bIsDeviceEffect; ///< Plug-in can process final mixes and objects right before sending them to the audio device for output. Plug-ins that process the main mix, passthrough mix and objects directly at the end of the pipeline must implement IAkAudioDeviceEffectPlugin. Audio device effect plug-ins must be in place (bIsInPlace = true) and must be able to process objects (bCanProcessObjects = true).
82  bool bCanRunOnObjectConfig; ///< Plug-in can run on bus with Audio Object configuration. Effect plug-ins are instantiated once per Audio Objects on those busses. While this may be fine for effects such as EQs, it is an user error for effects such as reverbs, or for any effect that is non-linear. Effects that return false will fail to initialize when created on busses with Audio Object Configuration.
83  bool bUsesGainAttribute; ///< Plug-in knows how to process objects separately from the cumulativeGain of the object (or the processing of the object's audio is independent of the overall object gain). bCanProcessObjects must also be true, as this relies on Object Metadata.
84 };
85 
86 //Forward declarations.
87 namespace AK
88 {
89  class PluginRegistration;
90 }
92 
93 struct AkAcousticTexture;
94 
95 namespace AK
96 {
97  class IAkStreamMgr;
98  class IAkGlobalPluginContext;
99 
100  /// Game object information available to plugins.
102  {
103  protected:
104  /// Virtual destructor on interface to avoid warnings.
106 
107  public:
108 
109  /// Get the ID of the game object.
110  virtual AkGameObjectID GetGameObjectID() const = 0;
111 
112  /// Retrieve the number of emitter-listener pairs (rays) of the game object.
113  /// A game object may have more than one position, and be listened to more than one listener.
114  /// The returned value is the product of these two numbers. Use the returned value as a higher
115  /// bound for the index of GetEmitterListenerPair().
116  /// Note that rays whose listener is irrelevant to the current context are ignored. For example,
117  /// if the calling plug-in exists on a bus, only listeners that are routed to the end point's
118  /// device are considered.
119  /// \sa
120  /// - AK::SoundEngine::SetPosition()
121  /// - AK::SoundEngine::SetMultiplePositions()
122  /// - AK::SoundEngine::SetListeners()
123  /// - AK::IAkGameObjectPluginInfo::GetEmitterListenerPair()
125 
126  /// Retrieve the emitter-listener pair (ray) of the game object at index in_uIndex.
127  /// Call GetNumEmitterListenerPairs() prior to this function to get the total number of
128  /// emitter-listener pairs of the game object.
129  /// The emitter-listener pair is expressed as the game object's position relative to the
130  /// listener, in spherical coordinates.
131  /// \note
132  /// - The distance takes game object and listener scaling factors into account.
133  /// - Returned distance and angles are those of the game object, and do not necessarily correspond
134  /// to any sound's positioning data.
135  /// \return AK_Fail if the index is invalid, AK_Success otherwise.
136  /// \sa
137  /// - AK::SoundEngine::SetScalingFactor()
138  /// - AK::IAkGameObjectPluginInfo::GetNumEmitterListenerPairs()
140  AkUInt32 in_uIndex, ///< Index of the pair, [0, GetNumEmitterListenerPairs()[
141  AkEmitterListenerPair & out_emitterListenerPair ///< Returned relative source position in spherical coordinates.
142  ) const = 0;
143 
144  /// Get the number of positions of the game object. Use this value to determine the indices to be
145  /// passed to GetGameObjectPosition().
146  /// \sa
147  /// - AK::SoundEngine::SetPosition()
148  /// - AK::SoundEngine::SetMultiplePositions()
149  /// - AK::IAkGameObjectPluginInfo::GetGameObjectPosition();
150  virtual AkUInt32 GetNumGameObjectPositions() const = 0;
151 
152  /// Get the raw position of the game object at index in_uIndex.
153  /// Use GetNumGameObjectPositions() prior to this function to get the total number of positions
154  /// of that game object.
155  /// \return AK_Fail if the index is out of bounds, AK_Success otherwise.
156  /// \sa
157  /// - AK::SoundEngine::SetPosition()
158  /// - AK::SoundEngine::SetMultiplePositions()
159  /// - AK::IAkGameObjectPluginInfo::GetNumGameObjectPositions()
161  AkUInt32 in_uIndex, ///< Index of the position, [0, GetNumGameObjectPositions()[
162  AkSoundPosition & out_position ///< Returned raw position info.
163  ) const = 0;
164 
165  /// Get the multi-position type assigned to the game object.
166  /// \return MultiPositionType_MultiSources when the effect is instantiated on a bus.
167  /// \sa
168  /// - AK::SoundEngine::SetPosition()
169  /// - AK::SoundEngine::SetMultiplePositions()
171 
172  /// Get the distance scaling factor of the associated game object.
173  /// \sa
174  /// - AK::SoundEngine::SetScalingFactor()
175  virtual AkReal32 GetGameObjectScaling() const = 0;
176 
177  /// Get the game object IDs of listener game objects that are listening to the emitter game object.
178  /// Note that only listeners relevant to the current context are considered. For example,
179  /// if the calling plug-in exists on a bus, only listeners that are routed to the end point's
180  /// device are added to the returned array.
181  /// \return True if the call succeeded, false if all the listeners could not fit into the array,
182  /// \sa
183  /// - AK::SoundEngine::SetListeners()
184  virtual bool GetListeners(
185  AkGameObjectID* out_aListenerIDs, ///< Array of listener IDs to fill, or NULL to query the size needed.
186  AkUInt32& io_uSize ///< In: max size of the array, out: number of valid elements returned in out_aListenerIDs.
187  ) const = 0;
188 
189  /// Get information about a listener. Use GetListeners() prior to this function
190  /// in order to know which listeners are listening to the associated game object.
191  /// \return AK_Fail if the listener ID is invalid. AK_Success otherwise.
192  /// \sa
193  /// - AK::SoundEngine::SetListeners()
194  /// - AK::IAkGameObjectPluginInfo::GetListeners()
196  AkGameObjectID in_uListener, ///< Bit field identifying the listener for which you desire information.
197  AkListener & out_listener ///< Returned listener info.
198  ) const = 0;
199 
200  /// Get the position of a distance probe associated with the given listener.
201  /// Use GetListeners() prior to this function
202  /// in order to know which listeners are listening to the associated game object.
203  /// Returns AK_Success if a distance probe is associated with the specified listener.
204  /// If no distance probe game object is associated with the specified listener,
205  /// or the listener is not valid, AK_Fail is returned.
206  /// - AK::SoundEngine::SetDistanceProbe()
207  /// - AK::SoundEngine::SetListeners()
208  /// - AK::IAkGameObjectPluginInfo::GetListeners()
210  AkGameObjectID in_uListener, ///< Listener Game Object
211  AkWorldTransform& out_position ///< Returned raw position info.
212  ) const = 0;
213  };
214 
215  /// Voice-specific information available to plug-ins.
217  {
218  protected:
219  /// Virtual destructor on interface to avoid warnings.
221 
222  public:
223 
224  /// Retrieve the Playing ID of the event corresponding to this voice (if applicable).
225  virtual AkPlayingID GetPlayingID() const = 0;
226 
227  /// Get priority value associated to this voice. When priority voice is modified by distance, the minimum distance among emitter-listener pairs is used.
228  /// \return The priority between AK_MIN_PRIORITY and AK_MAX_PRIORITY inclusively.
229  virtual AkPriority GetPriority() const = 0;
230 
231  /// Get priority value associated to this voice, for a specified distance, which may differ from the minimum distance that is used by default.
232  /// \return The priority between AK_MIN_PRIORITY and AK_MAX_PRIORITY inclusively.
234  AkReal32 in_fDistance ///< Distance.
235  ) const = 0;
236  };
237 
238  /// Interface to retrieve contextual information available to all types of plugins.
240  {
241  protected:
242  /// Virtual destructor on interface to avoid warnings.
244 
245  public:
246 
247  /// \return The global sound engine context.
248  /// \sa IAkGlobalPluginContext
249  virtual IAkGlobalPluginContext* GlobalContext() const = 0;
250 
251  /// Obtain the interface to access the game object on which the plugin is instantiated.
252  /// \return The interface to GameObject info, nullptr if undefined.
254 
255  /// Identify the output device into which the data processed by this plugin will end up.
256  /// Applicable to plug-ins instantiated as bus effects and to sink plugins.
257  /// Plug-ins instantiated in the Actor-Mixer hierarchy (i.e. on voices) return AK_NotCompatible.
258  /// \sa integrating_secondary_outputs
259  /// \return The device type and unique identifier. AK_Success if successful, AK_NotCompatible otherwise.
261  AkUInt32 & out_uOutputID, ///< Device identifier, when multiple devices of the same type are possible.
262  AkPluginID & out_uDevicePlugin ///< Device plugin ID.
263  ) const = 0;
264 
265  /// Return the pointer and size of the plug-in media corresponding to the specified index.
266  /// The pointer returned will be NULL if the plug-in media is either not loaded or inexistant.
267  /// When this function is called and returns a valid data pointer, the data can only be used by this
268  /// instance of the plugin and is guaranteed to be valid only during the plug-in lifespan.
269  virtual void GetPluginMedia(
270  AkUInt32 in_dataIndex, ///< Index of the plug-in media to be returned.
271  AkUInt8* &out_rpData, ///< Pointer to the data
272  AkUInt32 &out_rDataSize ///< size of the data returned in bytes.
273  ) = 0;
274 
275  /// Return the pointer and size of the game data corresponding to the specified index, sent by the game using AK::SoundEngine::SendPluginCustomGameData().
276  /// The pointer returned will be NULL if the game data is inexistent.
277  /// When this function is called and returns a valid data pointer, the data can only be used by this
278  /// instance of the plugin and is guaranteed to be valid only during the frame.
279  virtual void GetPluginCustomGameData(
280  void* &out_rpData, ///< Pointer to the data
281  AkUInt32 &out_rDataSize ///< size of the data returned in bytes.
282  ) = 0;
283 
284  /// Post a custom blob of data to the UI counterpart of this plug-in.
285  /// Data is sent asynchronously through the profiling system.
286  /// Notes:
287  /// - You may call CanPostMonitorData() to determine if your plug-in can send data to the UI.
288  /// - Data is copied into the communication buffer within this method,
289  /// so you may discard it afterwards.
290  /// - Sending data to the UI is only possible in Debug and Profile. Thus, you should
291  /// enclose your calls to package and send that data within !AK_OPTIMIZED preprocessor flag.
292  /// \return AK_Success if the plug-in exists on a bus, AK_Fail otherwise.
294  void * in_pData, ///< Blob of data.
295  AkUInt32 in_uDataSize ///< Size of data.
296  ) = 0;
297 
298  /// Query the context to know if it is possible to send data to the UI counterpart of this plug-in.
299  /// \return True if the authoring tool is connected and monitoring the game, false otherwise.
300  /// \sa PostMonitorData()
301  virtual bool CanPostMonitorData() = 0;
302 
303  /// Post a monitoring message or error string. This will be displayed in the Wwise capture
304  /// log.
305  /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
306  /// In optimized mode, this function returns AK_NotCompatible.
307  /// \remark This function is provided as a tracking tool only. It does nothing if it is
308  /// called in the optimized/release configuration and return AK_NotCompatible.
310  const char* in_pszError, ///< Message or error string to be displayed
311  AK::Monitor::ErrorLevel in_eErrorLevel ///< Specifies whether it should be displayed as a message or an error
312  ) = 0;
313 
314  /// Get the cumulative gain of all mixing stages, from the host audio node down to the device end point.
315  /// Returns 1.f when the node is an actor-mixer (voice), because a voice may be routed to several mix chains.
316  /// \return The cumulative downstream gain.
318 
319  /// Return the channel configuration of the parent node that this plug-in will mix into. GetParentChannelConfig() may be used to set the output configuration of an
320  /// out-of-place effect to avoid additional up/down mixing stages. Please note however that it is possible for out-of-place effects later in the chain to change
321  /// this configuration.
322  /// Returns not out_channelConfig.IsValid() when the node is an actor-mixer (voice), because a voice may be routed to several mix chains.
323  /// \return AK_Success if the channel config of the primary, direct parent bus could be determined, AK_Fail otherwise.
325  AkChannelConfig& out_channelConfig ///< Channel configuration of parent node (downstream bus).
326  ) const = 0;
327 
328  /// Return an interface to query processor specific features.
330 
331  /// Get internal ID of hosting sound structure (actor-mixer of bus).
332  /// In the case of a voice, the ID is internal but corresponds to what you would get from the duration
333  /// callback (see AkDurationCallbackInfo::audioNodeID). In the case of a bus, it can be matched with the bus name converted
334  /// to a unique ID using AK::SoundEngine::GetIDFromString().
335  /// In the case if an audio device (sink), it is AK_INVALID_UNIQUE_ID.
336  /// \return ID of input.
337  /// \sa
338  /// - AkDurationCallbackInfo
339  /// - AK::SoundEngine::PostEvent()
340  /// - AK::SoundEngine::GetIDFromString()
341  virtual AkUniqueID GetAudioNodeID() const = 0;
342 
343  /// Get the expected input of the audio device (sink) at the end of the bus pipeline from the caller's perspective.
344  /// When called from a bus, the bus hierarchy is traversed upward until the master bus is reached. The audio device connected to this master bus is the sink consulted.
345  /// When called from a source, the source's output bus is the starting point of the traversal.
346  /// When called from a sink, that sink is consulted.
347  /// \return AK_Success if the bus hierarchy traversal was successful and a sink was found, AK_Fail otherwise.
349  AkChannelConfig& out_sinkConfig, // The channel config of the sink; if set to "Objects", then the sink is in 3D audio mode. Any other config means 3D audio is not active.
350  Ak3DAudioSinkCapabilities& out_3dAudioCaps // When out_sinkConfig is set to Objects, inspect this struct to learn which 3D audio features are supported by the sink
351  ) const = 0;
352  };
353 
354  /// Interface to retrieve contextual information for an effect plug-in.
355  /// \sa
356  /// - \ref iakmonadiceffect_init
358  {
359  protected:
360  /// Virtual destructor on interface to avoid warnings.
362 
363  public:
364 
365  /// Determine whether the effect is to be used in Send Mode or not.
366  /// Effects used in auxiliary busses are always used in Send Mode.
367  /// \return True if the effect is in Send Mode, False otherwise
368  virtual bool IsSendModeEffect() const = 0;
369 
370  /// Obtain the interface to access the voice in which the plugin is inserted.
371  /// \return The interface to voice info. NULL if the plugin is instantiated on a bus.
373 
374  /// Obtain the interface to access services available on busses.
375  /// \return The interface to mixing context if the plugin is instantiated on a bus. NULL if it is instantiated on a voice.
377 
378  /// \name For object processors:
379  /// Output object management.
380  //@{
381 
382  /// Create new objects on the output side. Only out-of-place object processors (plugins implementing AK::IAkOutOfPlaceObjectPlugin) may create output objects.
383  /// If successful, the newly constructed objects will be available in out_ppBuffer/out_ppObjects.
384  /// To obtain all the output objects in a single array after having created objects using this function, use GetOutputObjects, or wait for the next call to AK::IAkOutOfPlaceObjectPlugin::Execute
385  /// where output objects are passed via the in_pObjectBuffersOut/in_pObjectsOut arguments.
386  /// Object processors inform the host that an output object may be disposed of by setting its state to AK_NoMoreData from within AK::IAkOutOfPlaceObjectPlugin::Execute.
387  /// \aknote You should never store the pointers returned by out_ppBuffer/out_ppObjects, as the location of pointed objects may change at each frame, or after subsequent calls to CreateOutputObjects.\endaknote
388  /// \return AK_Success if all objects were created successfully, AK_Fail otherwise.
389  /// The optional arguments out_ppBuffer and out_ppObjects may be used to obtain the output objects newly created.
390  /// \sa
391  /// - GetOutputObjects
392  /// - AK::IAkOutOfPlaceObjectPlugin::Execute
394  AkChannelConfig in_channelConfig, ///< Desired channel configuration for all new objects.
395  AkAudioObjects& io_objects ///< AkAudioObjects::uNumObjects, the number of objects to create.
396  ///< AkAudioObjects::ppObjectBuffers, Returned array of pointers to the object buffers newly created, allocated by the caller. Pass nullptr if they're not needed.
397  ///< AkAudioObjects::ppObjects, Returned array of pointers to the objects newly created, allocated by the caller. Pass nullptr if they're not needed.
398  ) = 0;
399 
400  /// Access the output objects. This function is helpful when CreateOutputObjects is called from within AK::IAkOutOfPlaceObjectPlugin::Execute.
401  /// You need to allocate the array of pointers. You may initially obtain the number of objects that will be returned by calling this function with io_numObjects = 0.
402  /// \aknote You should never store the pointers returned by GetOutputObjects, as the location of pointed objects may change at each frame, or after calls to CreateOutputObjects.\endaknote
403  virtual void GetOutputObjects(
404  AkAudioObjects& io_objects ///< AkAudioObjects::uNumObjects, The number of objects. If 0 is passed, io_objects::numObjects returns with the total number of objects.
405  ///< AkAudioObjects::ppObjectBuffers, Returned array of pointers to object buffers, allocated by the caller. The number of objects is the smallest between io_numObjects and the total number of objects.
406  ///< AkAudioObjects::ppObjects, Returned array of pointers to objects, allocated by the caller. The number of objects is the smallest between io_numObjects and the total number of objects.
407  ) = 0;
408 
409  //@}
410  };
411 
412  /// Interface to retrieve contextual information for a source plug-in.
413  /// \sa
414  /// - \ref iaksourceeffect_init
416  {
417  protected:
418  /// Virtual destructor on interface to avoid warnings.
420 
421  public:
422 
423  /// Retrieve the number of loops the source should produce.
424  /// \return The number of loop iterations the source should produce (0 if infinite looping)
425  virtual AkUInt16 GetNumLoops() const = 0;
426 
427  /// Obtain the interface to access the voice in which the plugin is inserted.
428  /// \return The interface to voice info.
430 
431  /// Obtain the MIDI event info associated to the source.
432  /// \return The MIDI event info.
433  ///
434  virtual AkMIDIEvent GetMidiEvent() const = 0;
435 
436  /// Retrieve Cookie information for a Source Plugin
437  /// \return the void pointer of the Cookie passed to the PostEvent
438  virtual void* GetCookie() const = 0;
439  };
440 
441  /// Interface to retrieve contextual information for a mixer.
443  {
444  protected:
445  /// Virtual destructor on interface to avoid warnings.
447 
448  public:
449 
450  /// DEPRECATED.
451  /// Get the type of the bus on which the mixer plugin is instantiated.
452  /// AkBusHierachyFlags is a bit field, indicating whether the bus is the master (top-level) bus or not,
453  /// and whether it is in the primary or secondary mixing graph.
454  /// \return The bus type.
455  virtual AkUInt32 GetBusType() = 0;
456 
457  /// Get speaker angles of the specified device.
458  /// The speaker angles are expressed as an array of loudspeaker pairs, in degrees, relative to azimuth ]0,180].
459  /// Supported loudspeaker setups are always symmetric; the center speaker is always in the middle and thus not specified by angles.
460  /// Angles must be set in ascending order.
461  /// You may call this function with io_pfSpeakerAngles set to NULL to get the expected number of angle values in io_uNumAngles,
462  /// in order to allocate your array correctly. You may also obtain this number by calling
463  /// AK::GetNumberOfAnglesForConfig( AK_SPEAKER_SETUP_DEFAULT_PLANE ).
464  /// If io_pfSpeakerAngles is not NULL, the array is filled with up to io_uNumAngles.
465  /// Typical usage:
466  /// - AkUInt32 uNumAngles;
467  /// - GetSpeakerAngles( NULL, uNumAngles );
468  /// - AkReal32 * pfSpeakerAngles = AkAlloca( uNumAngles * sizeof(AkReal32) );
469  /// - GetSpeakerAngles( pfSpeakerAngles, uNumAngles );
470  /// \warning Call this function only after the sound engine has been properly initialized.
471  /// \return AK_Success if the end point device is properly initialized, AK_Fail otherwise.
472  /// \sa AK::SoundEngine::GetSpeakerAngles()
474  AkReal32 * io_pfSpeakerAngles, ///< Returned array of loudspeaker pair angles, in degrees relative to azimuth [0,180]. Pass NULL to get the required size of the array.
475  AkUInt32 & io_uNumAngles, ///< Returned number of angles in io_pfSpeakerAngles, which is the minimum between the value that you pass in, and the number of angles corresponding to the output configuration, or just the latter if io_pfSpeakerAngles is NULL.
476  AkReal32 & out_fHeightAngle ///< Elevation of the height layer, in degrees relative to the plane.
477  ) = 0;
478 
479  /// \name Services.
480  //@{
481 
482  /// Compute a direct speaker assignment volume matrix with proper downmixing rules between two channel configurations.
483  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
484  /// \aknote ComputePositioning is more general than this one, as it can also compute speaker gains for non-3D spatialization, and should be favored.\endaknote
485  /// \return AK_Success if successful, AK_Fail otherwise.
486  /// \sa IAkGlobalPluginContext
488  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
489  AkChannelConfig in_outputConfig, ///< Channel configuration of the mixer output.
490  AkReal32 in_fCenterPerc, ///< Center percentage. Only applies to mono inputs with standard output configurations that have a center channel.
491  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
492  ) = 0;
493 
494  /// Compute a volume matrix given the position of the panner (Wwise 2D panner).
495  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
496  /// \aknote ComputePositioning is more general than this one, as it can also compute speaker gains for 3D spatialization, and should be favored.\endaknote
497  /// \return AK_Success if successful, AK_Fail otherwise.
498  /// \sa IAkGlobalPluginContext
500  AkSpeakerPanningType in_ePannerType, ///< Panner type
501  const AkVector & in_position, ///< x,y,z panner position [-1,1]. Note that z has no effect at the moment.
502  AkReal32 in_fCenterPct, ///< Center percentage.
503  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
504  AkChannelConfig in_outputConfig, ///< Channel configuration of the mixer output.
505  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
506  ) = 0;
507 
508  /// Compute panning gains on the plane given an incidence angle and channel configuration.
509  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
510  /// \aknote ComputePositioning is more general than this one, as it can also compute speaker gains for non-3D spatialization, and should be favored.\endaknote
511  /// \return AK_Success if successful, AK_Fail otherwise.
512  /// \sa IAkGlobalPluginContext
514  AkReal32 in_fAngle, ///< Incident angle, in radians [-pi,pi], where 0 is the azimuth (positive values are clockwise)
515  AkChannelConfig in_outputConfig, ///< Desired output configuration.
516  AkReal32 in_fCenterPerc, ///< Center percentage. Only applies to mono inputs to outputs that have no center.
517  AK::SpeakerVolumes::VectorPtr out_vVolumes ///< Returned volumes (see AK::SpeakerVolumes::Vector services). Must be allocated prior to calling this function with the size returned by AK::SpeakerVolumes::Vector::GetRequiredSize() for the desired configuration.
518  ) = 0;
519 
520  /// Initialize spherical VBAP
521  /// \return AK_Success if successful, AK_Fail otherwise.
523  AK::IAkPluginMemAlloc* in_pAllocator, ///< Memory allocator
524  const AkSphericalCoord* in_SphericalPositions, ///< Array of points in spherical coordinate, representign the virtual position of each channels.
525  const AkUInt32 in_NbPoints, ///< Number of points in the position array
526  void *& out_pPannerData ///< Contains data relevant to the 3D panner that shoud be re-used accross plugin instances.
527  ) = 0;
528 
529  /// Compute panning gains on the plane given an incidence angle and channel configuration.
530  /// \aknote ComputePositioning is more general than this one, as it handles spread and focus, and can also compute speaker gains for non-3D spatialization, and should be favored.\endaknote
531  /// \return AK_Success if successful, AK_Fail otherwise.
533  void* in_pPannerData, ///< Contains data relevant to the 3D panner that shoud be re-used accross plugin instances.
534  AkReal32 in_fAzimuth, ///< Incident angle, in radians [-pi,pi], where 0 is the azimuth (positive values are clockwise)
535  AkReal32 in_fElevation, ///< Incident angle, in radians [0,pi], where 0 is the elevation (positive values are clockwise)
536  AkUInt32 in_uNumChannels, ///< Number of output channels.
537  AK::SpeakerVolumes::VectorPtr out_vVolumes ///< Returned volumes (see AK::SpeakerVolumes::Vector services). Must be allocated prior to calling this function with the size returned by AK::SpeakerVolumes::Vector::GetRequiredSize() for the desired configuration.
538  ) = 0;
539 
540  /// Clear panner data obtained from InitSphericalVBAP().
541  /// \return AK_Success if successful, AK_Fail otherwise.
543  AK::IAkPluginMemAlloc* in_pAllocator, ///< Memory allocator
544  void* in_pPannerData ///< Contains data relevant to the 3D panner that shoud be re-used accross plugin instances.
545  ) = 0;
546 
547  /// Compute standard 3D positioning.
548  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
549  /// \aknote The cartesian counterpart of Compute3DPositioning, that uses emitter and listener transforms, should be used instead of this function.
550  /// It is more complete and more efficient. \endaknote
551  /// \aknote ComputePositioning is more general than this one, as it can also compute speaker gains for non-3D spatialization, and should be favored.\endaknote
552  /// \return AK_Success if successful, AK_Fail otherwise.
553  /// \sa IAkGlobalPluginContext
555  AkReal32 in_fAngle, ///< Incident angle, in radians [-pi,pi], where 0 is the azimuth (positive values are clockwise).
556  AkReal32 in_fElevation, ///< Incident elevation angle, in radians [-pi/2,pi/2], where 0 is the horizon (positive values are above the horizon).
557  AkReal32 in_fSpread, ///< Spread ([0,1]).
558  AkReal32 in_fFocus, ///< Focus ([0,1]).
559  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
560  AkChannelMask in_uInputChanSel, ///< Mask of input channels selected for panning (excluded input channels don't contribute to the output).
561  AkChannelConfig in_outputConfig, ///< Desired output configuration.
562  AkReal32 in_fCenterPerc, ///< Center percentage. Only applies to mono inputs to outputs that have a center.
563  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
564  ) = 0;
565 
566  /// Compute standard 3D positioning.
567  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
568  /// \aknote This function is more complete and more efficient than the Compute3DPositioning service that uses spherical coordinates, and should be favored.\endaknote
569  /// \aknote ComputePositioning is more general than this one, as it can also compute speaker gains for non-3D spatialization, and should be favored.\endaknote
570  /// \return AK_Success if successful, AK_Fail otherwise.
571  /// \sa IAkGlobalPluginContext
573  const AkWorldTransform & in_emitter, ///< Emitter transform.
574  const AkWorldTransform & in_listener, ///< Listener transform.
575  AkReal32 in_fCenterPerc, ///< Center percentage. Only applies to mono inputs to outputs that have a center.
576  AkReal32 in_fSpread, ///< Spread ([0,1]).
577  AkReal32 in_fFocus, ///< Focus ([0,1]).
578  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
579  AkChannelMask in_uInputChanSel, ///< Mask of input channels selected for panning (excluded input channels don't contribute to the output).
580  AkChannelConfig in_outputConfig, ///< Desired output configuration.
581  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
582  ) = 0;
583 
584  /// Compute the speaker volume matrix of built-in positioning in Wwise from given positioning data and input and output channel configurations.
585  /// You may use the returned volume matrix with IAkGlobalPluginContext::MixNinNChannels.
586  /// Any known (non-anonymous) combination of configurations will work. For example, ambisonics will be decoded or encoded if needed.
587  /// \aknote The function will fail if the input or output configuration is object-based, as the speaker volume matrix would be undefined.\endaknote
588  /// All panning or spatialization types are honored.
589  /// 3D Spatialization is performed relative to the default listener position (0,0,0) and orientation, where the front vector is (0,0,1) and the top vector is (0,1,0), left handed.
590  /// \return AK_Success if succeeded, AK_InvalidParameter if the input or output configuration is object-based, or AK_Fail if the channel configurations are unknown or unhandled.
591  /// \sa IAkGlobalPluginContext
593  const AkPositioningData& in_posData, ///< Positioning data. The field "threeD" is ignored if in_posData.behavioral.spatMode is AK_SpatializationMode_None.
594  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
595  AkChannelConfig in_outputConfig, ///< Channel configuration of the output.
596  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
597  ) = 0;
598 
599 
600  //@}
601 
602  /// \name Metering.
603  //@{
604 
605  /// Set flags for controlling computation of metering values on the mix buffer.
606  /// Pass AK_NoMetering to disable metering.
607  /// \sa
608  /// - AK::AkMetering
609  virtual void EnableMetering( AkMeteringFlags in_eFlags ) = 0;
610 
611  //@}
612  };
613 
614  /// Parameter node interface, managing access to an enclosed parameter structure.
615  /// \aknote The implementer of this interface should also expose a static creation function
616  /// that will return a new parameter node instance when required (see \ref se_plugins_overview). \endaknote
617  /// \sa
618  /// - \ref shared_parameter_interface
620  {
621  protected:
622  /// Virtual destructor on interface to avoid warnings.
623  virtual ~IAkPluginParam(){}
624 
625  public:
626  /// Create a duplicate of the parameter node instance in its current state.
627  /// \aknote The allocation of the new parameter node should be done through the AK_PLUGIN_NEW() macro. \endaknote
628  /// \return Pointer to a duplicated plug-in parameter node interface
629  /// \sa
630  /// - \ref iakeffectparam_clone
632  IAkPluginMemAlloc * in_pAllocator ///< Interface to memory allocator to be used
633  ) = 0;
634 
635  /// Initialize the plug-in parameter node interface.
636  /// Initializes the internal parameter structure to default values or with the provided parameter
637  /// block if it is valid. \endaknote
638  /// \aknote If the provided parameter block is valid, use SetParamsBlock() to set all parameters at once. \endaknote
639  /// \return Possible return values are: AK_Success, AK_Fail, AK_InvalidParameter
640  /// \sa
641  /// - \ref iakeffectparam_init
642  virtual AKRESULT Init(
643  IAkPluginMemAlloc * in_pAllocator, ///< Interface to the memory allocator to be used
644  const void * in_pParamsBlock, ///< Pointer to a parameter structure block
645  AkUInt32 in_uBlockSize ///< Size of the parameter structure block
646  ) = 0;
647 
648  /// Called by the sound engine when a parameter node is terminated.
649  /// \aknote The self-destruction of the parameter node must be done using the AK_PLUGIN_DELETE() macro. \endaknote
650  /// \return AK_Success if successful, AK_Fail otherwise
651  /// \sa
652  /// - \ref iakeffectparam_term
653  virtual AKRESULT Term(
654  IAkPluginMemAlloc * in_pAllocator ///< Interface to memory allocator to be used
655  ) = 0;
656 
657  /// Set all plug-in parameters at once using a parameter block.
658  /// \return AK_Success if successful, AK_InvalidParameter otherwise
659  /// \sa
660  /// - \ref iakeffectparam_setparamsblock
662  const void *in_pParamsBlock, ///< Pointer to a parameter structure block
663  AkUInt32 in_uBlockSize ///< Size of the parameter structure block
664  ) = 0;
665 
666  /// Update a single parameter at a time and perform the necessary actions on the parameter changes.
667  /// \aknote The parameter ID corresponds to the AudioEnginePropertyID in the plug-in XML description file. \endaknote
668  /// \return AK_Success if successful, AK_InvalidParameter otherwise
669  /// \sa
670  /// - \ref iakeffectparam_setparam
672  AkPluginParamID in_paramID, ///< ID number of the parameter to set
673  const void * in_pValue, ///< Pointer to the value of the parameter to set
674  AkUInt32 in_uParamSize ///< Size of the value of the parameter to set
675  ) = 0;
676 
677  /// Use this constant with AK::Wwise::IPluginPropertySet::NotifyInternalDataChanged,
678  /// AK::Wwise::IAudioPlugin::GetPluginData and IAkPluginParam::SetParam. This tells
679  /// that the whole plugin data needs to be saved/transferred.
680  ///\sa
681  /// - AK::Wwise::IPluginPropertySet::NotifyInternalDataChanged
682  /// - AK::Wwise::IAudioPlugin::GetPluginData
683  /// - AK::IAkPluginParam::SetParam
684  static const AkPluginParamID ALL_PLUGIN_DATA_ID = 0x7FFF;
685  };
686 
687  /// Wwise sound engine plug-in interface. Shared functionality across different plug-in types.
688  /// \aknote The implementer of this interface should also expose a static creation function
689  /// that will return a new plug-in instance when required (see \ref soundengine_plugins). \endaknote
690  class IAkPlugin
691  {
692  protected:
693  /// Virtual destructor on interface to avoid warnings.
694  virtual ~IAkPlugin(){}
695 
696  public:
697  /// Release the resources upon termination of the plug-in.
698  /// \return AK_Success if successful, AK_Fail otherwise
699  /// \aknote The self-destruction of the plug-in must be done using AK_PLUGIN_DELETE() macro. \endaknote
700  /// \sa
701  /// - \ref iakeffect_term
702  virtual AKRESULT Term(
703  IAkPluginMemAlloc * in_pAllocator ///< Interface to memory allocator to be used by the plug-in
704  ) = 0;
705 
706  /// The reset action should perform any actions required to reinitialize the state of the plug-in
707  /// to its original state (e.g. after Init() or on effect bypass).
708  /// \return AK_Success if successful, AK_Fail otherwise.
709  /// \sa
710  /// - \ref iakeffect_reset
711  virtual AKRESULT Reset() = 0;
712 
713  /// Plug-in information query mechanism used when the sound engine requires information
714  /// about the plug-in to determine its behavior.
715  /// \warning This function can be called before Init. Implementation of this function should not rely on internal state initialized in Init.
716  /// \return AK_Success if successful.
717  /// \sa
718  /// - \ref iakeffect_geteffectinfo
720  AkPluginInfo & out_rPluginInfo ///< Reference to the plug-in information structure to be retrieved
721  ) = 0;
722 
723  /// Some plug-ins are accessing Media from the Wwise sound bank system.
724  /// If the IAkPlugin object is not using media, this function will not be used and should simply return false.
725  /// If the IAkPlugin object is using media, the RelocateMedia feature can be optionally implemented.
726  /// To implement correctly the feature, the plugin must be able to "Hot swap" from a memory location to another one in a single blocking call (AK::IAkPlugin::RelocateMedia)
727  ///
728  /// \sa
729  /// - AK::IAkPlugin::RelocateMedia
730  virtual bool SupportMediaRelocation() const
731  {
732  return false;
733  }
734 
735  /// Some plug-ins are accessing Media from the Wwise sound bank system.
736  /// If the IAkPlugin object is not using media, this function will not be used.
737  /// If the IAkPlugin object is using media, the RelocateMedia feature can be optionally implemented.
738  /// When this function is being called, the IAkPlugin object must make the required changes to remove all
739  /// referenced from the old memory pointer (previously obtained by GetPluginMedia() (and offsets to) to not access anymore the content of the old memory data and start using the newly provided pointer instead.
740  /// The change must be done within the function RelocateMedia().
741  /// After this call, the memory space in in_pOldInMemoryData will be invalidated and cannot be used safely anymore.
742  ///
743  /// This function will not be called if SupportMediaRelocation returned false.
744  ///
745  /// \sa
746  /// - AK::IAkPlugin::SupportMediaRelocation
748  AkUInt8* /*in_pNewMedia*/,
749  AkUInt8* /*in_pOldMedia*/
750  )
751  {
752  return AK_NotImplemented;
753  }
754 
755  };
756 
757  /// Software effect plug-in interface (see \ref soundengine_plugins_effects).
758  class IAkEffectPlugin : public IAkPlugin
759  {
760  protected:
761  /// Virtual destructor on interface to avoid warnings.
762  virtual ~IAkEffectPlugin(){}
763 
764  public:
765  /// Software effect plug-in initialization. Prepares the effect for data processing, allocates memory and sets up the initial conditions.
766  /// \aknote Memory allocation should be done through appropriate macros (see \ref fx_memory_alloc). \endaknote
767  /// \sa
768  /// - \ref iakmonadiceffect_init
769  virtual AKRESULT Init(
770  IAkPluginMemAlloc * in_pAllocator, ///< Interface to memory allocator to be used by the effect
771  IAkEffectPluginContext * in_pEffectPluginContext, ///< Interface to effect plug-in's context
772  IAkPluginParam * in_pParams, ///< Interface to plug-in parameters
773  AkAudioFormat & io_rFormat ///< Audio data format of the input/output signal. Only an out-of-place plugin is allowed to change the channel configuration. Object processors may receive a channel configuration with type "object" if attached to a bus configured for Audio Objects processing, but otherwise may receive a config for just 1 source. Out-of-place object processors may change the format type, in which case the host bus will automatically create an output object with the desired channel configuration.
774  ) = 0;
775  };
776 
777  /// Software effect plug-in interface for in-place processing (see \ref soundengine_plugins_effects).
779  {
780  public:
781  /// Software effect plug-in DSP execution for in-place processing.
782  /// \aknote The effect should process all the input data (uValidFrames) as long as AK_DataReady is passed in the eState field.
783  /// When the input is finished (AK_NoMoreData), the effect can output more sample than uValidFrames up to MaxFrames() if desired.
784  /// All sample frames beyond uValidFrames are not initialized and it is the responsibility of the effect to do so when outputting an effect tail.
785  /// The effect must notify the pipeline by updating uValidFrames if more frames are produced during the effect tail.
786  /// \aknote The effect will stop being called by the pipeline when AK_NoMoreData is returned in the the eState field of the AkAudioBuffer structure.
787  /// See \ref iakmonadiceffect_execute_general.
788  virtual void Execute(
789  AkAudioBuffer * io_pBuffer ///< In/Out audio buffer data structure (in-place processing)
790  ) = 0;
791 
792  /// Skips execution of some frames, when the voice is virtual playing from elapsed time.
793  /// This can be used to simulate processing that would have taken place (e.g. update internal state).
794  /// Return AK_DataReady or AK_NoMoreData, depending if there would be audio output or not at that point.
796  AkUInt32 in_uFrames ///< Number of frames the audio processing should advance.
797  ) = 0;
798  };
799 
800 
801  /// Software effect plug-in interface for out-of-place processing (see \ref soundengine_plugins_effects).
803  {
804  public:
805  /// Software effect plug-in for out-of-place processing.
806  /// \aknote An input buffer is provided and will be passed back to Execute() (with an advancing offset based on uValidFrames consumption by the plug-in).
807  /// The output buffer should be filled entirely by the effect (at which point it can report AK_DataReady) except on last execution where AK_NoMoreData should be used.
808  /// AK_DataNeeded should be used when more input data is necessary to continue processing.
809  /// \aknote Only the output buffer eState field is looked at by the pipeline to determine the effect state.
810  /// See \ref iakmonadiceffect_execute_outofplace.
811  virtual void Execute(
812  AkAudioBuffer * in_pBuffer, ///< Input audio buffer data structure
813  AkUInt32 in_uInOffset, ///< Offset position into input buffer data
814  AkAudioBuffer * out_pBuffer ///< Output audio buffer data structure
815  ) = 0;
816 
817  /// Skips execution of some frames, when the voice is virtual playing from elapsed time.
818  /// This can be used to simulate processing that would have taken place (e.g. update internal state).
819  /// Return AK_DataReady or AK_NoMoreData, depending if there would be audio output or not at that point.
821  AkUInt32 &io_uFrames ///< Number of frames the audio processing should advance. The output value should be the number of frames that would be consumed to output the number of frames this parameter has at the input of the function.
822  ) = 0;
823  };
824 
825  /// In-place Object Processor plug-in interface. Implement this interface when your plugin returns both AkPluginInfo::bCanProcessObjects
826  /// and AkPluginInfo::bIsInPlace set to true.
827  /// In-place object processors just modify objects' audio or metadata, but do not destroy objects create additional output objects.
828  /// An object processor may be initialized with an Object configuration, or any channel configuration, depending on the configuration of its input.
829  /// It is not allowed to change the channel configuration in Init.
831  {
832  public:
833 
834  /// In-place object processor plug-in DSP execution.
835  /// \aknote The effect should process all the input data (uValidFrames) of each input object in in_pObjectsIn as long as AK_DataReady is passed in their corresponding eState field.
836  /// When an input object is finished (eState is AK_NoMoreData), the effect can output more samples than uValidFrames, up to MaxFrames() if desired.
837  /// The effect must notify the pipeline by updating uValidFrames of a given object if more frames are produced, and by setting its eState to AK_DataReady as long as more samples will be produced.\endaknote.
838  /// \sa AK::IAkEffectPlugin::Init.
839  virtual void Execute(
840  const AkAudioObjects& io_objects ///< Input/Output objects and object buffers.
841  ) = 0;
842  };
843 
844  /// Out-of-place Object Processor plug-in interface. Implement this interface when your plugin returns AkPluginInfo::bCanProcessObjects set to true
845  /// and AkPluginInfo::bIsInPlace set to false.
846  /// With out-of-place object processors, the set of output objects is different than that of the input objects. Out-of-place object processors typically create
847  /// their own output objects using IAkEffectPluginContext::CreateObject. Alternatively, an output object is created by the host bus if the channel configuration
848  /// returned from Init is not of type AK_ChannelConfigType_Objects.
849  /// Only out-of-place object processors may create output objects or change the output channel configuration.
851  {
852  public:
853 
854  /// Out-of-place object processor plug-in DSP execution.
855  /// \aknote When running out-of-place, the effect must only update uValidFrames and eState fields of output objects.
856  /// When the object processor sets an output object's eState field to AK_NoMoreData, the host will garbage collect them afterwards. \endaknote
857  /// \akwarning If an out-of-place object processor calls AK::IAkEffectPluginContext::CreateOutputObjects from within Execute, it must not access the output objects passed in out_objects, as the pointed objects may have moved elsewhere in memory.
858  /// In that case it must use AK::IAkEffectPluginContext::GetOutputObjects. Arguments in_pObjectBuffersOut and in_pObjectsOut can only be safely used if the plugin creates objects during Init, either via
859  /// AK::IAkEffectPluginContext::CreateOutputObjects, or by setting the channelConfig field of io_rFormat to a normal channel configuration (i.e. whose eConfigType is not AK_ChannelConfigType_Objects). \endakwarning
860  /// \sa AK::IAkEffectPlugin::Init.
861  virtual void Execute(
862  const AkAudioObjects& in_objects, ///< Input objects and object audio buffers.
863  const AkAudioObjects& out_objects ///< Output objects and object audio buffers.
864  ) = 0;
865  };
866 
868  {
869  public:
870  /// Compute the speaker volume matrix of built-in positioning in Wwise from given positioning data and input and output channel configurations.
871  /// Any known (non-anonymous) combination of configurations will work. For example, ambisonics will be decoded or encoded if needed.
872  /// \aknote The function will fail if the input or output configuration is object-based, as the speaker volume matrix would be undefined.\endaknote
873  /// All panning or spatialization types are honored.
874  /// 3D Spatialization is performed relative to the default listener position (0,0,0) and orientation, where the front vector is (0,0,1) and the top vector is (0,1,0), left handed.
875  /// \return AK_Success if succeeded, AK_InvalidParameter if the input or output configuration is object-based, or AK_Fail if the channel configurations are unknown or unhandled.
877  const AkPositioningData& in_posData, ///< Positioning data. The field "threeD" is ignored if in_posData.behavioral.spatMode is AK_SpatializationMode_None.
878  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
879  AkChannelConfig in_outputConfig, ///< Channel configuration of the output.
880  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
881  ) = 0;
882  };
883 
884  /// Audio device effect plug-in interface. Implement this interface for in-place effects that must be applied at the very end of the pipeline.
885  /// Audio device effects are applied right before sending audio buffers (main mix, passthrough and objects) to the audio device output through IAkSinkPlugin/IAk3DAudioSinkPlugin.
886  /// The format of the audio buffers passed to the effect matches the format requested by the sink plug-in. This means that audio device effects must be in-place; they cannot change io_rFormat in Init().
888  {
889  protected:
890  /// Virtual destructor on interface to avoid warnings.
892 
893  public:
894  /// Audio device effect plug-in initialization. Prepares the effect for data processing, allocates memory and sets up the initial conditions.
895  /// \aknote Memory allocation should be done through appropriate macros (see \ref fx_memory_alloc). \endaknote
896  virtual AKRESULT Init(
897  IAkPluginMemAlloc* in_pAllocator, ///< Interface to memory allocator to be used by the effect
898  IAkAudioDeviceEffectPluginContext* in_pEffectPluginContext, ///< Interface to audio effect's plug-in context
899  IAkPluginParam* in_pParams, ///< Interface to plug-in parameters
900  const AkAudioFormat& in_rFormat, ///< Audio data format of the input/output signal. Matches the channel configuration of the audio device sink plug-in. If format is object-based (AkChannelConfig::eConfigType is Ak_ChannelConfigType_Objects), the plug-in should verify Ak3DAudioSinkCapabilities to determine which inputs it can expect in Execute (main mix, passthrough, objects).
901  const Ak3DAudioSinkCapabilities& in_3dCapabilities ///< 3D capabilities of the output device sink plug-in. If io_rFormat is not object-based, this can be ignored and only the main mix will be submitted to Execute().
902  ) = 0;
903 
904  virtual void Execute(
905  AkAudioBuffer* io_pMainMix, ///< Audio buffer data structure for the main mix (binauralized or not, depending on if binauralization is supported and enabled).
906  AkAudioBuffer* io_pPassthroughMix, ///< The stereo mix to send out to the system in passthrough fashion (no binauralization). NULL if the channel configuration of the device is not object-based or does not have a passthrough.
907  const AkAudioObjects& io_objects, ///< 3D Audio objects and object audio buffers to be consumed. The audio buffers are in the native format of the sound engine (typically float, deinterleaved), as specified by io_rFormat passed to Init(). It is up to the plugin to transform it into a format that is compatible with its output.
908  AkRamp& io_gain ///< Volume gain to apply to all inputs. If the effect applies the gain, it must reset the gain to 1.0f so that it's not applied a second time in the sink plug-in.
909  ) = 0;
910  };
911 
912  /// Interface to retrieve contextual information for a sink plugin.
913  /// \sa
914  /// - AK::IAkSinkPlugin
916  {
917  protected:
918  /// Virtual destructor on interface to avoid warnings.
920 
921  public:
922 
923  /// Query if the sink plugin is instantiated on the main output device (primary tree).
924  /// \return True if the sink plugin is instantiated on the main output device (primary tree), false otherwise.
925  /// \sa
926  /// - AK::IAkSinkPlugin::IsDataNeeded()
927  /// - AK::IAkSinkPlugin::Consume()
928  virtual bool IsPrimary() = 0;
929 
930  /// Sink plugins may need to call this function to notify the audio thread that it should wake up
931  /// in order to potentially process an audio frame. Note that the audio thread may wake up for other
932  /// reasons, for example following calls to AK::SoundEngine::RenderAudio().
933  /// Once the audio thread is awaken, it will ask the sink plugin how many audio frames need to be
934  /// processed and presented to the plugin. This is done through AK::IAkSinkPlugin::IsDataNeeded()
935  /// and AK::IAkSinkPlugin::Consume() respectively.
936  /// Note that only the sink plugin that is instantiated on the main output device (primary tree) may control
937  /// the audio thread synchronization.
938  /// \return AK_Success if the calling plugin is instantiated on the main output device (primary tree),
939  /// AK_Fail otherwise.
940  /// \sa
941  /// - AK::IAkSinkPluginContext::IsPrimary()
942  /// - AK::IAkSinkPlugin::IsDataNeeded()
943  /// - AK::IAkSinkPlugin::Consume()
945 
946  /// Query engine's user-defined sink queue depth (AkPlatformInitSettings::uNumRefillsInVoice).
947  /// \return The engine's AkPlatformInitSettings::uNumRefillsInVoice value on platforms for which it exists, 0 otherwise.
949 
950  /// Compute the speaker volume matrix of built-in positioning in Wwise from given positioning data and input and output channel configurations.
951  /// Any known (non-anonymous) combination of configurations will work. For example, ambisonics will be decoded or encoded if needed.
952  /// \aknote The function will fail if the input or output configuration is object-based, as the speaker volume matrix would be undefined.\endaknote
953  /// All panning or spatialization types are honored.
954  /// 3D Spatialization is performed relative to the default listener position (0,0,0) and orientation, where the front vector is (0,0,1) and the top vector is (0,1,0), left handed.
955  /// \return AK_Success if succeeded, AK_InvalidParameter if the input or output configuration is object-based, or AK_Fail if the channel configurations are unknown or unhandled.
957  const AkPositioningData& in_posData, ///< Positioning data. The field "threeD" is ignored if in_posData.behavioral.spatMode is AK_SpatializationMode_None.
958  AkChannelConfig in_inputConfig, ///< Channel configuration of the input.
959  AkChannelConfig in_outputConfig, ///< Channel configuration of the output.
960  AK::SpeakerVolumes::MatrixPtr out_mxVolumes ///< Returned volumes matrix. Must be preallocated using AK::SpeakerVolumes::Matrix::GetRequiredSize() (see AK::SpeakerVolumes::Matrix services).
961  ) = 0;
962 
963  /// Returns the panning rule for the output device to which the sink plug-in is attached.
964  virtual AkPanningRule GetPanningRule() const = 0;
965  };
966 
968  {
971  };
972 
973  /// Software interface for sink (audio endpoint) plugins.
974  /// This interface should not be implemented directly,
975  /// Plug-ins should either implement:
976  /// - IAkSinkPlugin: for audio endpoint that do not support 3D audio, or
977  /// - IAk3DAudioSinkPlugin: for audio endpoints that support 3D audio features.
979  {
980  public:
981  /// Initialization of the sink plugin.
982  ///
983  /// This method prepares the audio device plug-in for data processing, allocates memory, and sets up initial conditions.
984  /// The plug-in is passed in a pointer to a memory allocator interface (AK::IAkPluginMemAlloc).You should perform all dynamic memory allocation through this interface using the provided memory allocation macros(refer to \ref fx_memory_alloc).For the most common memory allocation needs, namely allocation at initialization and release at termination, the plug-in does not need to retain a pointer to the allocator.It will also be provided to the plug-in on termination.
985  /// The AK::IAkSinkPluginContext interface allows to retrieve information related to the context in which the audio device plug-in is operated.
986  /// The plug-in also receives a pointer to its associated parameter node interface (AK::IAkPluginParam).Most plug-ins will want to keep a reference to the associated parameter node to be able to retrieve parameters at runtime. Refer to \ref iakeffectparam_communication for more details.
987  /// All of these interfaces will remain valid throughout the plug-in's lifespan so it is safe to keep an internal reference to them when necessary.
988  /// Plug-ins also receive the output audio format(which stays the same during the lifespan of the plug-in) to be able to allocate memory and setup processing for a given channel configuration.
989  /// Note that the channel configuration is suggestive and may even be specified as not AkChannelConfig::IsValid().The plugin is free to determine the true channel configuration(this is an io parameter).
990  ///
991  /// \return AK_Success if successful.
992  /// \return AK_NotCompatible if the system doesn't support this sink type. Return this if you want to fall back to the default sinks. This sink will never be requested again. Do not return this code if the device is simply unplugged.
993  /// \return AK_DeviceNotCompatible if the requested output device doesn't support this sink type. Return this if you want to fall back to the dummy audio sink, which will result in no audio for the associated bus hierarchy. This sink will never be requested again.
994  /// All other return codes will be treated as temporary failures conditions and the sink will be requested again later.
995 
996  virtual AKRESULT Init(
997  IAkPluginMemAlloc * in_pAllocator, ///< Interface to memory allocator to be used by the effect.
998  IAkSinkPluginContext * in_pSinkPluginContext, ///< Interface to sink plug-in's context.
999  IAkPluginParam * in_pParams, ///< Interface to plug-in parameters.
1000  AkAudioFormat & io_rFormat ///< Audio data format of the input signal. Note that the channel configuration is suggestive and may even be specified as not AkChannelConfig::IsValid(). The plugin is free to determine the true channel configuration.
1001  ) = 0;
1002 
1003  /// Obtain the number of audio frames that should be processed by the sound engine and presented
1004  /// to this plugin via AK::IAkSinkPlugin::Consume(). The size of a frame is determined by the sound engine and
1005  /// obtainable via AK::IAkPluginContextBase::GetMaxBufferLength().
1006  /// \return AK_Success if successful, AK_Fail if there was a critical error.
1007  /// \sa
1008  /// - AK::IAkSinkPlugin::Consume()
1009  /// - AK::IAkSinkPluginContext::SignalAudioThread()
1011  AkUInt32& out_uNumFramesNeeded ///< Returned number of audio frames needed.
1012  ) = 0;
1013 
1014  /// Called at the end of the audio frame. If no Consume calls were made prior to OnFrameEnd, this means no audio was sent to the device. Assume silence.
1015  /// \sa
1016  /// - AK::IAkSinkPlugin::Consume()
1017  virtual void OnFrameEnd() = 0;
1018 
1019  /// Ask the plug-in whether starvation occurred.
1020  /// \return True if starvation occurred, false otherwise.
1021  virtual bool IsStarved() = 0;
1022 
1023  /// Reset the "starvation" flag after IsStarved() returned true.
1024  virtual void ResetStarved() = 0;
1025 
1027  };
1028 
1029  /// Software interface for sink (audio endpoint) plugins.
1031  {
1032  protected:
1033  /// Virtual destructor on interface to avoid warnings.
1034  virtual ~IAkSinkPlugin() {}
1035 
1036  public:
1037  /// Present an audio buffer to the sink. The audio buffer is in the native format of the sound engine
1038  /// (typically float, deinterleaved), as specified by io_rFormat passed to Init(). It is up to the
1039  /// plugin to transform it into a format that is compatible with its output.
1040  /// Note that Consume() is not called if the output for this frame consists of silence. Plugins should
1041  /// detect this in OnFrameEnd().
1042  /// \sa
1043  /// - AK::IAkSinkPlugin::IsDataNeeded()
1044  /// - AK::IAkSinkPlugin::OnFrameEnd()
1045  virtual void Consume(
1046  AkAudioBuffer * in_pInputBuffer, ///< Input audio buffer data structure. Plugins should avoid processing data in-place.
1047  AkRamp in_gain ///< Volume gain to apply to this input (prev corresponds to the beginning, next corresponds to the end of the buffer).
1048  ) = 0;
1049 
1050  virtual AkSinkPluginType GetSinkPluginType() const override final { return AkSinkPluginType_Sink; }
1051  };
1052 
1053  /// Software plug-in interface for sink (audio end point) which supports 3D audio features.
1055  {
1056  protected:
1057  /// Virtual destructor on interface to avoid warnings.
1059 
1060  public:
1061  /// Returns the capabilities of the sink's 3D audio system
1063  Ak3DAudioSinkCapabilities& out_rCapabilities ///< Capabilities of the 3D Audio system
1064  ) = 0;
1065 
1066  /// Same as AK::IAkSinkPlugin::Consume(), but receives 3 inputs: the main mix,the stereo passthrough and 3d audio objects.
1067  /// \sa
1068  /// - AK::IAkSinkPlugin::Consume()
1069  /// - AK::IAkSinkPlugin::IsDataNeeded()
1070  /// - AK::IAkSinkPlugin::OnFrameEnd()
1071  virtual void Consume(
1072  AkAudioBuffer* in_pMainMix, ///< Audio buffer data structure for the main mix (binauralized or not, depending on if binauralization is supported and enabled).
1073  AkAudioBuffer* in_pPassthroughMix, ///< The stereo mix to send out to the system in passthrough fashion (no binauralization). NULL if the channel configuration of the device is not object-based or does not have a passthrough.
1074  const AkAudioObjects& in_objects, ///< 3D Audio objects and object audio buffers to be consumed. The audio buffers are in the native format of the sound engine (typically float, deinterleaved), as specified by io_rFormat passed to Init(). It is up to the plugin to transform it into a format that is compatible with its output.
1075  AkRamp in_gain ///< Volume gain to apply to all inputs.
1076  ) = 0;
1077 
1078  virtual AkSinkPluginType GetSinkPluginType() const override final { return AkSinkPluginType_3DAudioSink; }
1079  };
1080 
1081  /// Wwise sound engine source plug-in interface (see \ref soundengine_plugins_source).
1083  {
1084  protected:
1085  /// Virtual destructor on interface to avoid warnings.
1086  virtual ~IAkSourcePlugin(){}
1087 
1088  public:
1089  /// Source plug-in initialization. Gets the plug-in ready for data processing, allocates memory and sets up the initial conditions.
1090  /// \aknote Memory allocation should be done through the appropriate macros (see \ref fx_memory_alloc). \endaknote
1091  /// \sa
1092  /// - \ref iaksourceeffect_init
1093  virtual AKRESULT Init(
1094  IAkPluginMemAlloc * in_pAllocator, ///< Interface to the memory allocator to be used by the plug-in
1095  IAkSourcePluginContext * in_pSourcePluginContext, ///< Interface to the source plug-in's context
1096  IAkPluginParam * in_pParams, ///< Interface to the plug-in parameters
1097  AkAudioFormat & io_rFormat ///< Audio format of the output data to be produced by the plug-in (mono native by default)
1098  ) = 0;
1099 
1100  /// This method is called to determine the approximate duration of the source.
1101  /// \return The duration of the source, in milliseconds.
1102  /// \sa
1103  /// - \ref iaksourceeffect_getduration
1104  virtual AkReal32 GetDuration() const = 0;
1105 
1106  /// This method is called to determine the estimated envelope of the source.
1107  /// \return The estimated envelope of the data that will be generated in the next call to
1108  /// Execute(). The envelope value should be normalized to the highest peak of the entire
1109  /// duration of the source. Expected range is [0,1]. If envelope and peak value cannot be
1110  /// predicted, the source should return 1 (no envelope).
1111  /// \sa
1112  /// - \ref iaksourceeffect_getenvelope
1113  virtual AkReal32 GetEnvelope() const
1114  {
1115  return 1.f;
1116  }
1117 
1118  /// This method is called to tell the source to stop looping.
1119  /// This will typically be called when an action of type "break" will be triggered on the playing source.
1120  /// Break (or StopLooping) means: terminate gracefully... if possible. In most situations it finishes the current loop and plays the sound release if there is one.
1121  ///
1122  /// \return
1123  /// - \c AK_Success if the source ignores the break command and plays normally till the end or if the source support to stop looping and terminates gracefully.
1124  /// - \c AK_Fail if the source cannot simply stop looping, in this situation, the break command will end up stopping this source.
1125  /// \sa
1126  /// - \ref iaksourceeffect_stoplooping
1127  virtual AKRESULT StopLooping(){ return AK_Success; }
1128 
1129  /// This method is called to tell the source to seek to an arbitrary sample.
1130  /// This will typically be called when the game calls AK::SoundEngine::SeekOnEvent() where the event plays
1131  /// a sound that wraps this source plug-in.
1132  /// If the plug-in does not handle seeks, it should return AK_Success. If it returns AK_Fail, it will
1133  /// be terminated by the sound engine.
1134  ///
1135  /// \return
1136  /// - \c AK_Success if the source handles or ignores seek command.
1137  /// - \c AK_Fail if the source considers that seeking requests should provoke termination, for example, if
1138  /// the desired position is greater than the prescribed source duration.
1139  /// \sa
1140  /// - AK::SoundEngine::SeekOnEvent()
1141  virtual AKRESULT Seek(
1142  AkUInt32 /* in_uPosition */ ///< Position to seek to, in samples, at the rate specified in AkAudioFormat (see AK::IAkSourcePlugin::Init()).
1143  ) { return AK_Success; }
1144 
1145  /// Skips execution when the voice is virtual playing from elapsed time to simulate processing that would have taken place (e.g. update internal state) while
1146  /// avoiding most of the CPU hit of plug-in execution.
1147  /// Given the number of frames requested adjust the number of frames that would have been produced by a call to Execute() in the io_uFrames parameter and return and
1148  /// return AK_DataReady or AK_NoMoreData, depending if there would be audio output or not at that point.
1149  /// Returning AK_NotImplemented will trigger a normal execution of the voice (as if it was not virtual) thus not enabling the CPU savings of a proper from elapsed time behavior.
1150  /// Note that returning AK_NotImplemeted for a source plug-ins that support asynchronous processing will produce a 'resume' virtual voice behavior instead.
1152  AkUInt32 & /*io_uFrames */ ///< (Input) Number of frames that the audio buffer processing can advance (equivalent to MaxFrames()). The output value should be the number of frames that would be produced this execution.
1153  ) { return AK_NotImplemented; }
1154 
1155  /// Software effect plug-in DSP execution.
1156  /// \aknote The effect can output as much as wanted up to MaxFrames(). All sample frames passed uValidFrames at input time are
1157  /// not initialized and it is the responsibility of the effect to do so. When modifying the number of valid frames within execution
1158  /// (e.g. to flush delay lines) the effect should notify the pipeline by updating uValidFrames accordingly.
1159  /// \aknote The effect will stop being called by the pipeline when AK_NoMoreData is returned in the the eState field of the AkAudioBuffer structure.
1160  virtual void Execute(
1161  AkAudioBuffer * io_pBuffer ///< In/Out audio buffer data structure (in-place processing)
1162  ) = 0;
1163  };
1164 
1165 
1166  /// This function can be useful to convert from normalized floating point audio samples to HW-pipeline format samples.
1167  #define AK_FLOAT_TO_SAMPLETYPE( __in__ ) (__in__)
1168  /// This function can be useful to convert from normalized floating point audio samples to HW-pipeline format samples when the input is not not to exceed (-1,1) range.
1169  #define AK_FLOAT_TO_SAMPLETYPE_NOCLIP( __in__ ) (__in__)
1170  /// This function can be useful to convert from HW-pipeline format samples to normalized floating point audio samples.
1171  #define AK_SAMPLETYPE_TO_FLOAT( __in__ ) (__in__)
1172 
1173  #define AK_DBTOLIN( __db__ ) (powf(10.f,(__db__) * 0.05f))
1174 }
1175 
1176 /// Registered plugin creation function prototype.
1178 /// Registered plugin parameter node creation function prototype.
1180 /// Registered plugin device enumeration function prototype, used for providing lists of devices by plug-ins.
1182  AkUInt32& io_maxNumDevices, ///< In: The length of the out_deviceDescriptions array, or zero is out_deviceDescriptions is null. Out: If out_deviceDescriptions is not-null, this should be set to the number of entries in out_deviceDescriptions that was populated (and should be less-than-or-equal to the initial value). If out_deviceDescriptions is null, this should be set to the maximum number of devices that may be returned by this callback.
1183  AkDeviceDescription* out_deviceDescriptions ///< The output array of device descriptions. If this is not-null, there will be a number of entries equal to the input value of io_maxNumDevices.
1184  );
1185 
1186 struct AkPlatformInitSettings;
1187 struct AkInitSettings;
1188 
1189 namespace AK
1190 {
1192  {
1200  };
1201 
1202  /// Common interface for plug-in services accessed through the global plug-in context
1204  {
1205  protected:
1206  virtual ~IAkPluginService() {}
1207  };
1208 
1209  /// Global plug-in context used for plug-in registration/initialization.
1210  /// Games query this interface from the sound engine, via AK::SoundEngine::GetGlobalPluginContext. Plug-ins query it via IAkPluginContextBase::GlobalContext.
1212  {
1213  protected:
1214  /// Virtual destructor on interface to avoid warnings.
1216 
1217  public:
1218 
1219  /// Retrieve the streaming manager access interface.
1220  virtual IAkStreamMgr * GetStreamMgr() const = 0;
1221 
1222  /// Retrieve the maximum number of frames that Execute() will be called with for this effect.
1223  /// Can be used by the effect to make memory allocation at initialization based on this worst case scenario.
1224  /// \return Maximum number of frames.
1225  virtual AkUInt16 GetMaxBufferLength() const = 0;
1226 
1227  /// Query whether sound engine is in real-time or offline (faster than real-time) mode.
1228  /// \return true when sound engine is in offline mode, false otherwise.
1229  virtual bool IsRenderingOffline() const = 0;
1230 
1231  /// Retrieve the core sample rate of the engine. This sample rate applies to all effects except source plugins, which declare their own sample rate.
1232  /// \return Core sample rate.
1233  virtual AkUInt32 GetSampleRate() const = 0;
1234 
1235  /// Post a monitoring message or error string. This will be displayed in the Wwise capture
1236  /// log.
1237  /// \return AK_Success if successful, AK_Fail if there was a problem posting the message.
1238  /// In optimized mode, this function returns AK_NotCompatible.
1239  /// \remark This function is provided as a tracking tool only. It does nothing if it is
1240  /// called in the optimized/release configuration and return AK_NotCompatible.
1242  const char* in_pszError, ///< Message or error string to be displayed
1243  AK::Monitor::ErrorLevel in_eErrorLevel ///< Specifies whether it should be displayed as a message or an error
1244  ) = 0;
1245 
1246  /// Register a plug-in with the sound engine and set the callback functions to create the
1247  /// plug-in and its parameter node.
1248  /// \sa
1249  /// - \ref register_effects
1250  /// - \ref plugin_xml
1251  /// \return AK_Success if successful, AK_InvalidParameter if invalid parameters were provided or Ak_Fail otherwise. Possible reasons for an AK_Fail result are:
1252  /// - Insufficient memory to register the plug-in
1253  /// - Plug-in ID already registered
1254  /// \remarks
1255  /// Codecs and plug-ins must be registered before loading banks that use them.\n
1256  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1257  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1258  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1259  /// posting the event will fail.
1261  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
1262  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
1263  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
1264  AkCreatePluginCallback in_pCreateFunc, ///< Pointer to the plug-in's creation function
1265  AkCreateParamCallback in_pCreateParamFunc ///< Pointer to the plug-in's parameter node creation function
1266  ) = 0;
1267 
1268  /// Register a codec type with the sound engine and set the callback functions to create the
1269  /// codec's file source and bank source nodes.
1270  /// \sa
1271  /// - \ref register_effects
1272  /// \return AK_Success if successful, AK_InvalidParameter if invalid parameters were provided, or Ak_Fail otherwise. Possible reasons for an AK_Fail result are:
1273  /// - Insufficient memory to register the codec
1274  /// - Codec ID already registered
1275  /// \remarks
1276  /// Codecs and plug-ins must be registered before loading banks that use them.\n
1277  /// Loading a bank referencing an unregistered plug-in or codec will result in a load bank success,
1278  /// but the plug-ins will not be used. More specifically, playing a sound that uses an unregistered effect plug-in
1279  /// will result in audio playback without applying the said effect. If an unregistered source plug-in is used by an event's audio objects,
1280  /// posting the event will fail.
1282  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in XML)
1283  AkUInt32 in_ulPluginID, ///< Plugin identifier (as declared in XML)
1284  AkCreateFileSourceCallback in_pFileCreateFunc, ///< Factory for streaming sources.
1285  AkCreateBankSourceCallback in_pBankCreateFunc ///< Factory for in-memory sources.
1286  ) = 0;
1287 
1288  /// Register a global callback function. This function will be called from the audio rendering thread, at the
1289  /// location specified by in_eLocation. This function will also be called from the thread calling
1290  /// AK::SoundEngine::Term with in_eLocation set to AkGlobalCallbackLocation_Term.
1291  /// For example, in order to be called at every audio rendering pass, and once during teardown for releasing resources, you would call
1292  /// RegisterGlobalCallback(AkPluginTypeEffect, MY_COMPANY_ID , MY_PLUGIN_ID, myCallback, AkGlobalCallbackLocation_BeginRender | AkGlobalCallbackLocation_Term, myCookie);
1293  /// \remarks
1294  /// A valid (not AkPluginTypeNone) Plugin Type, Company ID and valid (non-zero) Plug-in ID of the plug-in registering the callback must be provided to this function.
1295  /// The timing of the callback function will contribute to the timing of the plug-in registered (Total Plug-in CPU and Advanced Profiler Plug-in tab).
1296  /// Timers will be registered to callbacks at all locations except for \c AkGlobalCallbackLocation::AkGlobalCallbackLocation_Register and \c AkGlobalCallbackLocation::AkGlobalCallbackLocation_Term.
1297  /// It is only legal to call this function from inside the plug-in registration callback, exclusively when receiving \c AkGlobalCallbackLocation::AkGlobalCallbackLocation_Register.
1298  /// This function should not be called from inside the plug-in instance (e.g. in Init, Execute, etc.) to prevent deadlocks when processing plug-ins in parallel.
1299  /// It is illegal to call this function while already inside of a registered global callback.
1300  /// This function might stall for several milliseconds before returning.
1301  /// \sa
1302  /// - \ref fx_global_hooks
1303  /// - AK::IAkGlobalPluginContext::UnregisterGlobalCallback()
1304  /// - AkGlobalCallbackFunc
1305  /// - AkGlobalCallbackLocation
1307  AkPluginType in_eType, ///< A valid Plug-in type (for example, source or effect).
1308  AkUInt32 in_ulCompanyID, ///< Company identifier (as declared in the plug-in description XML file).
1309  AkUInt32 in_ulPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file).
1310  AkGlobalCallbackFunc in_pCallback, ///< Function to register as a global callback.
1311  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender, ///< Callback location defined in AkGlobalCallbackLocation. Bitwise OR multiple locations if needed.
1312  void * in_pCookie = NULL ///< User cookie.
1313  ) = 0;
1314 
1315  /// Unregister a global callback function, previously registered using RegisterGlobalCallback.
1316  /// \remarks
1317  /// It is only legal to call this function from inside the plug-in registration global callback, exclusively when receiving \c AkGlobalCallbackLocation::AkGlobalCallbackLocation_Term.
1318  /// This function should not be called from inside the plug-in instance (e.g. in Init, Execute, etc.) to prevent deadlocks when processing plug-ins in parallel.
1319  /// It is illegal to call this function while already inside of a registered global callback.
1320  /// This function might stall for several milliseconds before returning.
1321  /// \sa
1322  /// - \ref fx_global_hooks
1323  /// - AK::IAkGlobalPluginContext::RegisterGlobalCallback()
1324  /// - AkGlobalCallbackFunc
1325  /// - AkGlobalCallbackLocation
1327  AkGlobalCallbackFunc in_pCallback, ///< Function to unregister as a global callback.
1328  AkUInt32 in_eLocation = AkGlobalCallbackLocation_BeginRender ///< Must match in_eLocation as passed to RegisterGlobalCallback for this callback.
1329  ) = 0;
1330 
1331  /// Get the default allocator for plugins. This is useful for performing global initialization tasks shared across multiple plugin instances.
1333 
1334  /// \sa SetRTPCValue
1336  AkRtpcID in_rtpcID, ///< ID of the game parameter
1337  AkRtpcValue in_value, ///< Value to set
1338  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT,///< Associated game object ID
1339  AkTimeMs in_uValueChangeDuration = 0, ///< Duration during which the game parameter is interpolated towards in_value
1340  AkCurveInterpolation in_eFadeCurve = AkCurveInterpolation_Linear, ///< Curve type to be used for the game parameter interpolation
1341  bool in_bBypassInternalValueInterpolation = false ///< True if you want to bypass the internal "slew rate" or "over time filtering" specified by the sound designer. This is meant to be used when for example loading a level and you dont want the values to interpolate.
1342  ) = 0;
1343 
1344  /// Send custom game data to a plugin that resides on a bus (insert effect or mixer plugin).
1345  /// Data will be copied and stored into a separate list.
1346  /// Previous entry is deleted when a new one is sent.
1347  /// Set the data pointer to NULL to clear item from the list.
1348  /// This means that you cannot send different data to various instances of the plugin on a same bus.\endaknote
1349  /// \return AK_Success if data was sent successfully.
1351  AkUniqueID in_busID, ///< Bus ID
1352  AkGameObjectID in_busObjectID, ///< Bus Object ID
1353  AkPluginType in_eType, ///< Plug-in type (for example, source or effect)
1354  AkUInt32 in_uCompanyID, ///< Company identifier (as declared in the plug-in description XML file)
1355  AkUInt32 in_uPluginID, ///< Plug-in identifier (as declared in the plug-in description XML file)
1356  const void* in_pData, ///< The data blob
1357  AkUInt32 in_uSizeInBytes ///< Size of data
1358  ) = 0;
1359 
1360  /// Computes gain vector for encoding a source with angles in_fAzimuth and in_fElevation to full-sphere ambisonics with order in_uOrder.
1361  /// Ambisonic channels are ordered by ACN and use the SN3D convention.
1363  AkReal32 in_fAzimuth, ///< Incident angle, in radians [-pi,pi], where 0 is the front (positive values are clockwise).
1364  AkReal32 in_fElevation, ///< Incident angle, in radians [-pi/2,pi/2], where 0 is the azimuthal plane.
1365  AkChannelConfig in_cfgAmbisonics, ///< Determines number of gains in vector out_vVolumes.
1366  AK::SpeakerVolumes::VectorPtr out_vVolumes ///< Returned volumes (see AK::SpeakerVolumes::Vector services). Must be allocated prior to calling this function with the size returned by AK::SpeakerVolumes::Vector::GetRequiredSize() for the desired number of channels.
1367  ) = 0;
1368 
1369  /// Computes gain matrix for decoding an SN3D-normalized ACN-ordered ambisonic signal of order sqrt(in_cfgAmbisonics.uNumChannels)-1, with max-RE weighting function, on a (regularly) sampled sphere whose samples in_samples are
1370  /// expressed in left-handed cartesian coordinates, with unitary norm.
1371  /// This decoding technique is optimal for regular sampling.
1372  /// The returned matrix has in_cfgAmbisonics.uNumChannels inputs (rows) and in_uNumSamples outputs (columns), and is normalized by the number of samples.
1373  /// You may use the returned volume matrix with IAkPluginServiceMixer::MixNinNChannels.
1374  /// Supported ambisonic configurations are full-sphere 1st to 5th order.
1375  /// \return
1376  /// - \c AK_InvalidParameter if in_cfgAmbisonics is not an ambisonic configuration.
1377  /// - \c AK_InvalidParameter if in_cfgAmbisonics does not have enough channel for a valid ambisonic configuration of the specified order.
1378  /// - \c AK_InvalidParameter if in_samples contains non-normalized vectors (not unity length).
1379  /// - \c AK_Success otherwise.
1381  const AkVector in_samples[], ///< Array of vector samples expressed in left-handed cartesian coordinates, where (1,0,0) points towards the right and (0,1,0) points towards the top. Vectors must be normalized.
1382  AkUInt32 in_uNumSamples, ///< Number of points in in_samples.
1383  AkChannelConfig in_cfgAmbisonics, ///< Ambisonic configuration. Supported configurations are 1st to 5th order. Determines number of rows (input channels) in matrix out_mxVolume.
1384  AK::SpeakerVolumes::MatrixPtr out_mxVolume ///< Returned volume matrix of in_cfgAmbisonics.uNumChannels rows x in_uNumSamples colums. Must be allocated prior to calling this function with the size returned by AK::SpeakerVolumes::Matrix::GetRequiredSize() for the desired number of channels.
1385  ) = 0;
1386 
1387  /// Return an acoustic texture.
1388  /// \return The pointer to an acoustic texture if successful, NULL otherwise.
1390  AkAcousticTextureID in_AcousticTextureID ///< Acoustic Texture's ID
1391  ) = 0;
1392 
1393  /// Given an emitter-listener pair, compute the azimuth and elevation angles of the emitter relative to the listener.
1394  /// \return AK_Success if the listener referenced in the emitter-listener pair was found; azimuth and elevation.
1396  const AkEmitterListenerPair & in_pair, ///< Emitter-listener pair for which to compute azimuth and elevation angles.
1397  AkReal32 & out_fAzimuth, ///< Returned azimuthal angle, in radians.
1398  AkReal32 & out_fElevation ///< Returned elevation angle, in radians.
1399  ) const = 0;
1400 
1401  /// Get the platform init settings that the wwise sound engine has been initialized with.
1402  /// This function returns a null pointer if called with an instance of RenderFXGlobalContext.
1404 
1405  /// Get the init settings that the wwise sound engine has been initialized with
1406  /// This function returns a null pointer if called with an instance of RenderFXGlobalContext.
1407  virtual const AkInitSettings* GetInitSettings() const = 0;
1408 
1409  /// Gets the configured audio settings.
1410  /// Call this function to get the configured audio settings.
1411  ///
1412  /// \warning This function is not thread-safe.
1413  /// \warning Call this function only after the sound engine has been properly initialized.
1415  AkAudioSettings & out_audioSettings ///< Returned audio settings
1416  ) const = 0;
1417 
1418  /// Universal converter from string to ID for the sound engine.
1419  /// Calls AK::SoundEngine::GetIDFromString.
1420  /// \sa
1421  /// - <tt>AK::SoundEngine::GetIDFromString</tt>
1422  virtual AkUInt32 GetIDFromString(const char* in_pszString) const = 0;
1423 
1424  /// Synchronously posts an Event to the sound engine (by event ID).
1425  /// The callback function can be used to be noticed when markers are reached or when the event is finished.
1426  /// An array of wave file sources can be provided to resolve External Sources triggered by the event.
1427  /// \return The playing ID of the event launched, or AK_INVALID_PLAYING_ID if posting the event failed
1428  /// \remarks
1429  /// This function executes the actions contained in the event without going through the message queue.
1430  /// In order to do so it acquires the global Wwise sound engine lock. It should therefore only be called from one of the
1431  /// global engine hooks (see AK::IAkGlobalPluginContext::RegisterGlobalCallback).
1432  /// Use AK::IAkGlobalPluginContext::GetIDFromString() if you use event names (strings).
1433  /// \sa
1434  /// - <tt>AK::SoundEngine::PostEvent</tt>
1435  /// - <tt>AK::IAkGlobalPluginContext::RegisterGlobalCallback</tt>
1436  /// - <tt>AK::IAkGlobalPluginContext::GetIDFromString</tt>
1438  AkUniqueID in_eventID, ///< Unique ID of the event
1439  AkGameObjectID in_gameObjectID, ///< Associated game object ID
1440  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
1441  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
1442  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
1443  AkUInt32 in_cExternals = 0, ///< Optional count of external source structures
1444  AkExternalSourceInfo *in_pExternalSources = NULL,///< Optional array of external source resolution information
1445  AkPlayingID in_PlayingID = AK_INVALID_PLAYING_ID///< Optional (advanced users only) Specify the playing ID to target with the event. Will Cause active actions in this event to target an existing Playing ID. Let it be AK_INVALID_PLAYING_ID or do not specify any for normal playback.
1446  ) = 0;
1447 
1448  /// Executes a number of MIDI Events on all nodes that are referenced in the specified Event in an Action of type Play.
1449  /// Each MIDI event will be posted in AkMIDIPost::uOffset samples from the start of the current frame. The duration of
1450  /// a sample can be determined from the sound engine's audio settings, via a call to AK::IAkGlobalPluginContext::GetAudioSettings.
1451  /// \remarks
1452  /// This function executes the MIDI Events without going through the message queue.
1453  /// In order to do so it acquires the global Wwise sound engine lock. It should therefore only be called from one of the
1454  /// global engine hooks (see AK::IAkGlobalPluginContext::RegisterGlobalCallback).
1455  /// Use AK::IAkGlobalPluginContext::GetIDFromString() if you use event names (strings).
1456  /// \sa
1457  /// - <tt>AK::SoundEngine::PostMIDIOnEvent</tt>
1458  /// - <tt>AK::IAkGlobalPluginContext::GetAudioSettings</tt>
1459  /// - <tt>AK::IAkGlobalPluginContext::StopMIDIOnEventSync</tt>
1460  /// - <tt>AK::IAkGlobalPluginContext::RegisterGlobalCallback</tt>
1461  /// - <tt>AK::IAkGlobalPluginContext::GetIDFromString</tt>
1463  AkUniqueID in_eventID, ///< Unique ID of the Event
1464  AkGameObjectID in_gameObjectID, ///< Associated game object ID
1465  AkMIDIPost* in_pPosts, ///< MIDI Events to post
1466  AkUInt16 in_uNumPosts, ///< Number of MIDI Events to post
1467  bool in_bAbsoluteOffsets = false, ///< Whether AkMIDIPost::uOffset values are relative to current frame or absolute
1468  AkUInt32 in_uFlags = 0, ///< Bitmask: see \ref AkCallbackType
1469  AkCallbackFunc in_pfnCallback = NULL, ///< Callback function
1470  void * in_pCookie = NULL, ///< Callback cookie that will be sent to the callback function along with additional information
1471  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
1472  ) = 0;
1473 
1474  /// Stops MIDI notes on all nodes that are referenced in the specified event in an action of type play,
1475  /// with the specified Game Object. Invalid parameters are interpreted as wildcards. For example, calling
1476  /// this function with in_eventID set to AK_INVALID_UNIQUE_ID will stop all MIDI notes for Game Object
1477  /// in_gameObjectID.
1478  /// \remarks
1479  /// This function stops the MIDI notes without going through the message queue.
1480  /// In order to do so it acquires the global Wwise sound engine lock. It should therefore only be called from one of the
1481  /// global engine hooks (see AK::IAkGlobalPluginContext::RegisterGlobalCallback).
1482  /// Use AK::IAkGlobalPluginContext::GetIDFromString() if you use event names (strings).
1483  /// \sa
1484  /// - <tt>AK::IAkGlobalPluginContext::PostMIDIOnEvent</tt>
1485  /// - <tt>AK::IAkGlobalPluginContext::GetIDFromString</tt>
1487  AkUniqueID in_eventID = AK_INVALID_UNIQUE_ID, ///< Unique ID of the Event
1488  AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT, ///< Associated game object ID
1489  AkPlayingID in_playingID = AK_INVALID_PLAYING_ID ///< Target playing ID
1490  ) = 0;
1491 
1492  /// \return The gateway to platform-specific functionality
1493  /// \sa IAkPlatformContext
1495 
1496  /// Retrieves a plug-in service to provide specific "helper" functionality. Note that each service should provide
1497  /// macros that handle the casting to the appropriate service, and are recommended instead of calling this directly.
1498  /// Note that all plug-in service are statically allocated, and any references to them can be cached without lifetime checks.
1500  AkPluginServiceType in_pluginService ///< Enum value for the specific plug-in service to fetch
1501  ) const = 0;
1502 
1503  /// Obtains the current audio output buffer tick. This corresponds to the number of buffers produced by
1504  /// the sound engine since initialization.
1505  /// \return Tick count.
1506  virtual AkUInt32 GetBufferTick() const = 0;
1507  };
1508 
1509  /// Interface for the "Mixer" plug-in service, to handle mixing together of signals, or applying simple transforms
1511  {
1512  protected:
1514  public:
1515  /// N to N channels mix
1516  virtual void MixNinNChannels(
1517  AkAudioBuffer* in_pInputBuffer, ///< Input multichannel buffer.
1518  AkAudioBuffer* in_pMixBuffer, ///< Multichannel buffer with which the input buffer is mixed.
1519  AkReal32 in_fPrevGain, ///< Gain, corresponding to the beginning of the buffer, to apply uniformly to each mixed channel.
1520  AkReal32 in_fNextGain, ///< Gain, corresponding to the end of the buffer, to apply uniformly to each mixed channel.
1521  AK::SpeakerVolumes::ConstMatrixPtr in_mxPrevVolumes,///< In/out channel volume distribution corresponding to the beginning of the buffer (see AK::SpeakerVolumes::Matrix services).
1522  AK::SpeakerVolumes::ConstMatrixPtr in_mxNextVolumes ///< In/out channel volume distribution corresponding to the end of the buffer (see AK::SpeakerVolumes::Matrix services).
1523  ) = 0;
1524 
1525  /// 1 to N channels mix
1526  virtual void Mix1inNChannels(
1527  AkReal32* AK_RESTRICT in_pInChannel, ///< Input channel buffer.
1528  AkAudioBuffer* in_pMixBuffer, ///< Multichannel buffer with which the input buffer is mixed.
1529  AkReal32 in_fPrevGain, ///< Gain, corresponding to the beginning of the input channel.
1530  AkReal32 in_fNextGain, ///< Gain, corresponding to the end of the input channel.
1531  AK::SpeakerVolumes::ConstVectorPtr in_vPrevVolumes, ///< Output channel volume distribution corresponding to the beginning of the buffer (see AK::SpeakerVolumes::Vector services).
1532  AK::SpeakerVolumes::ConstVectorPtr in_vNextVolumes ///< Output channel volume distribution corresponding to the end of the buffer (see AK::SpeakerVolumes::Vector services).
1533  ) = 0;
1534 
1535  /// Single channel mix
1536  virtual void MixChannel(
1537  AkReal32* AK_RESTRICT in_pInBuffer, ///< Input channel buffer.
1538  AkReal32* AK_RESTRICT in_pOutBuffer, ///< Output channel buffer.
1539  AkReal32 in_fPrevGain, ///< Gain, corresponding to the beginning of the input channel.
1540  AkReal32 in_fNextGain, ///< Gain, corresponding to the end of the input channel.
1541  AkUInt16 in_uNumFrames ///< Number of frames to mix.
1542  ) = 0;
1543 
1544  /// Given non-interleaved audio in the provided in_pInputBuffer, will apply a ramping gain over the number
1545  /// of frames specified, and store the result in in_pOutputBuffer. Channel data from in_pInputBuffer will also be
1546  /// interleaved in in_pOutputBuffer's results, and optionally converted from 32-bit floats to 16-bit integers.
1548  AkAudioBuffer* in_pInputBuffer, ///< Input audioBuffer data
1549  AkAudioBuffer* in_pOutputBuffer, ///< Output audioBuffer data
1550  AkRamp in_gain, ///< Ramping gain to apply over duration of buffer
1551  bool in_convertToInt16 ///< Whether the input data should be converted to int16
1552  ) const = 0;
1553 
1554  /// Given non-interleaved audio in the provided in_pInputBuffer, will apply a ramping gain over the number
1555  /// of frames specified, and store the result in in_pOutputBuffer. Audio data in in_pOutputBuffer will have
1556  /// the same layout as in_pInputBuffer, and optionally converted from 32-bit floats to 16-bit integers.
1557  virtual void ApplyGain(
1558  AkAudioBuffer* in_pInputBuffer, ///< Input audioBuffer data
1559  AkAudioBuffer* in_pOutputBuffer, ///< Output audioBuffer data
1560  AkRamp in_gain, ///< Ramping gain to apply over duration of buffer
1561  bool in_convertToInt16 ///< Whether the input data should be converted to int16
1562  ) const = 0;
1563 
1564  // Applies a biquadfilter to in_uNumSamples # of samples of each channel using the input provided, to the output buffer,
1565  // with one set of coefficients for all channels, and an array of memories (one instance per channel)
1566  // (no mixing in the output occurs; the output buffer will be entirely replaced, and can be the same as the input buffer)
1567  virtual void ProcessBiquadFilter(
1568  AkAudioBuffer* in_pInputBuffer, ///< Input audioBuffer data
1569  AkAudioBuffer* io_pOutputBuffer, ///< Output audioBuffer data
1570  AK::AkBiquadCoefficients* in_pCoefs, ///< Pointer to coefficients to use for processing
1571  AK::AkBiquadMemories* io_pMemories, ///< Array of memories to use for processing (one instance per channel in the inputBuffer)
1572  AkUInt32 in_uNumSamples ///< Number of samples to process in each channel
1573  ) = 0;
1574 
1575  // Applies in_uNumInterpStages sets of biquadfilters to each channel of in_ppInputData (in_uNumInputs # of channels),
1576  // processing in_pNumSamplesPerInterpStage number of samples per stage. in_ppCoefs should be in_uNumInputs * in_uNumInterpStages long,
1577  // with in_uNumInputs coefficients for each stage of the process, with each coefficient being applied for each channel.
1578  // (no mixing in the output occurs; the output buffer will be entirely replaced, and can be the same as the input buffer)
1580  AkReal32** in_ppInputData, ///< Array of input buffers to process
1581  AkReal32** io_ppOutputData, ///< Array of output buffers to store results
1582  AK::AkBiquadCoefficients** in_ppCoefs, ///< Array of coefficients to use for processing (one instance per channel)
1583  AK::AkBiquadMemories** io_ppMemories, ///< Array of memories to use for processing (one instance per channel)
1584  AkUInt32* in_pNumSamplesPerInterpStage, ///< Number of samples to process in each channel in each stage of the process
1585  AkUInt32 in_uNumInterpStages, ///< Number of stages of the process to run
1586  AkUInt32 in_uNumChannels ///< Number of channels to process
1587  ) = 0;
1588 
1589  // Applies two biquadfilters to in_uNumSamples # of samples of each channel using the input provided, to the output buffer,
1590  // with two sets of coefficients for all channels, and with two arrays of memories (one instance per channel per biquad)
1591  // (no mixing in the output occurs; the output buffer will be entirely replaced, and can be the same as the input buffer)
1592  // If you have two biquads to run on a given signal, this is slightly faster than calling ProcessBiquadFilter twice
1594  AkAudioBuffer* in_pInputBuffer, ///< Array of input buffers to process
1595  AkAudioBuffer* io_pOutputBuffer, ///< Array of output buffers to store results
1596  AK::AkBiquadCoefficients* in_pCoefs1, ///< Pointer to coefficients to use for processing the first biquad
1597  AK::AkBiquadMemories* io_pMemories1, ///< Array of memories to use for processing the first biquad
1598  AK::AkBiquadCoefficients* in_pCoefs2, ///< Pointer to coefficients to use for processing the second biquad
1599  AK::AkBiquadMemories* io_pMemories2, ///< Array of memories to use for processing the second biquad
1600  AkUInt32 in_uNumSamples ///< Number of samples to process in each channel
1601  ) = 0;
1602 
1603  // Applies two in_uNumInterpStages sets of biquadfilters to each channel of in_ppInputData (in_uNumInputs # of channels),
1604  // processing in_pNumSamplesPerInterpStage number of samples per stage. Each in_ppCoefs should be in_uNumInputs * in_uNumInterpStages long,
1605  // with in_uNumInputs coefficients for each stage of the process, with each coefficient being applied for each channel.
1606  // (no mixing in the output occurs; the output buffer will be entirely replaced, and can be the same as the input buffer)
1607  // If you have two biquads to run on a given signal, this is slightly (~25%) faster than calling ProcessInterpBiquadFilter twice
1609  AkReal32** in_ppInputData, ///< Array of input buffers to process
1610  AkReal32** io_ppOutputData, ///< Array of output buffers to store results
1611  AK::AkBiquadCoefficients** in_ppCoefs1, ///< Array of coefficients to use for processing the first biquad
1612  AK::AkBiquadMemories** io_ppMemories1, ///< Array of memories to use for processing the first biquad
1613  AK::AkBiquadCoefficients** in_ppCoefs2, ///< Array of coefficients to use for processing the second biquad
1614  AK::AkBiquadMemories** io_ppMemories2, ///< Array of memories to use for processing the second biquad
1615  AkUInt32* in_pNumSamplesPerInterpStage, ///< Number of samples to process in each channel in each stage of the process
1616  AkUInt32 in_uNumInterpStages, ///< Number of stages of the process to run
1617  AkUInt32 in_uNumChannels ///< Number of channels to process
1618  ) = 0;
1619  };
1620 
1621  /// Interface for the services related to generating pseudorandom numbers
1622  /// \sa
1623  /// - <tt>AK::SoundEngine::SetRandomSeed()</tt>
1624  /// - <tt>CAkRng</tt>
1626  {
1627  protected:
1629  public:
1630  /// Advances and returns a PRNG seed that a plug-in may use in its own RNG for DSP processing
1631  /// This is the same seed used for the internal sound engine randomization.
1632  virtual AkUInt64 RandomSeed() const = 0;
1633 
1634  /// Advances the internal PRNG seed, and returns a random number generator suitable for DSP processing
1635  virtual CAkRng CreateRNG() const = 0;
1636  };
1637 
1638  /// Interface for the services related to extracting attenuation curves from audio objects and using them.
1640  {
1641  protected:
1643  public:
1644 
1645  /// Obtain the unique ID of the Attenuation curves attached to the provided audio object.
1646  /// \return The unique ID of the Attenuation curves (Shareset or Custom). AK_INVALID_UNIQUE_ID if not the audio object does not have Attenuation curves.
1648  const AkAudioObject& in_object ///< Audio object from which to get the attenuation ID.
1649  ) const = 0;
1650 
1651  /// Extract the curve of a given type from the set of Attenuation curves attached to the given audio object.
1652  /// The curve's data is copied into an opaque data structure, pointed to by out_curve.
1653  /// The curve's data remain until the client of this service calls AK::IAkPluginServiceAttenuationCurve::Delete.
1654  /// \return true if the copy succeeded, or if the requested curve was not initialized.
1655  virtual bool ExtractCurves(
1656  IAkPluginMemAlloc* in_pAllocator, ///< Memory allocator.
1657  const AkAudioObject & in_object, ///< The audio object from which to extract the curve.
1658  AkUInt32 in_curveTypesMask, ///< The set of curves, identified with a mask of bits offset by AkAttenuationCurveType values, to extract from the set of Attenuation curves. For example, set to (1 << AttenuationCurveID_VolumeDry | 1 << AttenuationCurveID_Spread) to obtain the distance-driven dry volume and spread curves.
1659  void* out_curves[] ///< The returned addresses of the requested curve data. Pass in an array of void* with length corresponding to the number of desired curves. For each curve, if it exists, a blob of data is allocated by the function and the address is returned in the corresponding item of the out_curves. The item is set to nullptr if the curve does not exist.
1660  ) const = 0;
1661 
1662  /// Free memory of curve obtained with AK::IAkPluginServiceAttenuationCurve::ExtractCurves.
1663  virtual void Delete(
1664  IAkPluginMemAlloc* in_pAllocator, ///< Memory allocator.
1665  void*& io_attenuationCurve ///< Curve to delete.
1666  ) = 0;
1667 
1668  /// Evaluate the value of a curve at given x coordinate.
1670  void*& io_attenuationCurve, ///< Curve to evaluate.
1671  AkReal32 x ///< Value on the abscissa.
1672  ) = 0;
1673 
1674  /// Some curves are serialized in the log domain. Use this function to convert all the points to linear at once.
1675  virtual void Linearize(void*& io_attenuationCurve) = 0;
1676 
1677  /// Get the ith point of the curve.
1678  virtual const AkRTPCGraphPoint& GetPoint(
1679  const void* in_attenuationCurve, ///< Curve.
1680  AkUInt32 i ///< Point index. Must be between 0 and AK::IAkPluginServiceAttenuationCurve::GetNumPoints-1 inclusively.
1681  ) const = 0;
1682 
1683  /// Get the number of points on a curve.
1685  const void* in_attenuationCurve ///< Curve.
1686  ) const = 0;
1687  };
1688 
1689  /// Interface for the audio object priority service, to retrieve and update playback priority on audio objects.
1690  /// Playback priority of the audio object may be used by the audio endpoint when there are more audio objects than the available hardware objects
1691  /// to determine which audio objects should be mixed as hardware objects in priority and which can be mixed to a lower resolution 3D bed.
1692  /// \sa
1693  /// - <a href="https://www.audiokinetic.com/library/edge/?source=Help&id=defining_playback_priority" target="_blank">Defining Playback Priority</a>
1694  /// - <tt>AkAudioObject</tt>
1695  /// - <tt>AkPriority</tt>
1697  {
1698  protected:
1700  public:
1701  /// Populates <tt>out_pPriorities</tt> with playback priorities for objects in <tt>in_ppObjects</tt>.
1702  virtual void GetPriorities(
1703  AkAudioObject** in_ppObjects, ///< Array of pointers to audio objects to extract priorites from.
1704  AkUInt32 in_uNumObjects, ///< The number of audio objects in <tt>in_ppObjects</tt>. Must correspond to the number of priorites in <tt>out_pPriorities</tt>.
1705  AkPriority* out_pPriorities ///< Priorities to fill from <tt>in_ppObjects</tt>. Must be large enough to contain <tt>in_uNumObjects</tt> priorities.
1706  ) = 0;
1707 
1708  /// Sets the playback priority of each of the <tt>in_uNumObjects</tt> audio objects in <tt>io_ppObjects</tt> from <tt>in_pPriorities</tt>.
1709  virtual void SetPriorities(
1710  AkAudioObject** io_ppObjects, ///< Array of pointers to audio objects for which to update the playback priority.
1711  AkUInt32 in_uNumObjects, ///< The number of audio objects in <tt>in_ppObjects</tt>. Must correspond to the number of priorites in <tt>in_pPriorities</tt>.
1712  AkPriority* in_pPriorities ///< Array of priorities to set on <tt>in_ppObjects</tt>. Must contain <tt>in_uNumObjects</tt> priorities.
1713  ) = 0;
1714  };
1715 
1716  /// Interface for the markers service.
1718  {
1719  protected:
1721  public:
1723  {
1724  public:
1725  /// Submit markers to trigger notifications for registered callback functions. Register callbacks through. Registering a callback can be achieved through the
1726  /// PostEvent function on AK::SoundEngine.
1727  /// \return
1728  /// - \c AK_NotInitialized if no callback functions have been registered.
1729  /// - \c AK_InvalidParameter if in_pMarkers is null.
1730  /// - \c AK_InvalidParameter if in_uOffsetsInBuffer is null.
1731  /// - \c AK_InvalidParameter if in_uNumMarkers is 0.
1732  /// - \c AK_InvalidParameter if any valus in in_uOffsetsInBuffer is greater or equal to the length of the buffer.
1733  /// - \c AK_Success otherwise.
1734  /// \sa
1735  /// - AK::SoundEngine::PostEvent()
1737  const AkAudioMarker* in_pMarkers, ///< Array of AkAudioMarker objects
1738  const AkUInt32* in_uOffsetsInBuffer, ///< Array of buffer offsets for each marker contained in <tt>in_pMarkers</tt>. Must provide a value for each marker in <tt>in_pMarkers</tt>.
1739  AkUInt32 in_uNumMarkers ///< The number of marker objects in <tt> in_pMarkers </tt>
1740  ) = 0;
1741  };
1742 
1744  IAkSourcePluginContext* in_pSourcePluginContext ///< Pointer to the source plugin context
1745  ) = 0;
1746 
1748  IAkMarkerNotificationService* io_pMarkerNotificationService ///< Pointer to the source plugin context
1749  ) = 0;
1750  };
1751 
1752  #define AK_GET_PLUGIN_SERVICE_MIXER(plugin_ctx) static_cast<AK::IAkPluginServiceMixer*>(plugin_ctx->GetPluginService(AK::PluginServiceType_Mixer))
1753  #define AK_GET_PLUGIN_SERVICE_RNG(plugin_ctx) static_cast<AK::IAkPluginServiceRNG*>(plugin_ctx->GetPluginService(AK::PluginServiceType_RNG))
1754  #define AK_GET_PLUGIN_SERVICE_AUDIO_OBJECT_ATTENUATION(plugin_ctx) static_cast<AK::IAkPluginServiceAudioObjectAttenuation*>(plugin_ctx->GetPluginService(AK::PluginServiceType_AudioObjectAttenuation))
1755  #define AK_GET_PLUGIN_SERVICE_AUDIO_OBJECT_PRIORITY(plugin_ctx) static_cast<AK::IAkPluginServiceAudioObjectPriority*>(plugin_ctx->GetPluginService(AK::PluginServiceType_AudioObjectPriority))
1756  #define AK_GET_PLUGIN_SERVICE_MARKERS(plugin_ctx) static_cast<AK::IAkPluginServiceMarkers*>(plugin_ctx->GetPluginService(AK::PluginServiceType_Markers))
1757 
1758  /// This class takes care of the registration of plug-ins in the Wwise engine. Plug-in developers must provide one instance of this class for each plug-in.
1759  /// \sa
1760  /// - \ref soundengine_plugins
1762  {
1763  public:
1765  AkUInt32 /*in_ulCompanyID*/, ///< Plugin company ID.
1766  AkUInt32 /*in_ulPluginID*/ ///< Plugin ID.
1767  )
1768  {
1769  // Placeholder used for plug-in extensions (plug-ins that modify the behavior of an existing plug-in without registering a new ID)
1770  }
1771 
1773  AkPluginType in_eType, ///< Plugin type.
1774  AkUInt32 in_ulCompanyID, ///< Plugin company ID.
1775  AkUInt32 in_ulPluginID, ///< Plugin ID.
1776  AkCreatePluginCallback in_pCreateFunc, ///< Plugin object factory.
1777  AkCreateParamCallback in_pCreateParamFunc, ///< Plugin parameter object factory.
1778  AkGlobalCallbackFunc in_pRegisterCallback = NULL, ///< Optional callback function called after successful plugin registration, with argument AkGlobalCallbackLocation_Register.
1779  void * in_pRegisterCallbackCookie = NULL ///< Optional cookie passed to register callback function above.
1780  )
1782  , m_eType(in_eType)
1783  , m_ulCompanyID(in_ulCompanyID)
1784  , m_ulPluginID(in_ulPluginID)
1785  , m_pCreateFunc(in_pCreateFunc)
1786  , m_pCreateParamFunc(in_pCreateParamFunc)
1787  , m_pFileCreateFunc(NULL) // Legacy
1788  , m_pBankCreateFunc(NULL) // Legacy
1789  , m_pRegisterCallback(in_pRegisterCallback)
1790  , m_pRegisterCallbackCookie(in_pRegisterCallbackCookie)
1792  , m_CodecDescriptor{ nullptr, nullptr, nullptr, nullptr }
1793  {
1794  g_pAKPluginList = this;
1795  }
1796 
1798  AkPluginType in_eType, ///< Plugin type.
1799  AkUInt32 in_ulCompanyID, ///< Plugin company ID.
1800  AkUInt32 in_ulPluginID, ///< Plugin ID.
1801  AkCreatePluginCallback in_pCreateFunc, ///< Plugin object factory.
1802  AkCreateParamCallback in_pCreateParamFunc, ///< Plugin parameter object factory.
1803  AkGetDeviceListCallback in_pGetDeviceListFunc, ///< Plugin parameter object factory.
1804  AkGlobalCallbackFunc in_pRegisterCallback = NULL, ///< Optional callback function called after successful plugin registration, with argument AkGlobalCallbackLocation_Register.
1805  void * in_pRegisterCallbackCookie = NULL ///< Optional cookie passed to register callback function above.
1806  )
1808  , m_eType(in_eType)
1809  , m_ulCompanyID(in_ulCompanyID)
1810  , m_ulPluginID(in_ulPluginID)
1811  , m_pCreateFunc(in_pCreateFunc)
1812  , m_pCreateParamFunc(in_pCreateParamFunc)
1813  , m_pFileCreateFunc(NULL) // Legacy
1814  , m_pBankCreateFunc(NULL) // Legacy
1815  , m_pRegisterCallback(in_pRegisterCallback)
1816  , m_pRegisterCallbackCookie(in_pRegisterCallbackCookie)
1817  , m_pGetDeviceListFunc(in_pGetDeviceListFunc)
1818  , m_CodecDescriptor{ nullptr, nullptr, nullptr, nullptr }
1819  {
1820  g_pAKPluginList = this;
1821  }
1822 
1824  AkUInt32 in_ulCompanyID, ///< Plugin company ID.
1825  AkUInt32 in_ulPluginID, ///< Plugin ID.
1826  AkCreateFileSourceCallback in_pCreateFile, ///< Streamed source factory.
1827  AkCreateBankSourceCallback in_pCreateBank) ///< In-memory source factory.
1830  , m_ulCompanyID(in_ulCompanyID)
1831  , m_ulPluginID(in_ulPluginID)
1832  , m_pCreateFunc(NULL)
1834  , m_pFileCreateFunc(in_pCreateFile) // Legacy
1835  , m_pBankCreateFunc(in_pCreateBank) // Legacy
1839  , m_CodecDescriptor{ in_pCreateFile, in_pCreateBank, nullptr, nullptr }
1840  {
1841  g_pAKPluginList = this;
1842  }
1843 
1845  AkUInt32 in_ulCompanyID, ///< Plugin company ID.
1846  AkUInt32 in_ulPluginID, ///< Plugin ID.
1847  const AkCodecDescriptor &in_Descriptor) ///< Codec descriptor.
1850  , m_ulCompanyID(in_ulCompanyID)
1851  , m_ulPluginID(in_ulPluginID)
1852  , m_pCreateFunc(NULL)
1854  , m_pFileCreateFunc(in_Descriptor.pFileSrcCreateFunc) // Legacy
1855  , m_pBankCreateFunc(in_Descriptor.pBankSrcCreateFunc) // Legacy
1859  , m_CodecDescriptor(in_Descriptor)
1860  {
1861  g_pAKPluginList = this;
1862  }
1863 
1870  AkCreateFileSourceCallback m_pFileCreateFunc; ///< LEGACY: Kept for compatibility with 2019.1. Unused in 2019.2 and up.
1871  AkCreateBankSourceCallback m_pBankCreateFunc; ///< LEGACY: Kept for compatibility with 2019.1. Unused in 2019.2 and up.
1874 
1875  // 2019.2 added parameters
1878  };
1879 }
1880 
1881 #define AK_IMPLEMENT_PLUGIN_FACTORY(_pluginName_, _plugintype_, _companyid_, _pluginid_) \
1882  AK::IAkPlugin* Create##_pluginName_(AK::IAkPluginMemAlloc * in_pAllocator); \
1883  AK::IAkPluginParam * Create##_pluginName_##Params(AK::IAkPluginMemAlloc * in_pAllocator); \
1884  AK_ATTR_USED AK::PluginRegistration _pluginName_##Registration(_plugintype_, _companyid_, _pluginid_, Create##_pluginName_, Create##_pluginName_##Params);
1885 
1886 #define AK_STATIC_LINK_PLUGIN(_pluginName_) \
1887  extern AK::PluginRegistration _pluginName_##Registration; \
1888  void *_pluginName_##_linkonceonly = (void*)&_pluginName_##Registration;
1889 
1890 #define DEFINE_PLUGIN_REGISTER_HOOK AK_DLLEXPORT AK::PluginRegistration * g_pAKPluginList = NULL;
1891 
1892 #define AK_GET_SINK_TYPE_FROM_DEVICE_KEY(_key) ((AkUInt32)(_key & 0xffffffff))
1893 #define AK_GET_DEVICE_ID_FROM_DEVICE_KEY(_key) ((AkUInt32)(_key >> 32))
1894 
1895 #endif // _IAK_PLUGIN_H_
virtual AkUInt16 GetNumRefillsInVoice()=0
Defines the parameters of a marker.
Definition: AkAudioMarker.h:16
Interface to retrieve contextual information for a mixer.
Definition: IAkPlugin.h:443
virtual AKRESULT RegisterPlugin(AkPluginType in_eType, AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkCreatePluginCallback in_pCreateFunc, AkCreateParamCallback in_pCreateParamFunc)=0
AkCreateFileSourceCallback m_pFileCreateFunc
LEGACY: Kept for compatibility with 2019.1. Unused in 2019.2 and up.
Definition: IAkPlugin.h:1870
virtual AKRESULT Init(IAkPluginMemAlloc *in_pAllocator, IAkSinkPluginContext *in_pSinkPluginContext, IAkPluginParam *in_pParams, AkAudioFormat &io_rFormat)=0
virtual void Consume(AkAudioBuffer *in_pMainMix, AkAudioBuffer *in_pPassthroughMix, const AkAudioObjects &in_objects, AkRamp in_gain)=0
virtual AKRESULT SetRTPCValue(AkRtpcID in_rtpcID, AkRtpcValue in_value, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkTimeMs in_uValueChangeDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear, bool in_bBypassInternalValueInterpolation=false)=0
virtual AkUInt64 RandomSeed() const =0
uint16_t AkUInt16
Unsigned 16-bit integer
Software plug-in interface for sink (audio end point) which supports 3D audio features.
Definition: IAkPlugin.h:1055
virtual AkUniqueID GetAudioNodeID() const =0
AkInt32 AkTimeMs
Time in ms
Definition: AkTypes.h:138
Audiokinetic namespace
virtual void ProcessPairedInterpBiquadFilter(AkReal32 **in_ppInputData, AkReal32 **io_ppOutputData, AK::AkBiquadCoefficients **in_ppCoefs1, AK::AkBiquadMemories **io_ppMemories1, AK::AkBiquadCoefficients **in_ppCoefs2, AK::AkBiquadMemories **io_ppMemories2, AkUInt32 *in_pNumSamplesPerInterpStage, AkUInt32 in_uNumInterpStages, AkUInt32 in_uNumChannels)=0
virtual ~IAkPluginParam()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:623
virtual AKRESULT TimeSkip(AkUInt32 in_uFrames)=0
virtual void * GetCookie() const =0
@ PluginServiceType_Markers
Definition: IAkPlugin.h:1198
virtual AkPriority ComputePriorityWithDistance(AkReal32 in_fDistance) const =0
bool bIsDeviceEffect
Plug-in can process final mixes and objects right before sending them to the audio device for output....
Definition: IAkPlugin.h:81
AkPluginServiceType
Definition: IAkPlugin.h:1192
virtual bool IsStarved()=0
virtual IAkGlobalPluginContext * GlobalContext() const =0
virtual const AkRTPCGraphPoint & GetPoint(const void *in_attenuationCurve, AkUInt32 i) const =0
Get the ith point of the curve.
AK_DLLEXPORT AK::PluginRegistration * g_pAKPluginList
Definition: IAkPlugin.h:91
virtual ~IAkGlobalPluginContext()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:1215
virtual AKRESULT Term(IAkPluginMemAlloc *in_pAllocator)=0
Software effect plug-in interface (see 创建声音引擎效果器插件).
Definition: IAkPlugin.h:759
virtual AKRESULT GetDistanceProbe(AkGameObjectID in_uListener, AkWorldTransform &out_position) const =0
virtual CAkRng CreateRNG() const =0
Advances the internal PRNG seed, and returns a random number generator suitable for DSP processing
virtual AKRESULT PostMonitorData(void *in_pData, AkUInt32 in_uDataSize)=0
virtual AKRESULT Init(IAkPluginMemAlloc *in_pAllocator, IAkEffectPluginContext *in_pEffectPluginContext, IAkPluginParam *in_pParams, AkAudioFormat &io_rFormat)=0
virtual void SetPriorities(AkAudioObject **io_ppObjects, AkUInt32 in_uNumObjects, AkPriority *in_pPriorities)=0
Sets the playback priority of each of the in_uNumObjects audio objects in io_ppObjects from in_pPrior...
virtual void ProcessPairedBiquadFilter(AkAudioBuffer *in_pInputBuffer, AkAudioBuffer *io_pOutputBuffer, AK::AkBiquadCoefficients *in_pCoefs1, AK::AkBiquadMemories *io_pMemories1, AK::AkBiquadCoefficients *in_pCoefs2, AK::AkBiquadMemories *io_pMemories2, AkUInt32 in_uNumSamples)=0
#define AK_DLLEXPORT
Wwise sound engine source plug-in interface (see 创建声音引擎源插件).
Definition: IAkPlugin.h:1083
virtual AkPanningRule GetPanningRule() const =0
Returns the panning rule for the output device to which the sink plug-in is attached.
virtual AkUInt16 GetNumLoops() const =0
IAkSoftwareCodec *(* AkCreateFileSourceCallback)(void *in_pCtx)
Registered file source creation function prototype.
Definition: AkTypes.h:1126
virtual void EnableMetering(AkMeteringFlags in_eFlags)=0
AkUInt32 AkRtpcID
Real time parameter control ID
Definition: AkTypes.h:155
virtual AKRESULT IsDataNeeded(AkUInt32 &out_uNumFramesNeeded)=0
virtual ~IAkSinkPluginContext()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:919
virtual IAkMixerPluginContext * GetMixerCtx()=0
virtual bool SupportMediaRelocation() const
Definition: IAkPlugin.h:730
AkCreateParamCallback m_pCreateParamFunc
Definition: IAkPlugin.h:1869
virtual AKRESULT SetParam(AkPluginParamID in_paramID, const void *in_pValue, AkUInt32 in_uParamSize)=0
virtual AKRESULT StopMIDIOnEventSync(AkUniqueID in_eventID=AK_INVALID_UNIQUE_ID, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID)=0
virtual void MixNinNChannels(AkAudioBuffer *in_pInputBuffer, AkAudioBuffer *in_pMixBuffer, AkReal32 in_fPrevGain, AkReal32 in_fNextGain, AK::SpeakerVolumes::ConstMatrixPtr in_mxPrevVolumes, AK::SpeakerVolumes::ConstMatrixPtr in_mxNextVolumes)=0
N to N channels mix
AkUInt64 AkGameObjectID
Game object ID
Definition: AkTypes.h:142
bool bCanRunOnObjectConfig
Plug-in can run on bus with Audio Object configuration. Effect plug-ins are instantiated once per Aud...
Definition: IAkPlugin.h:82
virtual AkUInt32 GetSampleRate() const =0
virtual AKRESULT SendPluginCustomGameData(AkUniqueID in_busID, AkGameObjectID in_busObjectID, AkPluginType in_eType, AkUInt32 in_uCompanyID, AkUInt32 in_uPluginID, const void *in_pData, AkUInt32 in_uSizeInBytes)=0
bool bUsesGainAttribute
Plug-in knows how to process objects separately from the cumulativeGain of the object (or the process...
Definition: IAkPlugin.h:83
AKRESULT
Standard function call result.
Definition: AkTypes.h:213
AKRESULT(* AkGetDeviceListCallback)(AkUInt32 &io_maxNumDevices, AkDeviceDescription *out_deviceDescriptions)
Registered plugin device enumeration function prototype, used for providing lists of devices by plug-...
Definition: IAkPlugin.h:1181
virtual IAkVoicePluginInfo * GetVoiceInfo()=0
void(* AkGlobalCallbackFunc)(AK::IAkGlobalPluginContext *in_pContext, AkGlobalCallbackLocation in_eLocation, void *in_pCookie)
Definition: AkCallback.h:368
AkMeteringFlags
Metering flags. Used for specifying bus metering, through AK::SoundEngine::RegisterBusVolumeCallback(...
Definition: AkTypes.h:1235
virtual AkUniqueID GetAttenuationID(const AkAudioObject &in_object) const =0
bool bIsInPlace
Buffer usage (in-place or not). If true, and the plug-in is an insert effect, it should implement IAk...
Definition: IAkPlugin.h:77
virtual AkUInt32 GetIDFromString(const char *in_pszString) const =0
AkSinkPluginType
Definition: IAkPlugin.h:968
virtual AKRESULT ComputeWeightedAmbisonicsDecodingFromSampledSphere(const AkVector in_samples[], AkUInt32 in_uNumSamples, AkChannelConfig in_cfgAmbisonics, AK::SpeakerVolumes::MatrixPtr out_mxVolume)=0
AkCreatePluginCallback m_pCreateFunc
Definition: IAkPlugin.h:1868
Common interface for plug-in services accessed through the global plug-in context
Definition: IAkPlugin.h:1204
virtual ~IAkAudioDeviceEffectPlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:891
Definition: AkRng.h:35
Interface for the "Mixer" plug-in service, to handle mixing together of signals, or applying simple t...
Definition: IAkPlugin.h:1511
virtual ~IAk3DAudioSinkPlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:1058
virtual AkPriority GetPriority() const =0
PluginRegistration(AkUInt32, AkUInt32)
Definition: IAkPlugin.h:1764
virtual ~IAkGameObjectPluginInfo()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:105
virtual ~IAkPluginContextBase()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:243
AkUInt32 AkChannelMask
Channel mask (similar to WAVE_FORMAT_EXTENSIBLE). Bit values are defined in AkSpeakerConfig....
Definition: AkTypes.h:163
PluginRegistration(AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkCreateFileSourceCallback in_pCreateFile, AkCreateBankSourceCallback in_pCreateBank)
Definition: IAkPlugin.h:1823
virtual void MixChannel(AkReal32 *AK_RESTRICT in_pInBuffer, AkReal32 *AK_RESTRICT in_pOutBuffer, AkReal32 in_fPrevGain, AkReal32 in_fNextGain, AkUInt16 in_uNumFrames)=0
Single channel mix
virtual AKRESULT ComputePlanarVBAPGains(AkReal32 in_fAngle, AkChannelConfig in_outputConfig, AkReal32 in_fCenterPerc, AK::SpeakerVolumes::VectorPtr out_vVolumes)=0
virtual bool ExtractCurves(IAkPluginMemAlloc *in_pAllocator, const AkAudioObject &in_object, AkUInt32 in_curveTypesMask, void *out_curves[]) const =0
uint8_t AkUInt8
Unsigned 8-bit integer
virtual void GetPluginMedia(AkUInt32 in_dataIndex, AkUInt8 *&out_rpData, AkUInt32 &out_rDataSize)=0
Coefficients to be used for application of digital biquad filters
Definition: AkMixerTypes.h:20
virtual void Execute(AkAudioBuffer *io_pBuffer)=0
PluginRegistration(AkPluginType in_eType, AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkCreatePluginCallback in_pCreateFunc, AkCreateParamCallback in_pCreateParamFunc, AkGlobalCallbackFunc in_pRegisterCallback=NULL, void *in_pRegisterCallbackCookie=NULL)
Definition: IAkPlugin.h:1772
virtual IAkProcessorFeatures * GetProcessorFeatures()=0
Return an interface to query processor specific features.
virtual void GetOutputObjects(AkAudioObjects &io_objects)=0
#define NULL
Definition: AkTypes.h:46
float AkReal32
32-bit floating point
PluginRegistration(AkPluginType in_eType, AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkCreatePluginCallback in_pCreateFunc, AkCreateParamCallback in_pCreateParamFunc, AkGetDeviceListCallback in_pGetDeviceListFunc, AkGlobalCallbackFunc in_pRegisterCallback=NULL, void *in_pRegisterCallbackCookie=NULL)
Definition: IAkPlugin.h:1797
@ PluginServiceType_AudioObjectAttenuation
Definition: IAkPlugin.h:1195
@ AK_Success
The operation was successful.
Definition: AkTypes.h:215
virtual AkUInt16 GetMaxBufferLength() const =0
@ AkSinkPluginType_Sink
Definition: IAkPlugin.h:969
bool bCanChangeRate
True for effects whose sample throughput is different between input and output. Effects that can chan...
Definition: IAkPlugin.h:78
virtual void Mix1inNChannels(AkReal32 *AK_RESTRICT in_pInChannel, AkAudioBuffer *in_pMixBuffer, AkReal32 in_fPrevGain, AkReal32 in_fNextGain, AK::SpeakerVolumes::ConstVectorPtr in_vPrevVolumes, AK::SpeakerVolumes::ConstVectorPtr in_vNextVolumes)=0
1 to N channels mix
Position and orientation of game objects in the world (i.e. supports 64-bit-precision position)
Definition: AkTypes.h:493
Emitter-listener pair: Positioning data pertaining to a single pair of emitter and listener.
Definition: AkTypes.h:816
AkPluginInfo()
Constructor for default values
Definition: IAkPlugin.h:63
virtual void Delete(IAkPluginMemAlloc *in_pAllocator, void *&io_attenuationCurve)=0
Free memory of curve obtained with AK::IAkPluginServiceAttenuationCurve::ExtractCurves.
virtual AKRESULT GetGameObjectPosition(AkUInt32 in_uIndex, AkSoundPosition &out_position) const =0
virtual AKRESULT GetPluginInfo(AkPluginInfo &out_rPluginInfo)=0
Software interface for sink (audio endpoint) plugins.
Definition: IAkPlugin.h:1031
virtual bool IsSendModeEffect() const =0
virtual void OnFrameEnd()=0
virtual AKRESULT PostMonitorMessage(const char *in_pszError, AK::Monitor::ErrorLevel in_eErrorLevel)=0
Software effect plug-in interface for out-of-place processing (see 创建声音引擎效果器插件).
Definition: IAkPlugin.h:803
AkReal32 * VectorPtr
Volume vector. Access each element with the standard bracket [] operator.
virtual ~IAkMixerPluginContext()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:446
virtual AkSinkPluginType GetSinkPluginType() const override final
Definition: IAkPlugin.h:1078
virtual void GetPriorities(AkAudioObject **in_ppObjects, AkUInt32 in_uNumObjects, AkPriority *out_pPriorities)=0
Populates out_pPriorities with playback priorities for objects in in_ppObjects.
@ PluginServiceType_MAX
Definition: IAkPlugin.h:1199
@ PluginServiceType_HashTable
Definition: IAkPlugin.h:1197
virtual AkPlayingID GetPlayingID() const =0
Retrieve the Playing ID of the event corresponding to this voice (if applicable).
Interface for the services related to extracting attenuation curves from audio objects and using them...
Definition: IAkPlugin.h:1640
AkUInt32 AkUniqueID
Unique 32-bit ID
Definition: AkTypes.h:134
virtual AKRESULT SubmitMarkerNotifications(const AkAudioMarker *in_pMarkers, const AkUInt32 *in_uOffsetsInBuffer, AkUInt32 in_uNumMarkers)=0
Configured audio settings
Definition: AkTypes.h:304
virtual AKRESULT SignalAudioThread()=0
@ PluginServiceType_RNG
Definition: IAkPlugin.h:1194
AkUInt32 AkPluginID
Source or effect plug-in ID
Definition: AkTypes.h:145
virtual AkReal32 GetEnvelope() const
Definition: IAkPlugin.h:1113
virtual void Execute(const AkAudioObjects &io_objects)=0
virtual AKRESULT Init(IAkPluginMemAlloc *in_pAllocator, const void *in_pParamsBlock, AkUInt32 in_uBlockSize)=0
AkCodecDescriptor m_CodecDescriptor
Definition: IAkPlugin.h:1877
virtual bool CanPostMonitorData()=0
AkUInt32 AkAcousticTextureID
Acoustic Texture ID
Definition: AkTypes.h:165
virtual void Execute(AkAudioBuffer *in_pBuffer, AkUInt32 in_uInOffset, AkAudioBuffer *out_pBuffer)=0
virtual AkMIDIEvent GetMidiEvent() const =0
virtual AKRESULT GetSinkChannelConfig(AkChannelConfig &out_sinkConfig, Ak3DAudioSinkCapabilities &out_3dAudioCaps) const =0
AkPluginType eType
Plug-in type
Definition: IAkPlugin.h:75
virtual ~IAkVoicePluginInfo()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:220
Spherical coordinates.
Definition: AkTypes.h:810
virtual void Consume(AkAudioBuffer *in_pInputBuffer, AkRamp in_gain)=0
virtual AkUInt32 GetBusType()=0
virtual AKRESULT ComputeSphericalVBAPGains(void *in_pPannerData, AkReal32 in_fAzimuth, AkReal32 in_fElevation, AkUInt32 in_uNumChannels, AK::SpeakerVolumes::VectorPtr out_vVolumes)=0
virtual AKRESULT InitSphericalVBAP(AK::IAkPluginMemAlloc *in_pAllocator, const AkSphericalCoord *in_SphericalPositions, const AkUInt32 in_NbPoints, void *&out_pPannerData)=0
const AkReal32 * ConstMatrixPtr
Constant volume matrix. Access each input channel vector with AK::SpeakerVolumes::Matrix::GetChannel(...
virtual IAkPluginParam * Clone(IAkPluginMemAlloc *in_pAllocator)=0
AkGetDeviceListCallback m_pGetDeviceListFunc
Definition: IAkPlugin.h:1876
Volume ramp specified by end points "previous" and "next".
Definition: AkTypes.h:957
AkInt8 AkPriority
Priority
Definition: AkTypes.h:149
Voice-specific information available to plug-ins.
Definition: IAkPlugin.h:217
virtual AkSinkPluginType GetSinkPluginType() const =0
virtual const AkAcousticTexture * GetAcousticTexture(AkAcousticTextureID in_AcousticTextureID)=0
void(* AkCallbackFunc)(AkCallbackType in_eType, AkCallbackInfo *in_pCallbackInfo)
Definition: AkCallback.h:266
virtual AKRESULT ComputeSphericalCoordinates(const AkEmitterListenerPair &in_pair, AkReal32 &out_fAzimuth, AkReal32 &out_fElevation) const =0
virtual IAkMarkerNotificationService * CreateMarkerNotificationService(IAkSourcePluginContext *in_pSourcePluginContext)=0
@ PluginServiceType_AudioObjectPriority
Definition: IAkPlugin.h:1196
virtual AKRESULT GetOutputID(AkUInt32 &out_uOutputID, AkPluginID &out_uDevicePlugin) const =0
virtual AKRESULT Term(IAkPluginMemAlloc *in_pAllocator)=0
virtual AKRESULT TimeSkip(AkUInt32 &)
Definition: IAkPlugin.h:1151
PluginRegistration(AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, const AkCodecDescriptor &in_Descriptor)
Definition: IAkPlugin.h:1844
virtual void Execute(AkAudioBuffer *io_pBuffer)=0
void * m_pRegisterCallbackCookie
Definition: IAkPlugin.h:1873
AkCurveInterpolation
Curve interpolation types
Definition: AkTypes.h:924
virtual ~IAkSourcePluginContext()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:419
#define AK_CALLBACK(_type, _name)
AkPanningRule
Headphone / speakers panning rules
Definition: AkTypes.h:1209
virtual bool GetListeners(AkGameObjectID *out_aListenerIDs, AkUInt32 &io_uSize) const =0
virtual ~IAkPluginServiceRNG()
Definition: IAkPlugin.h:1628
virtual bool IsRenderingOffline() const =0
virtual AKRESULT Compute3DPositioning(AkReal32 in_fAngle, AkReal32 in_fElevation, AkReal32 in_fSpread, AkReal32 in_fFocus, AkChannelConfig in_inputConfig, AkChannelMask in_uInputChanSel, AkChannelConfig in_outputConfig, AkReal32 in_fCenterPerc, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
@ AK_NotImplemented
This feature is not implemented.
Definition: AkTypes.h:214
virtual ~IAkPluginService()
Definition: IAkPlugin.h:1206
virtual AKRESULT GetParentChannelConfig(AkChannelConfig &out_channelConfig) const =0
virtual IAkPluginService * GetPluginService(AkPluginServiceType in_pluginService) const =0
virtual AKRESULT SetParamsBlock(const void *in_pParamsBlock, AkUInt32 in_uBlockSize)=0
Software effect plug-in interface for in-place processing (see 创建声音引擎效果器插件).
Definition: IAkPlugin.h:779
virtual void Execute(const AkAudioObjects &in_objects, const AkAudioObjects &out_objects)=0
static const AkUniqueID AK_INVALID_UNIQUE_ID
Invalid unique 32-bit ID
Definition: AkTypes.h:177
virtual AKRESULT Init(IAkPluginMemAlloc *in_pAllocator, IAkAudioDeviceEffectPluginContext *in_pEffectPluginContext, IAkPluginParam *in_pParams, const AkAudioFormat &in_rFormat, const Ak3DAudioSinkCapabilities &in_3dCapabilities)=0
AkPluginType
Definition: AkTypes.h:1249
virtual AkReal32 GetGameObjectScaling() const =0
virtual void ResetStarved()=0
Reset the "starvation" flag after IsStarved() returned true.
virtual AKRESULT RelocateMedia(AkUInt8 *, AkUInt8 *)
Definition: IAkPlugin.h:747
@ AkCurveInterpolation_Linear
Linear (Default)
Definition: AkTypes.h:931
@ PluginServiceType_Mixer
Definition: IAkPlugin.h:1193
virtual IAkVoicePluginInfo * GetVoiceInfo()=0
static const AkPlayingID AK_INVALID_PLAYING_ID
Invalid playing ID
Definition: AkTypes.h:179
virtual AKRESULT ComputeSpeakerVolumesDirect(AkChannelConfig in_inputConfig, AkChannelConfig in_outputConfig, AkReal32 in_fCenterPerc, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
virtual AkReal32 GetDownstreamGain()=0
virtual AkReal32 Evaluate(void *&io_attenuationCurve, AkReal32 x)=0
Evaluate the value of a curve at given x coordinate.
bool bReserved
Legacy bIsAsynchronous plug-in flag, now unused. Preserved for plug-in backward compatibility....
Definition: IAkPlugin.h:79
Positioning data of 3D audio objects.
Definition: AkCommonDefs.h:289
A collection of audio objects. Encapsulates the audio data and metadata of each audio object in separ...
Definition: AkCommonDefs.h:661
uint64_t AkUInt64
Unsigned 64-bit integer
virtual AKRESULT TimeSkip(AkUInt32 &io_uFrames)=0
virtual IAkGameObjectPluginInfo * GetGameObjectInfo()=0
virtual AKRESULT ComputePositioning(const AkPositioningData &in_posData, AkChannelConfig in_inputConfig, AkChannelConfig in_outputConfig, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
virtual AKRESULT UnregisterGlobalCallback(AkGlobalCallbackFunc in_pCallback, AkUInt32 in_eLocation=AkGlobalCallbackLocation_BeginRender)=0
virtual void ApplyGain(AkAudioBuffer *in_pInputBuffer, AkAudioBuffer *in_pOutputBuffer, AkRamp in_gain, bool in_convertToInt16) const =0
AkUInt32 uBuildVersion
Plug-in build version, must match the AK_WWISESDK_VERSION_COMBINED macro from AkWwiseSDKVersion....
Definition: IAkPlugin.h:76
AkReal32 * MatrixPtr
Volume matrix. Access each input channel vector with AK::SpeakerVolumes::Matrix::GetChannel().
virtual AKRESULT Reset()=0
AK::IAkPluginParam *(* AkCreateParamCallback)(AK::IAkPluginMemAlloc *in_pAllocator)
Registered plugin parameter node creation function prototype.
Definition: IAkPlugin.h:1179
virtual void Get3DAudioCapabilities(Ak3DAudioSinkCapabilities &out_rCapabilities)=0
Returns the capabilities of the sink's 3D audio system
virtual ~IAkEffectPlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:762
virtual ~IAkSinkPlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:1034
virtual AKRESULT GetAudioSettings(AkAudioSettings &out_audioSettings) const =0
virtual IAkPlatformContext * GetPlatformContext() const =0
virtual AKRESULT StopLooping()
Definition: IAkPlugin.h:1127
PluginRegistration * pNext
Definition: IAkPlugin.h:1864
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:176
virtual AkPlayingID PostEventSync(AkUniqueID in_eventID, AkGameObjectID in_gameObjectID, AkUInt32 in_uFlags=0, AkCallbackFunc in_pfnCallback=NULL, void *in_pCookie=NULL, AkUInt32 in_cExternals=0, AkExternalSourceInfo *in_pExternalSources=NULL, AkPlayingID in_PlayingID=AK_INVALID_PLAYING_ID)=0
virtual AKRESULT ComputePositioning(const AkPositioningData &in_posData, AkChannelConfig in_inputConfig, AkChannelConfig in_outputConfig, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
virtual ~IAkPluginServiceMarkers()
Definition: IAkPlugin.h:1720
virtual void ApplyGainAndInterleave(AkAudioBuffer *in_pInputBuffer, AkAudioBuffer *in_pOutputBuffer, AkRamp in_gain, bool in_convertToInt16) const =0
virtual ~IAkSourcePlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:1086
virtual AkSinkPluginType GetSinkPluginType() const override final
Definition: IAkPlugin.h:1050
Type for a point in an RTPC or Attenuation curve.
Definition: AkTypes.h:975
uint32_t AkUInt32
Unsigned 32-bit integer
AkInt16 AkPluginParamID
Source or effect plug-in parameter ID
Definition: AkTypes.h:148
virtual ~IAkPlugin()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:694
AkSpeakerPanningType
Speaker panning type: type of panning logic when object is not 3D spatialized (i.e....
Definition: AkTypes.h:1183
@ AkPluginTypeNone
Unknown/invalid plug-in type.
Definition: AkTypes.h:1250
virtual AKRESULT GetEmitterListenerPair(AkUInt32 in_uIndex, AkEmitterListenerPair &out_emitterListenerPair) const =0
Definition: AkMidiTypes.h:237
Game object information available to plugins.
Definition: IAkPlugin.h:102
virtual void ProcessBiquadFilter(AkAudioBuffer *in_pInputBuffer, AkAudioBuffer *io_pOutputBuffer, AK::AkBiquadCoefficients *in_pCoefs, AK::AkBiquadMemories *io_pMemories, AkUInt32 in_uNumSamples)=0
virtual AK::IAkPluginMemAlloc * GetAllocator()=0
Get the default allocator for plugins. This is useful for performing global initialization tasks shar...
virtual AKRESULT Compute3DPositioning(const AkWorldTransform &in_emitter, const AkWorldTransform &in_listener, AkReal32 in_fCenterPerc, AkReal32 in_fSpread, AkReal32 in_fFocus, AkChannelConfig in_inputConfig, AkChannelMask in_uInputChanSel, AkChannelConfig in_outputConfig, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
virtual AKRESULT CreateOutputObjects(AkChannelConfig in_channelConfig, AkAudioObjects &io_objects)=0
virtual AKRESULT Init(IAkPluginMemAlloc *in_pAllocator, IAkSourcePluginContext *in_pSourcePluginContext, IAkPluginParam *in_pParams, AkAudioFormat &io_rFormat)=0
3D vector for some operations in 3D space. Typically intended only for localized calculations due to ...
Definition: AkTypes.h:444
Interface for the markers service.
Definition: IAkPlugin.h:1718
@ AkPluginTypeCodec
Compressor/decompressor plug-in (allows support for custom audio file types).
Definition: AkTypes.h:1251
virtual AKRESULT Seek(AkUInt32)
Definition: IAkPlugin.h:1141
virtual ~IAkEffectPluginContext()
Virtual destructor on interface to avoid warnings.
Definition: IAkPlugin.h:361
virtual AkGameObjectID GetGameObjectID() const =0
Get the ID of the game object.
AkReal32 AkRtpcValue
Real time parameter control value
Definition: AkTypes.h:156
@ AkSinkPluginType_3DAudioSink
Definition: IAkPlugin.h:970
virtual const AkPlatformInitSettings * GetPlatformInitSettings() const =0
AkGlobalCallbackFunc m_pRegisterCallback
Definition: IAkPlugin.h:1872
virtual bool IsPrimary()=0
"Memories" storing the previous state of the digital biquad filter
Definition: AkMixerTypes.h:45
virtual void TerminateMarkerNotificationService(IAkMarkerNotificationService *io_pMarkerNotificationService)=0
virtual AKRESULT ComputeSpeakerVolumesPanner(AkSpeakerPanningType in_ePannerType, const AkVector &in_position, AkReal32 in_fCenterPct, AkChannelConfig in_inputConfig, AkChannelConfig in_outputConfig, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
Listener information.
Definition: AkTypes.h:910
virtual AkUInt32 GetBufferTick() const =0
virtual const AkInitSettings * GetInitSettings() const =0
virtual AKRESULT PostMonitorMessage(const char *in_pszError, AK::Monitor::ErrorLevel in_eErrorLevel)=0
virtual SoundEngine::MultiPositionType GetGameObjectMultiPositionType() const =0
bool bCanProcessObjects
Plug-in can process audio objects. They must implement IAkInPlaceObjectPlugin or IAkOutOfPlaceObjectP...
Definition: IAkPlugin.h:80
virtual AkUInt32 GetNumPoints(const void *in_attenuationCurve) const =0
Get the number of points on a curve.
virtual void ProcessInterpBiquadFilter(AkReal32 **in_ppInputData, AkReal32 **io_ppOutputData, AK::AkBiquadCoefficients **in_ppCoefs, AK::AkBiquadMemories **io_ppMemories, AkUInt32 *in_pNumSamplesPerInterpStage, AkUInt32 in_uNumInterpStages, AkUInt32 in_uNumChannels)=0
virtual void Execute(AkAudioBuffer *io_pMainMix, AkAudioBuffer *io_pPassthroughMix, const AkAudioObjects &io_objects, AkRamp &io_gain)=0
static const AkPluginParamID ALL_PLUGIN_DATA_ID
Definition: IAkPlugin.h:684
virtual AkPlayingID PostMIDIOnEventSync(AkUniqueID in_eventID, AkGameObjectID in_gameObjectID, AkMIDIPost *in_pPosts, AkUInt16 in_uNumPosts, bool in_bAbsoluteOffsets=false, AkUInt32 in_uFlags=0, AkCallbackFunc in_pfnCallback=NULL, void *in_pCookie=NULL, AkPlayingID in_playingID=AK_INVALID_PLAYING_ID)=0
AkPluginType m_eType
Definition: IAkPlugin.h:1865
ErrorLevel
ErrorLevel
virtual AKRESULT TermSphericalVBAP(AK::IAkPluginMemAlloc *in_pAllocator, void *in_pPannerData)=0
virtual AkUInt32 GetNumEmitterListenerPairs() const =0
virtual ~IAkPluginServiceMixer()
Definition: IAkPlugin.h:1513
AK::IAkPlugin *(* AkCreatePluginCallback)(AK::IAkPluginMemAlloc *in_pAllocator)
Registered plugin creation function prototype.
Definition: IAkPlugin.h:1177
Defines the parameters of an audio buffer format.
Definition: AkCommonDefs.h:63
IAkSoftwareCodec *(* AkCreateBankSourceCallback)(void *in_pCtx)
Registered bank source node creation function prototype.
Definition: AkTypes.h:1128
virtual AKRESULT RegisterCodec(AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkCreateFileSourceCallback in_pFileCreateFunc, AkCreateBankSourceCallback in_pBankCreateFunc)=0
virtual void ComputeAmbisonicsEncoding(AkReal32 in_fAzimuth, AkReal32 in_fElevation, AkChannelConfig in_cfgAmbisonics, AK::SpeakerVolumes::VectorPtr out_vVolumes)=0
AkUInt32 AkPlayingID
Playing ID
Definition: AkTypes.h:137
virtual AkReal32 GetDuration() const =0
virtual AKRESULT GetSpeakerAngles(AkReal32 *io_pfSpeakerAngles, AkUInt32 &io_uNumAngles, AkReal32 &out_fHeightAngle)=0
virtual void Linearize(void *&io_attenuationCurve)=0
Some curves are serialized in the log domain. Use this function to convert all the points to linear a...
@ AkGlobalCallbackLocation_BeginRender
Start of frame rendering, after having processed game messages.
Definition: AkCallback.h:342
#define AK_RESTRICT
Refers to the __restrict compilation flag available on some platforms
Definition: AkTypes.h:45
const AkReal32 * ConstVectorPtr
Constant volume vector. Access each element with the standard bracket [] operator.
virtual AKRESULT RegisterGlobalCallback(AkPluginType in_eType, AkUInt32 in_ulCompanyID, AkUInt32 in_ulPluginID, AkGlobalCallbackFunc in_pCallback, AkUInt32 in_eLocation=AkGlobalCallbackLocation_BeginRender, void *in_pCookie=NULL)=0
virtual void GetPluginCustomGameData(void *&out_rpData, AkUInt32 &out_rDataSize)=0
Interface to retrieve contextual information available to all types of plugins.
Definition: IAkPlugin.h:240
virtual AKRESULT ComputePositioning(const AkPositioningData &in_posData, AkChannelConfig in_inputConfig, AkChannelConfig in_outputConfig, AK::SpeakerVolumes::MatrixPtr out_mxVolumes)=0
AkCreateBankSourceCallback m_pBankCreateFunc
LEGACY: Kept for compatibility with 2019.1. Unused in 2019.2 and up.
Definition: IAkPlugin.h:1871
virtual AKRESULT GetListenerData(AkGameObjectID in_uListener, AkListener &out_listener) const =0
virtual AkUInt32 GetNumGameObjectPositions() const =0
virtual IAkStreamMgr * GetStreamMgr() const =0
Retrieve the streaming manager access interface.

此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅