diff options
author | athrxx | 2012-11-10 15:46:02 +0100 |
---|---|---|
committer | athrxx | 2012-11-11 19:14:28 +0100 |
commit | e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b (patch) | |
tree | 841d055b9a2d0c64eae59473ff78ec70800ef65b /engines/kyra/sound_lol.cpp | |
parent | 8789087be9749f7a13fbfdd72a2c984c0bc9e158 (diff) | |
download | scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.tar.gz scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.tar.bz2 scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.zip |
KYRA: implement LOL sfx priority handling
Diffstat (limited to 'engines/kyra/sound_lol.cpp')
-rw-r--r-- | engines/kyra/sound_lol.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/kyra/sound_lol.cpp b/engines/kyra/sound_lol.cpp index 6c88312f1a..3c2c931445 100644 --- a/engines/kyra/sound_lol.cpp +++ b/engines/kyra/sound_lol.cpp @@ -165,9 +165,8 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { return; volume &= 0xff; - // Priority setting (used for acquiring one of the 4 pcm channels) currently not implemented. - // int16 vprIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]); - // uint16 priority = (vprIndex > 0) ? (vprIndex * volume) >> 8 : -vprIndex; + int16 prIndex = (int16)READ_LE_UINT16(&_ingameSoundIndex[track * 2 + 1]); + uint16 priority = (prIndex > 0) ? (prIndex * volume) >> 8 : -prIndex; static const uint8 volTable1[] = { 223, 159, 95, 47, 15, 0 }; static const uint8 volTable2[] = { 255, 191, 127, 63, 30, 0 }; @@ -189,7 +188,7 @@ void LoLEngine::snd_playSoundEffect(int track, int volume) { if (hasVocFile) { if (_sound->isVoicePresent(_ingameSoundList[vocIndex])) - _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume, true); + _sound->voicePlay(_ingameSoundList[vocIndex], 0, volume, priority, true); } else if (_flags.platform == Common::kPlatformPC) { if (_sound->getSfxType() == Sound::kMidiMT32) track = (track < _ingameMT32SoundIndexSize) ? (_ingameMT32SoundIndex[track] - 1) : -1; |