aboutsummaryrefslogtreecommitdiff
path: root/engines/glk/glk.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-06 15:32:39 -0700
committerPaul Gilbert2019-07-06 15:32:39 -0700
commit1c412d3da705dabd709614c409927ce8f6fbfe05 (patch)
tree68e73692a1eb08d1bf0f0ca99ff677a85fa8d135 /engines/glk/glk.cpp
parent2c39c903fcd759de50e23de06b3388989e6f92a9 (diff)
downloadscummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.tar.gz
scummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.tar.bz2
scummvm-rg350-1c412d3da705dabd709614c409927ce8f6fbfe05.zip
GLK: Properly handle sound setup
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);
}