aboutsummaryrefslogtreecommitdiff
path: root/engines/draci/sound.cpp
diff options
context:
space:
mode:
authorRobert Špalek2009-10-15 23:57:13 +0000
committerRobert Špalek2009-10-15 23:57:13 +0000
commitdddce5d97b0c9b0cf723d16ead08d5a00ad7eca0 (patch)
tree8b4ab5332b984b93a28ed0a699e96a0d2325ec98 /engines/draci/sound.cpp
parent71d4d12a82bb52cacb2728fb2f9d8837c1549436 (diff)
downloadscummvm-rg350-dddce5d97b0c9b0cf723d16ead08d5a00ad7eca0.tar.gz
scummvm-rg350-dddce5d97b0c9b0cf723d16ead08d5a00ad7eca0.tar.bz2
scummvm-rg350-dddce5d97b0c9b0cf723d16ead08d5a00ad7eca0.zip
Don't crash without sound support.
svn-id: r45137
Diffstat (limited to 'engines/draci/sound.cpp')
-rw-r--r--engines/draci/sound.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index 09c7aad4ca..6b6e18f364 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -269,8 +269,12 @@ void Sound::stopAll() {
void Sound::setVolume() {
// TODO: how to retrieve "Mute All" ?
- _muteSound = ConfMan.getBool("sfx_mute");
- _muteVoice = ConfMan.getBool("speech_mute");
+ if (_mixer->isReady()) {
+ _muteSound = ConfMan.getBool("sfx_mute");
+ _muteVoice = ConfMan.getBool("speech_mute");
+ } else {
+ _muteSound = _muteVoice = true;
+ }
_showSubtitles = ConfMan.getBool("subtitles");
_talkSpeed = ConfMan.getInt("talkspeed");
const int soundVolume = ConfMan.getInt("sfx_volume");