diff options
author | Paul Gilbert | 2018-03-06 07:11:33 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-03-06 07:11:33 -0500 |
commit | b2811fa5673de51a6c1198a10d43e7b5f5218df5 (patch) | |
tree | b8de43b05eba068d4e974f4d0c8b8915657f1969 /engines/xeen/sound.cpp | |
parent | a461a39e4a864a0e850e72322e8771db188b7d4a (diff) | |
download | scummvm-rg350-b2811fa5673de51a6c1198a10d43e7b5f5218df5.tar.gz scummvm-rg350-b2811fa5673de51a6c1198a10d43e7b5f5218df5.tar.bz2 scummvm-rg350-b2811fa5673de51a6c1198a10d43e7b5f5218df5.zip |
XEEN: Change setMusicVolume to setMusicPercent for better range clarity
Diffstat (limited to 'engines/xeen/sound.cpp')
-rw-r--r-- | engines/xeen/sound.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp index a82901efe6..01d65f743e 100644 --- a/engines/xeen/sound.cpp +++ b/engines/xeen/sound.cpp @@ -29,7 +29,7 @@ namespace Xeen { Sound::Sound(Audio::Mixer *mixer) : _mixer(mixer), _fxOn(true), _musicOn(true), - _songData(nullptr), _effectsData(nullptr), _musicSide(0) { + _songData(nullptr), _effectsData(nullptr), _musicSide(0), _musicPercent(100) { _SoundDriver = new AdlibSoundDriver(); } @@ -81,6 +81,7 @@ void Sound::stopAllAudio() { stopSong(); stopFX(); stopSound(); + setMusicPercent(100); } void Sound::setFxOn(bool isOn) { @@ -191,4 +192,12 @@ bool Sound::isMusicPlaying() const { return _SoundDriver->isPlaying(); } +void Sound::setMusicPercent(byte percent) { + assert(percent <= 100); + _musicPercent = percent; + + songCommand(SET_VOLUME, (int)percent * 127 / 100); +} + + } // End of namespace Xeen |