aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/cine/cine.cpp25
-rw-r--r--engines/cine/cine.h2
2 files changed, 19 insertions, 8 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index d80ab70660..54d113d69c 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -50,20 +50,15 @@ Sound *g_sound = 0;
CineEngine *g_cine = 0;
CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
+ // Setup mixer
+ syncSoundSettings();
+
DebugMan.addDebugChannel(kCineDebugScript, "Script", "Script debug level");
DebugMan.addDebugChannel(kCineDebugPart, "Part", "Part debug level");
DebugMan.addDebugChannel(kCineDebugSound, "Sound", "Sound debug level");
DebugMan.addDebugChannel(kCineDebugCollision, "Collision", "Collision debug level");
_console = new CineConsole(this);
- // Setup mixer
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
- // Use music volume for plain sound types (At least the AdLib player uses a plain sound type
- // so previously the music and sfx volume controls didn't affect it at all).
- // FIXME: Make AdLib player differentiate between playing sound effects and music and remove this.
- _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("music_volume"));
-
g_cine = this;
g_eventRec.registerRandomSource(_rnd, "cine");
@@ -78,6 +73,20 @@ CineEngine::~CineEngine() {
delete _console;
}
+void CineEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ // Use music volume for plain sound types (At least the AdLib player uses a plain sound type
+ // so previously the music and sfx volume controls didn't affect it at all).
+ // FIXME: Make AdLib player differentiate between playing sound effects and music and remove this.
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType,
+ mute ? 0 : ConfMan.getInt("music_volume"));
+}
+
Common::Error CineEngine::run() {
// Initialize backend
initGraphics(320, 200, false);
diff --git a/engines/cine/cine.h b/engines/cine/cine.h
index 5f49a2907f..7de0bdc86f 100644
--- a/engines/cine/cine.h
+++ b/engines/cine/cine.h
@@ -117,6 +117,8 @@ public:
CineEngine(OSystem *syst, const CINEGameDescription *gameDesc);
virtual ~CineEngine();
+ virtual void syncSoundSettings();
+
int getGameType() const;
uint32 getFeatures() const;
Common::Language getLanguage() const;