diff options
author | Martin Kiewitz | 2010-01-08 20:11:27 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-01-08 20:11:27 +0000 |
commit | 25226cdc23f39fd79c472342fcf84df90cb5ebc7 (patch) | |
tree | 28a32cc8b4b6a8d3e6322f83619096a93de509a4 /engines | |
parent | 3a163b960e70ce4d56db56312fdb3957b7f0ee5b (diff) | |
download | scummvm-rg350-25226cdc23f39fd79c472342fcf84df90cb5ebc7.tar.gz scummvm-rg350-25226cdc23f39fd79c472342fcf84df90cb5ebc7.tar.bz2 scummvm-rg350-25226cdc23f39fd79c472342fcf84df90cb5ebc7.zip |
SCI: updateCues() cleanup
svn-id: r47172
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sound/soundcmd.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp index 8c61173ed3..1fedfdc597 100644 --- a/engines/sci/sound/soundcmd.cpp +++ b/engines/sci/sound/soundcmd.cpp @@ -803,7 +803,7 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { } if (musicSlot->pStreamAud) { - // Update digital sound effect slots here + // Update digital sound effect slots uint currentLoopCounter = 0; if (musicSlot->pLoopStream) @@ -825,20 +825,15 @@ void SoundCommandParser::cmdUpdateCues(reg_t obj, int16 value) { musicSlot->fadeSetVolume = false; } } else { - switch (musicSlot->signal) { - case 0: - if (musicSlot->dataInc != GET_SEL32V(_segMan, obj, dataInc)) { - PUT_SEL32V(_segMan, obj, dataInc, musicSlot->dataInc); - PUT_SEL32V(_segMan, obj, signal, musicSlot->dataInc + 127); - } - break; - case SIGNAL_OFFSET: - PUT_SEL32V(_segMan, obj, signal, SIGNAL_OFFSET); - break; - default: - // Sync the signal of the sound object - PUT_SEL32V(_segMan, obj, signal, musicSlot->signal); - break; + // Update MIDI slots + if (musicSlot->signal == 0) { + if (musicSlot->dataInc != GET_SEL32V(_segMan, obj, dataInc)) { + PUT_SEL32V(_segMan, obj, dataInc, musicSlot->dataInc); + PUT_SEL32V(_segMan, obj, signal, musicSlot->dataInc + 127); + } + } else { + // Sync the signal of the sound object + PUT_SEL32V(_segMan, obj, signal, musicSlot->signal); } } |