[Scummvm-cvs-logs] SF.net SVN: scummvm:[45873] scummvm/trunk/engines/draci
spalek at users.sourceforge.net
spalek at users.sourceforge.net
Thu Nov 12 23:52:00 CET 2009
Revision: 45873
http://scummvm.svn.sourceforge.net/scummvm/?rev=45873&view=rev
Author: spalek
Date: 2009-11-12 22:52:00 +0000 (Thu, 12 Nov 2009)
Log Message:
-----------
Implemented "Mute All"
Modified Paths:
--------------
scummvm/trunk/engines/draci/music.cpp
scummvm/trunk/engines/draci/sound.cpp
Modified: scummvm/trunk/engines/draci/music.cpp
===================================================================
--- scummvm/trunk/engines/draci/music.cpp 2009-11-12 22:41:14 UTC (rev 45872)
+++ scummvm/trunk/engines/draci/music.cpp 2009-11-12 22:52:00 UTC (rev 45873)
@@ -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 @@
return;
debugC(2, kDraciSoundDebugLevel, "Stopping track %d", _track);
- _track = 0;
+ _track = -1;
_isPlaying = false;
if (_parser) {
_parser->unloadMusic();
@@ -232,6 +232,9 @@
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);
}
Modified: scummvm/trunk/engines/draci/sound.cpp
===================================================================
--- scummvm/trunk/engines/draci/sound.cpp 2009-11-12 22:41:14 UTC (rev 45872)
+++ scummvm/trunk/engines/draci/sound.cpp 2009-11-12 22:52:00 UTC (rev 45873)
@@ -271,6 +271,9 @@
} 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");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list