aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/glk/glk.cpp')
-rw-r--r--engines/glk/glk.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/glk/glk.cpp b/engines/glk/glk.cpp
index b17304d957..06ab742e74 100644
--- a/engines/glk/glk.cpp
+++ b/engines/glk/glk.cpp
@@ -89,6 +89,9 @@ void GlkEngine::initialize() {
_sounds = new Sounds();
_streams = new Streams();
_windows = new Windows(_screen);
+
+ // Setup mixer
+ syncSoundSettings();
}
Screen *GlkEngine::createScreen() {
@@ -248,6 +251,13 @@ Common::Error GlkEngine::saveGameState(int slot, const Common::String &desc) {
return errCode;
}
+void GlkEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ int volume = ConfMan.getBool("sfx_mute") ? 0 : CLIP(ConfMan.getInt("sfx_volume"), 0, 255);
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, volume);
+}
+
void GlkEngine::beep() {
_pcSpeaker->speakerOn(50, 50);
}