[Scummvm-cvs-logs] scummvm master -> 46e397fb25faf947085349ec4daec4cfdc2cd6a8
dhewg
dhewg at wiibrew.org
Sat Mar 19 18:12:48 CET 2011
This automated email contains information about 26 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a3efe915d3 PREAGI: Cleanup volume levels initialization
f8271e0d07 AGOS: Cleanup syncSoundSettings()
e5056cab91 CINE: Init volume levels on startup
562e502d78 CRUISE: Cleanup syncSoundSettings()
e43d54fa96 DRACI: Init volume levels on startup
d12278b4cc DRACI: Respect global mute settings
a3616473aa DRASACULA: Init volume levels on startup
3eda4c16ac GOB: Init volume levels on startup
79ba16a89d GROOVIE: Set global volume levels
dfa5f743de HUGO: Init volume levels on startup
a0bdb6e5df LASTEXPRESS: Init volume levels on startup
69dcb99369 LURE: Init volume levels on startup
dc6c88f350 M4: Init volume levels on startup
a42360ce3d MADE: Cleanup syncSoundSettings()
3dd2e0c3f6 MOHAWK: Cleanup volume levels initialization
5b6479c55a PARALLACTION: Init volume levels on startup
b5af156839 QUEEN: Init volume levels on startup
2cb6641786 SAGA: Cleanup syncSoundSettings()
fa11a6e8cf SCUMM: Cleanup syncSoundSettings()
5e8907fc3c SKY: Cleanup volume levels initialization
02956eaf0b SWORD1: Cleanup syncSoundSettings()
606ac754cb SWORD2: Cleanup syncSoundSettings()
e5b6146b78 SWORD25: Init volume levels on startup
58f1e2f6ef TOUCHE: Cleanup syncSoundSettings()
6650e69a30 TUCKER: Get rid of syncSoundSettings()
46e397fb25 ENGINES: Mute kPlainSoundType in Engine::syncSoundSettings()
Commit: a3efe915d30da6ce8d81157fcec5b5d7a51a6184
https://github.com/scummvm/scummvm/commit/a3efe915d30da6ce8d81157fcec5b5d7a51a6184
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T07:32:35-07:00
Commit Message:
PREAGI: Cleanup volume levels initialization
Changed paths:
engines/agi/preagi.cpp
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index 1aa6ef5..7457a31 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -42,8 +42,7 @@ namespace Agi {
PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBase(syst, gameDesc) {
// Setup mixer
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ syncSoundSettings();
_rnd = new Common::RandomSource();
Commit: f8271e0d07db5af850934595cb2c708f7d61bfaf
https://github.com/scummvm/scummvm/commit/f8271e0d07db5af850934595cb2c708f7d61bfaf
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T07:33:34-07:00
Commit Message:
AGOS: Cleanup syncSoundSettings()
Changed paths:
engines/agos/agos.cpp
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index ae95bb0..574031d 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -1045,18 +1045,15 @@ uint32 AGOSEngine::getTime() const {
}
void AGOSEngine::syncSoundSettings() {
- // Sync the engine with the config manager
- int soundVolumeMusic = ConfMan.getInt("music_volume");
- int soundVolumeSFX = ConfMan.getInt("sfx_volume");
- int soundVolumeSpeech = ConfMan.getInt("speech_volume");
+ Engine::syncSoundSettings();
bool mute = false;
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, (mute ? 0 : (_musicPaused ? 0 : soundVolumeMusic)));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, (mute ? 0 : soundVolumeSFX));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, (mute ? 0 : soundVolumeSpeech));
+ // Sync the engine with the config manager
+ int soundVolumeMusic = ConfMan.getInt("music_volume");
+ int soundVolumeSFX = ConfMan.getInt("sfx_volume");
if (_midiEnabled)
_midi.setVolume((mute ? 0 : soundVolumeMusic), (mute ? 0 : soundVolumeSFX));
Commit: e5056cab91843ec0de9b2c9d1b6d91ed49189da9
https://github.com/scummvm/scummvm/commit/e5056cab91843ec0de9b2c9d1b6d91ed49189da9
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T07:34:57-07:00
Commit Message:
CINE: Init volume levels on startup
Add syncSoundSettings() to set the volume for kPlainSoundType and
respect the global mute setting
Changed paths:
engines/cine/cine.cpp
engines/cine/cine.h
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index d80ab70..54d113d 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 5f49a29..7de0bdc 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;
Commit: 562e502d7888e9b3a0a64725c9420c9e6484b5a9
https://github.com/scummvm/scummvm/commit/562e502d7888e9b3a0a64725c9420c9e6484b5a9
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:50-07:00
Commit Message:
CRUISE: Cleanup syncSoundSettings()
And init volume levels on startup
Changed paths:
engines/cruise/cruise.cpp
engines/cruise/sound.cpp
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index c1ea711..2c5659c 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -52,16 +52,13 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
DebugMan.addDebugChannel(kCruiseDebugScript, "scripts", "Scripts debug level");
DebugMan.addDebugChannel(kCruiseDebugSound, "sound", "Sound debug level");
- // Setup mixer
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType,
- ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType,
- ConfMan.getInt("music_volume"));
-
_vm = this;
_debugger = new Debugger();
_sound = new PCSound(_mixer, this);
+ // Setup mixer
+ syncSoundSettings();
+
g_eventRec.registerRandomSource(_rnd, "cruise");
}
@@ -235,6 +232,8 @@ const char *CruiseEngine::getSavegameFile(int saveGameIdx) {
}
void CruiseEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
_sound->syncSounds();
}
diff --git a/engines/cruise/sound.cpp b/engines/cruise/sound.cpp
index 8a4b1d0..2826a34 100644
--- a/engines/cruise/sound.cpp
+++ b/engines/cruise/sound.cpp
@@ -283,9 +283,21 @@ void PCSoundDriver::resetChannel(int channel) {
}
void PCSoundDriver::syncSounds() {
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ bool music_mute = mute;
+ bool sfx_mute = mute;
+
+ if (!mute) {
+ music_mute = ConfMan.getBool("music_mute");
+ sfx_mute = ConfMan.getBool("sfx_mute");
+ }
+
// Get the new music and sfx volumes
- _musicVolume = ConfMan.getBool("music_mute") ? 0 : MIN(255, ConfMan.getInt("music_volume"));
- _sfxVolume = ConfMan.getBool("sfx_mute") ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
+ _musicVolume = music_mute ? 0 : MIN(255, ConfMan.getInt("music_volume"));
+ _sfxVolume = sfx_mute ? 0 : MIN(255, ConfMan.getInt("sfx_volume"));
}
AdLibSoundDriver::AdLibSoundDriver(Audio::Mixer *mixer)
Commit: e43d54fa96fd354416c5e17e92dcb585c8779f4f
https://github.com/scummvm/scummvm/commit/e43d54fa96fd354416c5e17e92dcb585c8779f4f
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:50-07:00
Commit Message:
DRACI: Init volume levels on startup
Changed paths:
engines/draci/draci.cpp
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index d0eb511..0bf2d5d 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -175,6 +175,9 @@ int DraciEngine::init() {
_music->open();
//_music->setAdLib(adlib);
+ // Setup mixer
+ syncSoundSettings();
+
// Load the game's fonts
_smallFont = new Font(kFontSmall);
_bigFont = new Font(kFontBig);
Commit: d12278b4cce4f8a7cc76bf8868363c6397245322
https://github.com/scummvm/scummvm/commit/d12278b4cce4f8a7cc76bf8868363c6397245322
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:51-07:00
Commit Message:
DRACI: Respect global mute settings
Changed paths:
engines/draci/sound.cpp
diff --git a/engines/draci/sound.cpp b/engines/draci/sound.cpp
index dc8f548..c8646ff 100644
--- a/engines/draci/sound.cpp
+++ b/engines/draci/sound.cpp
@@ -408,6 +408,9 @@ void Sound::stopVoice() {
}
void Sound::setVolume() {
+ _showSubtitles = ConfMan.getBool("subtitles");
+ _talkSpeed = ConfMan.getInt("talkspeed");
+
if (_mixer->isReady()) {
_muteSound = ConfMan.getBool("sfx_mute");
_muteVoice = ConfMan.getBool("speech_mute");
@@ -417,10 +420,10 @@ void Sound::setVolume() {
if (ConfMan.getBool("mute")) {
_muteSound = _muteVoice = true;
}
- _showSubtitles = ConfMan.getBool("subtitles");
- _talkSpeed = ConfMan.getInt("talkspeed");
- const int soundVolume = ConfMan.getInt("sfx_volume");
- const int speechVolume = ConfMan.getInt("speech_volume");
+
+ const int soundVolume = _muteSound ? 0: ConfMan.getInt("sfx_volume");
+ const int speechVolume = _muteVoice ? 0 : ConfMan.getInt("speech_volume");
+
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolume);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, speechVolume);
}
Commit: a3616473aa3c1ee12d90b080be1938ecdacc2992
https://github.com/scummvm/scummvm/commit/a3616473aa3c1ee12d90b080be1938ecdacc2992
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:52-07:00
Commit Message:
DRASACULA: Init volume levels on startup
Changed paths:
engines/drascula/drascula.cpp
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index b59ab6f..19395dc 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -195,8 +195,7 @@ Common::Error DrasculaEngine::run() {
loadArchives();
// Setup mixer
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ syncSoundSettings();
currentChapter = 1; // values from 1 to 6 will start each part of game
loadedDifferentChapter = 0;
Commit: 3eda4c16ac5fe3256217ce10e3f974bbe7707d71
https://github.com/scummvm/scummvm/commit/3eda4c16ac5fe3256217ce10e3f974bbe7707d71
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:52-07:00
Commit Message:
GOB: Init volume levels on startup
Changed paths:
engines/gob/gob.cpp
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index b65bbe0..1291416 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -575,6 +575,9 @@ bool GobEngine::initGameParts() {
return false;
}
+ // Setup mixer
+ syncSoundSettings();
+
_inter->setupOpcodes();
return true;
Commit: 79ba16a89d9d498974034de3449c8b7910a884d0
https://github.com/scummvm/scummvm/commit/79ba16a89d9d498974034de3449c8b7910a884d0
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:52-07:00
Commit Message:
GROOVIE: Set global volume levels
Changed paths:
engines/groovie/groovie.cpp
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 4a4f5e0..67c8f3d 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -322,6 +322,8 @@ void GroovieEngine::errorString(const char *buf_input, char *buf_output, int buf
}
void GroovieEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
bool mute = ConfMan.getBool("mute");
// Set the music volume
Commit: dfa5f743dec33ebd4910d008015dd93b65fb3bd4
https://github.com/scummvm/scummvm/commit/dfa5f743dec33ebd4910d008015dd93b65fb3bd4
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:53-07:00
Commit Message:
HUGO: Init volume levels on startup
Changed paths:
engines/hugo/hugo.cpp
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 231b2a5..ec624dd 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -176,6 +176,10 @@ Common::Error HugoEngine::run() {
_inventory = new InventoryHandler(this);
_route = new Route(this);
_sound = new SoundHandler(this);
+
+ // Setup mixer
+ syncSoundSettings();
+
_text = new TextHandler(this);
_topMenu = new TopMenu(this);
Commit: a0bdb6e5df2fbfbf0b0eb5f78109c38b1d428668
https://github.com/scummvm/scummvm/commit/a0bdb6e5df2fbfbf0b0eb5f78109c38b1d428668
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:53-07:00
Commit Message:
LASTEXPRESS: Init volume levels on startup
Changed paths:
engines/lastexpress/lastexpress.cpp
diff --git a/engines/lastexpress/lastexpress.cpp b/engines/lastexpress/lastexpress.cpp
index ad6e5f2..9074225 100644
--- a/engines/lastexpress/lastexpress.cpp
+++ b/engines/lastexpress/lastexpress.cpp
@@ -56,6 +56,8 @@ LastExpressEngine::LastExpressEngine(OSystem *syst, const ADGameDescription *gd)
_font(NULL), _logic(NULL), _menu(NULL), _frameCounter(0), _lastFrameCount(0),
_graphicsMan(NULL), _resMan(NULL), _sceneMan(NULL), _soundMan(NULL),
_eventMouse(NULL), _eventTick(NULL), _eventMouseBackup(NULL), _eventTickBackup(NULL) {
+ // Setup mixer
+ syncSoundSettings();
// Adding the default directories
const Common::FSNode gameDataDir(ConfMan.get("path"));
Commit: 69dcb993690b45c1012a9850c7e82c33de9a011f
https://github.com/scummvm/scummvm/commit/69dcb993690b45c1012a9850c7e82c33de9a011f
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:53-07:00
Commit Message:
LURE: Init volume levels on startup
And set global volume levels
Changed paths:
engines/lure/lure.cpp
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index ca102e2..b0968c1 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -95,6 +95,10 @@ Common::Error LureEngine::init() {
_gameToLoad = -1;
_initialised = true;
+
+ // Setup mixer
+ syncSoundSettings();
+
return Common::kNoError;
}
@@ -264,6 +268,8 @@ GUI::Debugger *LureEngine::getDebugger() {
}
void LureEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
Sound.syncSounds();
}
Commit: dc6c88f3502ba4a4c5c535aff3e03aece4f6ebb5
https://github.com/scummvm/scummvm/commit/dc6c88f3502ba4a4c5c535aff3e03aece4f6ebb5
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:53-07:00
Commit Message:
M4: Init volume levels on startup
Changed paths:
engines/m4/m4.cpp
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 2bdd530..d8d25f6 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -107,6 +107,8 @@ void gameMenuHotkeyHandler(MadsM4Engine *vm, View *view, uint32 key) {
MadsM4Engine::MadsM4Engine(OSystem *syst, const M4GameDescription *gameDesc) :
Engine(syst), _gameDescription(gameDesc) {
+ // Setup mixer
+ syncSoundSettings();
// FIXME
_vm = this;
Commit: a42360ce3d32213cf6aa0d0e3057630edd0047d7
https://github.com/scummvm/scummvm/commit/a42360ce3d32213cf6aa0d0e3057630edd0047d7
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:54-07:00
Commit Message:
MADE: Cleanup syncSoundSettings()
And respect global mute settings
Changed paths:
engines/made/made.cpp
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 11f7734..1c8d54a 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -146,11 +146,15 @@ MadeEngine::~MadeEngine() {
}
void MadeEngine::syncSoundSettings() {
- _music->setVolume(ConfMan.getInt("music_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ Engine::syncSoundSettings();
+
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _music->setVolume(mute ? 0 : ConfMan.getInt("music_volume"));
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType,
+ mute ? 0 : ConfMan.getInt("sfx_volume"));
}
int16 MadeEngine::getTicks() {
Commit: 3dd2e0c3f6822dddd8ddbf717bdc4914fc2d66d6
https://github.com/scummvm/scummvm/commit/3dd2e0c3f6822dddd8ddbf717bdc4914fc2d66d6
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:54-07:00
Commit Message:
MOHAWK: Cleanup volume levels initialization
Changed paths:
engines/mohawk/mohawk.cpp
diff --git a/engines/mohawk/mohawk.cpp b/engines/mohawk/mohawk.cpp
index a3db630..015cbff 100644
--- a/engines/mohawk/mohawk.cpp
+++ b/engines/mohawk/mohawk.cpp
@@ -46,8 +46,8 @@ MohawkEngine::MohawkEngine(OSystem *syst, const MohawkGameDescription *gamedesc)
if (!_mixer->isReady())
error ("Sound initialization failed");
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ // Setup mixer
+ syncSoundSettings();
_sound = 0;
_video = 0;
Commit: 5b6479c55aca2103f7442e9b07ebfd5ae83eb40c
https://github.com/scummvm/scummvm/commit/5b6479c55aca2103f7442e9b07ebfd5ae83eb40c
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:55-07:00
Commit Message:
PARALLACTION: Init volume levels on startup
Changed paths:
engines/parallaction/parallaction.cpp
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 1113eb5..3055439 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -52,6 +52,8 @@ uint32 _globalFlags = 0;
Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gameDesc) :
Engine(syst), _gameDescription(gameDesc), _location(getGameType()),
_dialogueMan(0) {
+ // Setup mixer
+ syncSoundSettings();
_vm = this;
DebugMan.addDebugChannel(kDebugDialogue, "dialogue", "Dialogues debug level");
Commit: b5af156839c3fc7704e3f49879b8e8dec8e5ece1
https://github.com/scummvm/scummvm/commit/b5af156839c3fc7704e3f49879b8e8dec8e5ece1
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:55-07:00
Commit Message:
QUEEN: Init volume levels on startup
And cleanup syncSoundSettings()
Also, respect global mute settings
Changed paths:
engines/queen/queen.cpp
engines/queen/sound.cpp
diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp
index 74bb52f..a369219 100644
--- a/engines/queen/queen.cpp
+++ b/engines/queen/queen.cpp
@@ -240,14 +240,20 @@ void QueenEngine::checkOptionSettings() {
}
void QueenEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
readOptionSettings();
}
void QueenEngine::readOptionSettings() {
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
_sound->setVolume(ConfMan.getInt("music_volume"));
- _sound->musicToggle(!ConfMan.getBool("music_mute"));
- _sound->sfxToggle(!ConfMan.getBool("sfx_mute"));
- _sound->speechToggle(!ConfMan.getBool("speech_mute"));
+ _sound->musicToggle(!(mute || ConfMan.getBool("music_mute")));
+ _sound->sfxToggle(!(mute || ConfMan.getBool("sfx_mute")));
+ _sound->speechToggle(!(mute || !ConfMan.getBool("speech_mute")));
_talkSpeed = (ConfMan.getInt("talkspeed") * (MAX_TEXT_SPEED - MIN_TEXT_SPEED) + 255 / 2) / 255 + MIN_TEXT_SPEED;
_subtitles = ConfMan.getBool("subtitles");
checkOptionSettings();
@@ -470,11 +476,14 @@ Common::Error QueenEngine::run() {
}
_sound = Sound::makeSoundInstance(_mixer, this, _resource->getCompression());
+
_walk = new Walk(this);
//_talkspeedScale = (MAX_TEXT_SPEED - MIN_TEXT_SPEED) / 255.0;
registerDefaultSettings();
- readOptionSettings();
+
+ // Setup mixer
+ syncSoundSettings();
_logic->start();
if (ConfMan.hasKey("save_slot") && canLoadOrSave()) {
diff --git a/engines/queen/sound.cpp b/engines/queen/sound.cpp
index 6eb7362..6a9254d 100644
--- a/engines/queen/sound.cpp
+++ b/engines/queen/sound.cpp
@@ -193,9 +193,6 @@ Sound *Sound::makeSoundInstance(Audio::Mixer *mixer, QueenEngine *vm, uint8 comp
void Sound::setVolume(int vol) {
_musicVolume = vol;
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, _musicVolume);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
}
void Sound::saveState(byte *&ptr) {
Commit: 2cb664178654e4cbe388bd63ae5bdda62b6640ca
https://github.com/scummvm/scummvm/commit/2cb664178654e4cbe388bd63ae5bdda62b6640ca
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:55-07:00
Commit Message:
SAGA: Cleanup syncSoundSettings()
And respect global mute settings
Changed paths:
engines/saga/music.cpp
engines/saga/saga.cpp
engines/saga/sound.cpp
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index dd3034c..f801001 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -239,6 +239,9 @@ void Music::setVolume(int volume, int time) {
volume = 255;
if (time == 1) {
+ if (ConfMan.hasKey("mute") && ConfMan.getBool("mute"))
+ volume = 0;
+
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, volume);
_driver->setVolume(volume);
_vm->getTimerManager()->removeTimerProc(&musicVolumeGaugeCallback);
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp
index 2e34b49..62493f5 100644
--- a/engines/saga/saga.cpp
+++ b/engines/saga/saga.cpp
@@ -625,6 +625,8 @@ GUI::Debugger *SagaEngine::getDebugger() {
}
void SagaEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
_subtitlesEnabled = ConfMan.getBool("subtitles");
_readingSpeed = getTalkspeed();
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index 07e8487..8ffce4e 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -175,8 +175,12 @@ void Sound::stopAll() {
}
void Sound::setVolume() {
- _vm->_soundVolume = ConfMan.getInt("sfx_volume");
- _vm->_speechVolume = ConfMan.getInt("speech_volume");
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ _vm->_soundVolume = mute ? 0 : ConfMan.getInt("sfx_volume");
+ _vm->_speechVolume = mute ? 0 : ConfMan.getInt("speech_volume");
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, _vm->_soundVolume);
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, _vm->_speechVolume);
}
Commit: fa11a6e8cffc0ed177329aaa0e8bf15387a15d49
https://github.com/scummvm/scummvm/commit/fa11a6e8cffc0ed177329aaa0e8bf15387a15d49
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:04:56-07:00
Commit Message:
SCUMM: Cleanup syncSoundSettings()
Changed paths:
engines/scumm/scumm.cpp
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index c2556d6..564f3a7 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1874,11 +1874,11 @@ void ScummEngine::setupMusic(int midi) {
}
void ScummEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
// Sync the engine with the config manager
int soundVolumeMusic = ConfMan.getInt("music_volume");
int soundVolumeSfx = ConfMan.getInt("sfx_volume");
- int soundVolumeSpeech = ConfMan.getInt("speech_volume");
bool mute = false;
@@ -1886,7 +1886,7 @@ void ScummEngine::syncSoundSettings() {
mute = ConfMan.getBool("mute");
if (mute)
- soundVolumeMusic = soundVolumeSfx = soundVolumeSpeech = 0;
+ soundVolumeMusic = soundVolumeSfx = 0;
}
if (_musicEngine) {
@@ -1897,10 +1897,6 @@ void ScummEngine::syncSoundSettings() {
_townsPlayer->setSfxVolume(soundVolumeSfx);
}
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSfx);
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic);
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech);
-
if (ConfMan.getBool("speech_mute"))
_voiceMode = 2;
else
Commit: 5e8907fc3cff41cd27e04bbbe5d434f2017fca88
https://github.com/scummvm/scummvm/commit/5e8907fc3cff41cd27e04bbbe5d434f2017fca88
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:15-07:00
Commit Message:
SKY: Cleanup volume levels initialization
Changed paths:
engines/sky/sky.cpp
engines/sky/sky.h
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp
index c42bb63..f3556c8 100644
--- a/engines/sky/sky.cpp
+++ b/engines/sky/sky.cpp
@@ -100,6 +100,22 @@ SkyEngine::~SkyEngine() {
free(_itemList[i]);
}
+void SkyEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
+ bool mute = false;
+ if (ConfMan.hasKey("mute"))
+ mute = ConfMan.getBool("mute");
+
+ if (ConfMan.getBool("sfx_mute"))
+ SkyEngine::_systemVars.systemFlags |= SF_FX_OFF;
+
+ if (ConfMan.getBool("music_mute"))
+ SkyEngine::_systemVars.systemFlags |= SF_MUS_OFF;
+
+ _skyMusic->setVolume(mute ? 0: ConfMan.getInt("music_volume") >> 1);
+}
+
GUI::Debugger *SkyEngine::getDebugger() {
return _debugger;
}
@@ -242,16 +258,6 @@ Common::Error SkyEngine::go() {
Common::Error SkyEngine::init() {
initGraphics(320, 200, false);
- if (ConfMan.getBool("sfx_mute")) {
- SkyEngine::_systemVars.systemFlags |= SF_FX_OFF;
- }
- if (ConfMan.getBool("music_mute")) {
- SkyEngine::_systemVars.systemFlags |= SF_MUS_OFF;
- }
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
-
_skyDisk = new Disk();
_skySound = new Sound(_mixer, _skyDisk, Audio::Mixer::kMaxChannelVolume);
@@ -346,7 +352,8 @@ Common::Error SkyEngine::init() {
}
}
- _skyMusic->setVolume(ConfMan.getInt("music_volume") >> 1);
+ // Setup mixer
+ syncSoundSettings();
_debugger = new Debugger(_skyLogic, _skyMouse, _skyScreen, _skyCompact);
return Common::kNoError;
diff --git a/engines/sky/sky.h b/engines/sky/sky.h
index 29e7c9a..d8ced1e 100644
--- a/engines/sky/sky.h
+++ b/engines/sky/sky.h
@@ -84,6 +84,8 @@ public:
SkyEngine(OSystem *syst);
virtual ~SkyEngine();
+ virtual void syncSoundSettings();
+
static bool isDemo();
static bool isCDVersion();
Commit: 02956eaf0b220fb7395ee82971c26cb3e4502d8d
https://github.com/scummvm/scummvm/commit/02956eaf0b220fb7395ee82971c26cb3e4502d8d
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:15-07:00
Commit Message:
SWORD1: Cleanup syncSoundSettings()
Changed paths:
engines/sword1/sword1.cpp
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp
index 5377204..8768e62 100644
--- a/engines/sword1/sword1.cpp
+++ b/engines/sword1/sword1.cpp
@@ -170,6 +170,8 @@ void SwordEngine::reinitialize() {
}
void SwordEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
uint musicVol = ConfMan.getInt("music_volume");
uint sfxVol = ConfMan.getInt("sfx_volume");
uint speechVol = ConfMan.getInt("speech_volume");
@@ -228,9 +230,6 @@ void SwordEngine::syncSoundSettings() {
_sound->setSpeechVol(speechVolL, speechVolR);
_sound->setSfxVol(sfxVolL, sfxVolR);
}
-
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : ConfMan.getInt("speech_volume"));
}
void SwordEngine::flagsToBool(bool *dest, uint8 flags) {
Commit: 606ac754cb7a15ef9e736eb6aacc710ccd2cc834
https://github.com/scummvm/scummvm/commit/606ac754cb7a15ef9e736eb6aacc710ccd2cc834
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:16-07:00
Commit Message:
SWORD2: Cleanup syncSoundSettings()
Changed paths:
engines/sword2/sword2.cpp
diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp
index 9c67fcd..7ad021b 100644
--- a/engines/sword2/sword2.cpp
+++ b/engines/sword2/sword2.cpp
@@ -319,11 +319,10 @@ void Sword2Engine::registerDefaultSettings() {
}
void Sword2Engine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
bool mute = ConfMan.getBool("mute");
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, mute ? 0 : ConfMan.getInt("music_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, mute ? 0 : ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, mute ? 0 : ConfMan.getInt("sfx_volume"));
setSubtitles(ConfMan.getBool("subtitles"));
// Our own settings dialog can mute the music, speech and sound effects
Commit: e5b6146b78741033973ed830cf7132809a57b4b6
https://github.com/scummvm/scummvm/commit/e5b6146b78741033973ed830cf7132809a57b4b6
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:16-07:00
Commit Message:
SWORD25: Init volume levels on startup
Changed paths:
engines/sword25/sword25.cpp
diff --git a/engines/sword25/sword25.cpp b/engines/sword25/sword25.cpp
index 55b9aa3..aac21f4 100644
--- a/engines/sword25/sword25.cpp
+++ b/engines/sword25/sword25.cpp
@@ -56,6 +56,8 @@ const char *const DEFAULT_SCRIPT_FILE = "/system/boot.lua";
Sword25Engine::Sword25Engine(OSystem *syst, const ADGameDescription *gameDesc):
Engine(syst),
_gameDescription(gameDesc) {
+ // Setup mixer
+ syncSoundSettings();
DebugMan.addDebugChannel(kDebugScript, "Script", "Script debug level");
DebugMan.addDebugChannel(kDebugScript, "Scripts", "Script debug level");
Commit: 58f1e2f6effe194fef411264d069552f97d51f8c
https://github.com/scummvm/scummvm/commit/58f1e2f6effe194fef411264d069552f97d51f8c
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:16-07:00
Commit Message:
TOUCHE: Cleanup syncSoundSettings()
And respect global mute settings
Changed paths:
engines/touche/touche.cpp
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 97d533f..6b47a7f 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -44,7 +44,6 @@ namespace Touche {
ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
: Engine(system), _midiPlayer(0), _language(language) {
-
_saveLoadCurrentPage = 0;
_saveLoadCurrentSlot = 0;
_hideInventoryTexts = false;
@@ -103,9 +102,8 @@ Common::Error ToucheEngine::run() {
_midiPlayer = new MidiPlayer;
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+ // Setup mixer
+ syncSoundSettings();
res_openDataFile();
res_allocateTables();
@@ -245,10 +243,9 @@ Common::Point ToucheEngine::getMousePos() const {
}
void ToucheEngine::syncSoundSettings() {
+ Engine::syncSoundSettings();
+
readConfigurationSettings();
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
}
void ToucheEngine::mainLoop() {
Commit: 6650e69a3068e3b57e74f603a629c38359dbaaae
https://github.com/scummvm/scummvm/commit/6650e69a3068e3b57e74f603a629c38359dbaaae
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T08:49:17-07:00
Commit Message:
TUCKER: Get rid of syncSoundSettings()
And respect global mute settings
Changed paths:
engines/tucker/tucker.cpp
engines/tucker/tucker.h
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 6e44ead..d3a6b41 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -68,12 +68,6 @@ Common::Error TuckerEngine::run() {
return Common::kNoError;
}
-void TuckerEngine::syncSoundSettings() {
- _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
- _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
-}
-
int TuckerEngine::getRandomNumber() {
return _rnd.getRandomNumber(0x7FFF);
}
diff --git a/engines/tucker/tucker.h b/engines/tucker/tucker.h
index fd93199..532892f 100644
--- a/engines/tucker/tucker.h
+++ b/engines/tucker/tucker.h
@@ -280,7 +280,6 @@ public:
virtual Common::Error run();
virtual bool hasFeature(EngineFeature f) const;
- virtual void syncSoundSettings();
GUI::Debugger *getDebugger() { return _console; }
protected:
Commit: 46e397fb25faf947085349ec4daec4cfdc2cd6a8
https://github.com/scummvm/scummvm/commit/46e397fb25faf947085349ec4daec4cfdc2cd6a8
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T09:58:17-07:00
Commit Message:
ENGINES: Mute kPlainSoundType in Engine::syncSoundSettings()
The "Mute all" option rarely muted all audio streams, since we have
this abomination called kPlainSoundType (and there is no volume slider
for this type). Both, not-really-muting, and adding yet another slider is
a horrible user experience imho - especially on handheld ports.
So mute this sound in the default implementation, and unmute it to the
maximum volume.
When an engines has a volume level settings for sounds it plays with
this type, it should overwrite said member and set it there.
Changed paths:
engines/engine.cpp
engines/engine.h
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 5ce0f99..0e5e58b 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -430,7 +430,6 @@ int Engine::runDialog(GUI::Dialog &dialog) {
}
void Engine::syncSoundSettings() {
-
// Sync the engine with the config manager
int soundVolumeMusic = ConfMan.getInt("music_volume");
int soundVolumeSFX = ConfMan.getInt("sfx_volume");
@@ -440,6 +439,7 @@ void Engine::syncSoundSettings() {
if (ConfMan.hasKey("mute"))
mute = ConfMan.getBool("mute");
+ _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, (mute ? 0 : Audio::Mixer::kMaxMixerVolume));
_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, (mute ? 0 : soundVolumeMusic));
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, (mute ? 0 : soundVolumeSFX));
_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, (mute ? 0 : soundVolumeSpeech));
diff --git a/engines/engine.h b/engines/engine.h
index 508e988..168a1dc 100644
--- a/engines/engine.h
+++ b/engines/engine.h
@@ -163,6 +163,15 @@ public:
* Notify the engine that the sound settings in the config manager may have
* changed and that it hence should adjust any internal volume etc. values
* accordingly.
+ * The default implementation sets the volume levels of all mixer sound
+ * types according to the config entries of the active domain.
+ * When overwriting, call the default implementation first, then adjust the
+ * volumes further (if required).
+ *
+ * @note When setting volume levels, respect the "mute" config entry.
+ * @note The volume for the plain sound type is reset to the maximum
+ * volume. If the engine can associate its own value for this
+ * type, it needs to overwrite this member and set it accordingly.
* @todo find a better name for this
*/
virtual void syncSoundSettings();
More information about the Scummvm-git-logs
mailing list