mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-09 20:34:12 +00:00
![Torbjörn Andersson](/assets/img/avatar_default.png)
There are two ways that the music volume may be set: The setSourceVolume() specifies the current music volume, as ScummVM sees it. This is stored in _sources[].volume. The MIDI data itself can trigger volume events. These are handled by send(), which stores the volume - usually (always?) 100 - in _sources[_curSource].controllers[]. The volume is then adjusted by _sources[].volume. When music is faded out, setSourceVolume() is called repeatedly with progressively smaller values for the volume. What it should do, then, is to make sure that the volume is set to what was previously set to in send(), adjusted to the fading volume. At least, that's how I understand it.