diff options
author | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 |
commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/agi/agi.cpp | |
parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'engines/agi/agi.cpp')
-rw-r--r-- | engines/agi/agi.cpp | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp index e83ef4ead9..0646f321d4 100644 --- a/engines/agi/agi.cpp +++ b/engines/agi/agi.cpp @@ -501,8 +501,7 @@ AgiBase::AgiBase(OSystem *syst, const AGIGameDescription *gameDesc) : Engine(sys AgiEngine::AgiEngine(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(); parseFeatures(); @@ -578,18 +577,25 @@ void AgiEngine::initialize() { _soundemu = SOUND_EMU_APPLE2GS; } else if (getPlatform() == Common::kPlatformCoCo3) { _soundemu = SOUND_EMU_COCO3; + } else if (ConfMan.get("music_driver") == "auto") { + // Default sound is the proper PCJr emulation + _soundemu = SOUND_EMU_PCJR; } else { - switch (MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK|MDT_ADLIB|MDT_PCJR|MDT_MIDI))) { + switch (MidiDriver::getMusicType(MidiDriver::detectDevice(MDT_PCSPK|MDT_AMIGA|MDT_ADLIB|MDT_PCJR|MDT_MIDI))) { case MT_PCSPK: _soundemu = SOUND_EMU_PC; break; + case MT_ADLIB: + _soundemu = SOUND_EMU_NONE; + break; case MT_PCJR: _soundemu = SOUND_EMU_PCJR; break; - case MT_ADLIB: - _soundemu = SOUND_EMU_NONE; + case MT_AMIGA: + _soundemu = SOUND_EMU_AMIGA; break; default: + debug(0, "DEF"); _soundemu = SOUND_EMU_MIDI; break; } @@ -709,18 +715,6 @@ Common::Error AgiEngine::go() { return Common::kNoError; } -void AgiEngine::syncSoundSettings() { - // FIXME/TODO: Please explain why we are using "music_volume" for all - // three different entries here. - int soundVolumeMusic = ConfMan.getInt("music_volume"); - int soundVolumeSFX = ConfMan.getInt("music_volume"); - int soundVolumeSpeech = ConfMan.getInt("music_volume"); - - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, soundVolumeMusic); - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, soundVolumeSFX); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, soundVolumeSpeech); -} - void AgiEngine::parseFeatures() { if (!ConfMan.hasKey("features")) return; |