aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/player_v5m.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/player_v5m.cpp')
-rw-r--r--engines/scumm/player_v5m.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/scumm/player_v5m.cpp b/engines/scumm/player_v5m.cpp
index d59cf9ade2..26cfb0e7c1 100644
--- a/engines/scumm/player_v5m.cpp
+++ b/engines/scumm/player_v5m.cpp
@@ -186,8 +186,15 @@ bool Player_V5M::getNextNote(int ch, uint32 &samples, int &pitchModifier, byte &
uint16 duration = READ_BE_UINT16(&_channel[ch]._data[_channel[ch]._pos]);
byte note = _channel[ch]._data[_channel[ch]._pos + 2];
samples = durationToSamples(duration);
- pitchModifier = noteToPitchModifier(note, &_channel[ch]._instrument);
- velocity = _channel[ch]._data[_channel[ch]._pos + 3];
+
+ if (note > 1) {
+ pitchModifier = noteToPitchModifier(note, &_channel[ch]._instrument);
+ velocity = _channel[ch]._data[_channel[ch]._pos + 3];
+ } else {
+ pitchModifier = 0;
+ velocity = 0;
+ }
+
_channel[ch]._pos += 4;
if (_channel[ch]._pos >= _channel[ch]._length) {