DynamicMixer
The dynamic mixer component changes the audio balance of the game at runtime. Its strength lies in the ability to add multiple presets together, each changing the volume or pitch properties of a group component. The properties from each active preset are added together to produce the final volume and pitch values that are then passed to the group components. It is also possible to switch from one preset to another thereby giving a nice, smooth transition of the parameters.
In the dynamic mixer inspector it is possible to create or delete presets that can be called up at any time either from the event trigger component or programmatically using the API.
Inspector Elements
Preset
Presets is simply a collection of group presets with a unique name. Presets can be activated at any moment either from the event trigger component or through the API.
A preset can be persistent which allows it to remain active even when the dynamic mixer receives a reset event action. It can also be activated automatically when an event is posted and remain active for as long as the event is playing. When the event is no longer active the preset will be deactivated.
This is a low CPU usage ducking technique which could be used to replace side-chain when performance is an issue.
Inspector Elements
Group preset
A group preset defines properties that will make a change to an assigned group component. It is possible to change the volume, pitch and specify the duration and curve type (i.e. linear, log, exp) for each property change.
Adding presets at runtime
Adding a preset at runtime could be done either through the event trigger component or the API.
Switch preset at runtime
Sending a “SwitchPreset” event action will cause the mixer to switch from the currently active preset to the target preset.