aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_midi.cpp2
-rw-r--r--engines/scumm/player_towns.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_midi.cpp b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
index d69ed73ee6..b8203944c0 100644
--- a/audio/softsynth/fmtowns_pc98/towns_midi.cpp
+++ b/audio/softsynth/fmtowns_pc98/towns_midi.cpp
@@ -563,7 +563,7 @@ int TownsMidiOutputChannel::getEffectModLevel(int lvl, int mod) {
if (lvl < 0)
return -_driver->_operatorLevelTable[((-lvl) << 5) + mod];
else
- return _driver->_operatorLevelTable[((-lvl) << 5) + mod];
+ return _driver->_operatorLevelTable[(lvl << 5) + mod];
}
return 0;
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp
index dd7630d370..f6f493a1e1 100644
--- a/engines/scumm/player_towns.cpp
+++ b/engines/scumm/player_towns.cpp
@@ -242,7 +242,8 @@ void Player_Towns_v1::startSound(int sound) {
}
velocity = velocity ? velocity >> 2 : ptr[14] >> 1;
- playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : ptr[50], READ_LE_UINT16(ptr + 10));
+ uint16 len = READ_LE_UINT16(ptr) + 2;
+ playPcmTrack(sound, ptr + 6, velocity, 64, note ? note : (len > 50 ? ptr[50] : 60), READ_LE_UINT16(ptr + 10));
} else if (type == 1) {
playEuphonyTrack(sound, ptr + 6);