int error = hw_SetAudioAdapter(hwPluginBase *self, ULONG flags, struct hwTagList *tags);
HWPLUG_CAPS_AUDIOADAPTERcapability flag set. This function must only be called from inside your RequirePlugin() implementation. If this function succeeds, Hollywood's inbuilt audio driver will be completely replaced by the audio driver provided by your plugin and Hollywood will call into your plugin whenever it needs to output audio. In the first parameter, you have to pass a pointer to the
hwPluginBasethat Hollywood has passed to your plugin's InitPlugin() function. The second parameter must be set to a combination of flags. The following flags are currently defined:
HWSAAFLAGS_PERMANENTis set, all subsequent calls to
hw_SetAudioAdapter()will fail and your audio adapter will persist.
hw_SetAudioAdapter()equals the currently installed audio adapter. The only parameter that can currently be updated is the
HWSAATAG_BUFFERSIZEattribute. Many audio drivers might not know the optimal buffer size before actually opening the audio device so they might need to adjust the audio adapter's buffer size later. This is what the
HWSAAFLAGS_UPDATEtag is here for.
hw_SetAudioAdapter() accepts a tag list which recognizes the following
hw_SetAudioAdapter(), you may also adjust the buffer size later on by calling
hw_SetAudioAdapter()again, but this time with the
HWSAAFLAGS_UPDATEflag set (see above). By default, Hollywood uses an audio buffer size of 2048 bytes.
See Audio adapter plugins for information on how to write audio adapter plugins.
hwPluginBasepointer passed to InitPlugin()