From ff97d52d728a0a47f421dfdfabb40b30f0b1c920 Mon Sep 17 00:00:00 2001 From: uruk Date: Thu, 24 Jul 2014 18:55:09 +0200 Subject: CGE2: Distinguish SFX from speech when playing sounds. Now the sound options of ScummVM are taken into account when playing these two types of sounds. Until now, everything was considered SFX sound. --- engines/cge2/snail.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/cge2/snail.cpp') diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index f6c6e2d71f..aebe1f0778 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -75,7 +75,7 @@ void CommandHandler::runCommand() { if (_vm->_fx->exist(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0])) { int16 oldRepeat = _vm->_sound->getRepeat(); _vm->_sound->setRepeat(1); - _vm->_sound->play(_vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span); + _vm->_sound->play(Audio::Mixer::kSFXSoundType, _vm->_fx->load(_vm->_soundStat._ref[1], _vm->_soundStat._ref[0]), _vm->_sound->_smpinf._span); _vm->_sound->setRepeat(oldRepeat); return; } @@ -676,7 +676,7 @@ void CGE2Engine::snReach(Sprite *spr, int val) { ((Hero *)spr)->reach(val); } -void CGE2Engine::snSound(Sprite *spr, int wav) { +void CGE2Engine::snSound(Sprite *spr, int wav, Audio::Mixer::SoundType soundType) { if (wav == -1) _sound->stop(); else { @@ -687,7 +687,7 @@ void CGE2Engine::snSound(Sprite *spr, int wav) { _soundStat._ref[1] = wav; _soundStat._ref[0] = !_fx->exist(_soundStat._ref[1]); - _sound->play(_fx->load(_soundStat._ref[1], _soundStat._ref[0]), + _sound->play(soundType, _fx->load(_soundStat._ref[1], _soundStat._ref[0]), (spr) ? (spr->_pos2D.x / (kScrWidth / 16)) : 8); } } @@ -746,7 +746,7 @@ void CGE2Engine::snSay(Sprite *spr, int val) { i -= 100; int16 oldRepeat = _sound->getRepeat(); _sound->setRepeat(1); - snSound(spr, i); + snSound(spr, i, Audio::Mixer::kSpeechSoundType); _sound->setRepeat(oldRepeat); _soundStat._wait = &_sound->_smpinf._counter; } -- cgit v1.2.3