版本

menu_open

Integration Details - Plug-Ins

Introduction

Plug-ins are used in Wwise to offer various types of sources and effects to the Wwise user and game developer. Source plug-ins are used to generate sound, while effect plug-ins are used to modify sound.

Source and effect plug-ins are not to be confused with codec plug-ins. Please refer to Integrating Codec Plug-Ins for information on codec plug-ins.

You can also create your own plug-ins, or use plug-ins developed by someone else. For more information about custom plug-ins, refer to Creating New Plug-ins.

Integrating Plug-Ins in Your Game

If the sound designer decided to use some plug-ins in the Wwise project for your game, these plug-ins need to be integrated into your code for them to be available to the sound engine at runtime.

Linking with Plug-In Libraries

Each plug-in is provided as an individual library (.lib file) that must be linked into your game.

For a complete list of libraries for each plug-in, refer to Source and Effect Plug-ins.

Registering Plug-Ins

A plug-in must be registered by your game code before it can be used. Registering a plug-in is done with a call to AK::SoundEngine::RegisterPlugin(), which is defined as follows:

Register a plug-in with the sound engine and set the callback functions to create the plug-in and its parameter node.
AKRESULT RegisterPlugin( 
    AkPluginType in_eType,                      // Plugin type (e.g. source, effect, etc.)
    AkUInt32 in_ulCompanyID,                    // Company identifier (as declared in the plug-in description XML file)
    AkUInt32 in_ulPluginID,                     // Plug-in identifier (as declared in the plug-in description XML file)
    AkCreatePluginCallback in_pCreateFunc,      // Pointer to the plug-in's creation function
    AkCreateParamCallback in_pCreateParamFunc   // Pointer to the plug-in's parameter node creation function
) = 0;

The first parameter is either AkPluginTypeSource (for a source plug-in) or AkPluginTypeEffect (for an effect plug-in).

The second and third parameters are used to uniquely identify the plug-in you're registering. The Company ID and Plug-in ID are defined by the plug-in developer. For example, plug-ins that are part of the standard Wwise installation define their IDs in individual header files, for example "AK/Plugin/AkRoomVerbFXFactory.h" for the Wwise RoomVerb effect.

The fourth parameter is a pointer to a function that can be used to create an instance of the plug-in, while the fifth parameter points to a function that creates parameters for a plug-in. In the case of standard Wwise plug-ins, these functions are declared in the same header file as the Company and Plug-in IDs, and implemented in the plug-in's library.

The simplest way to register plug-ins is to look at their factory files located under WWISESDK/include/AK/Plugin. To register all available plug-ins, the routines in AllPluginsRegistrationHelpers.h can be helpful. When finalizing your game before shipping, you can register only the plug-ins that are actually used to reduce the size of the your game executable.

For an example of integrating plug-ins, refer to Quick Start Sample Integration - Plug-Ins.

For details about creating your own plug-ins, including important information regarding Company and Plug-in ID, refer to Creating New Plug-ins.


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅