diff options
author | Torbjörn Andersson | 2012-11-18 17:49:23 +0100 |
---|---|---|
committer | Torbjörn Andersson | 2012-11-18 17:57:01 +0100 |
commit | ae823b5c6a31a568072545503dbc5c125d19c391 (patch) | |
tree | 8b783f49ee54c9fbff7c8fa16fa46f09b17d8f09 /engines/scumm/player_v3m.cpp | |
parent | 34a8b5049e903f33a26b56da5fa32986a023feec (diff) | |
download | scummvm-rg350-ae823b5c6a31a568072545503dbc5c125d19c391.tar.gz scummvm-rg350-ae823b5c6a31a568072545503dbc5c125d19c391.tar.bz2 scummvm-rg350-ae823b5c6a31a568072545503dbc5c125d19c391.zip |
SCUMM: Fix regression that caused "pops" in MI1 jungle music
Properly treat rests as rests, not notes. Otherwise, it would try
to play a really low note which just came out as a "pop".
Diffstat (limited to 'engines/scumm/player_v3m.cpp')
-rw-r--r-- | engines/scumm/player_v3m.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/scumm/player_v3m.cpp b/engines/scumm/player_v3m.cpp index db532a9f6e..ad812a53ca 100644 --- a/engines/scumm/player_v3m.cpp +++ b/engines/scumm/player_v3m.cpp @@ -168,8 +168,13 @@ bool Player_V3M::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 = 127; + if (note > 0) { + pitchModifier = noteToPitchModifier(note, &_channel[ch]._instrument); + velocity = 127; + } else { + pitchModifier = 0; + velocity = 0; + } _channel[ch]._pos += 3; return true; } |