aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sound/soundcmd.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2010-11-24 16:01:30 +0000
committerFilippos Karapetis2010-11-24 16:01:30 +0000
commitdcd132697056517008df13230a05811d06fbf4d5 (patch)
tree97f311cc4e4737ff63c4c46b988b405b31014823 /engines/sci/sound/soundcmd.cpp
parent1ebae78ff199385d451f844deef19ebf6b8e611e (diff)
downloadscummvm-rg350-dcd132697056517008df13230a05811d06fbf4d5.tar.gz
scummvm-rg350-dcd132697056517008df13230a05811d06fbf4d5.tar.bz2
scummvm-rg350-dcd132697056517008df13230a05811d06fbf4d5.zip
SCI: Some renaming and added several TODOs concerning reverb
svn-id: r54461
Diffstat (limited to 'engines/sci/sound/soundcmd.cpp')
-rw-r--r--engines/sci/sound/soundcmd.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/engines/sci/sound/soundcmd.cpp b/engines/sci/sound/soundcmd.cpp
index 644e2a43d7..3327fcfcfe 100644
--- a/engines/sci/sound/soundcmd.cpp
+++ b/engines/sci/sound/soundcmd.cpp
@@ -492,21 +492,16 @@ reg_t SoundCommandParser::kDoSoundSendMidi(int argc, reg_t *argv, reg_t acc) {
}
reg_t SoundCommandParser::kDoSoundGlobalReverb(int argc, reg_t *argv, reg_t acc) {
- if (argc == 0)
- return make_reg(0, _music->getReverb());
+ byte prevReverb = _music->getCurrentReverb();
+ byte reverb = argv[0].toUint16() & 0xF;
- debugC(2, kDebugLevelSound, "doSoundGlobalReverb: %d", argv[0].toUint16() & 0xF);
-
- // This is a bit different than SSCI, but the end result should be the same.
- // SSCI checks the first entry in the playlist for its current reverb value.
- // If it's 127 (invalid), it sets the reverb parameter of this call to the
- // driver, otherwise it doesn't, to preserve the song's reverb. When we modify
- // the global reverb, we send its value to the soundcard, if it isn't 127 (invalid).
- // This assumes that the currently set reverb in the driver will be the reverb
- // value sent from the last song, which should be the one at the top of the list.
- _music->setReverb(argv[0].toUint16() & 0xF);
+ if (argc == 1) {
+ debugC(2, kDebugLevelSound, "doSoundGlobalReverb: %d", argv[0].toUint16() & 0xF);
+ if (reverb <= 10)
+ _music->setGlobalReverb(reverb);
+ }
- return acc;
+ return make_reg(0, prevReverb);
}
reg_t SoundCommandParser::kDoSoundSetHold(int argc, reg_t *argv, reg_t acc) {