Table of Contents
Initialization of the sink plugin.
This method prepares the audio device plug-in for data processing, allocates memory, and sets up initial conditions. 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 Allocating/De-allocating Memory in Audio Plug-ins).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. The AK::IAkSinkPluginContext interface allows to retrieve information related to the context in which the audio device plug-in is operated. 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 Communication Between Parameter Nodes and Plug-ins. for more details. 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. 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. Note that the channel configuration is suggestive and may even be specified as !AkChannelConfigIsValid().The plugin is free to determine the true channel configuration(this is an io parameter).