Plugins that have the capability flag
HWPLUG_CAPS_SOUND set will be called
whenever Hollywood has to load a sample or music. The plugin can check then whether the file is
in a format that the plugin recognizes and if it is, it can open the sound file and
stream the raw PCM data to Hollywood. This makes it possible to load custom sound file
formats with Hollywood.
By default, sound plugins are automatically activated when Hollywood loads them. Starting
with Hollywood 6.0 this behaviour can be changed by setting the
extension bit. If this bit is set, Hollywood will not automatically activate your plugin
at load time. Instead, you will have to manually call hw_AddLoaderAdapter()
to activate your plugin. For example, you could call hw_AddLoaderAdapter()
from your RequirePlugin() implementation. In that case, the sound
plugin would only be activated if the user called
@REQUIRE on it. If you do not
call hw_AddLoaderAdapter() on a plugin that has auto-initialization
disabled, it will only be available if the user addresses it directly through the
See Extension plugins to learn how to use plugin extension bits.
The SDK distribution comes with an example sound plugin which contains a loader for the AIFF sound format. Feel free to study this example code to learn how sound plugins are written in practice.