diff options
author | Robert Špalek | 2009-11-12 22:52:00 +0000 |
---|---|---|
committer | Robert Špalek | 2009-11-12 22:52:00 +0000 |
commit | 24ccc94f7983700e7ae89532000b3a080f9a42f0 (patch) | |
tree | 30feb9ad091b7e8b9cbdd0b4f11f1ad2b77cfbd2 /engines | |
parent | fc0c195ea39a2c6026a5a261ab89059db03245d2 (diff) | |
download | scummvm-rg350-24ccc94f7983700e7ae89532000b3a080f9a42f0.tar.gz scummvm-rg350-24ccc94f7983700e7ae89532000b3a080f9a42f0.tar.bz2 scummvm-rg350-24ccc94f7983700e7ae89532000b3a080f9a42f0.zip |
Implemented "Mute All"
svn-id: r45873
Diffstat (limited to 'engines')
-rw-r--r-- | engines/draci/music.cpp | 7 | ||||
-rw-r--r-- | engines/draci/sound.cpp | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/engines/draci/music.cpp b/engines/draci/music.cpp index a46d7d402f..1a0e894316 100644 --- a/engines/draci/music.cpp +++ b/engines/draci/music.cpp @@ -36,7 +36,7 @@ namespace Draci { -MusicPlayer::MusicPlayer(MidiDriver *driver, const char *pathMask) : _parser(0), _driver(driver), _pathMask(pathMask), _looping(false), _isPlaying(false), _passThrough(false), _isGM(false), _track(0) { +MusicPlayer::MusicPlayer(MidiDriver *driver, const char *pathMask) : _parser(0), _driver(driver), _pathMask(pathMask), _looping(false), _isPlaying(false), _passThrough(false), _isGM(false), _track(-1) { memset(_channel, 0, sizeof(_channel)); memset(_channelVolume, 255, sizeof(_channelVolume)); _masterVolume = 0; @@ -210,7 +210,7 @@ void MusicPlayer::stop() { return; debugC(2, kDraciSoundDebugLevel, "Stopping track %d", _track); - _track = 0; + _track = -1; _isPlaying = false; if (_parser) { _parser->unloadMusic(); @@ -232,6 +232,9 @@ void MusicPlayer::resume() { void MusicPlayer::syncVolume() { int volume = ConfMan.getInt("music_volume"); + if (ConfMan.getBool("mute")) { + volume = -1; + } debugC(2, kDraciSoundDebugLevel, "Syncing music volume to %d", volume); setVolume(volume); } diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp index 2d0a8863e9..76a6bf5d8a 100644 --- a/engines/draci/sound.cpp +++ b/engines/draci/sound.cpp @@ -271,6 +271,9 @@ void Sound::setVolume() { } else { _muteSound = _muteVoice = true; } + if (ConfMan.getBool("mute")) { + _muteSound = _muteVoice = true; + } _showSubtitles = ConfMan.getBool("subtitles"); _talkSpeed = ConfMan.getInt("talkspeed"); const int soundVolume = ConfMan.getInt("sfx_volume"); |