AWE Core OS 8.B.22 Documentation
|
Using the AudioWeaver Plugin API to create a dynamically loadable list of modules. More...
Functions | |
const AWEPlugin * | AWEPlugin_initialize (const awe_PluginCallbacks *methods) |
AWEPlugin entrypoint method. More... | |
Using the AudioWeaver Plugin API to create a dynamically loadable list of modules.
Plugins will typically be created as follows.
In this example, the plugin struct is a static variable, but it can also be allocated dynamically. In that case, the memory should be freed in the plugin's cleanup function.
For information on how to load these plugins, see Loading a Plugin.
const AWEPlugin * AWEPlugin_initialize | ( | const awe_PluginCallbacks * | methods | ) |
AWEPlugin entrypoint method.
A valid AWE Plugin must implement this method with external linkage. The loader will call it after opening the dynamic library to initialize the plugin. The loader takes ownership of the returned pointer in the sense that it will call its cleanup method when the loader's internal plugin list is freed, however it will not actually call free on the returned pointer directly. This is because many plugins will not need to dynamically allocate their AWEPlugin struct.
[in] | methods | Callbacks which the plugin entrypoint method may use during initialization. |