diff options
author | Johannes Schickel | 2012-09-30 21:27:55 +0200 |
---|---|---|
committer | Johannes Schickel | 2012-09-30 21:28:18 +0200 |
commit | 78e8b9dd5901fa396e06611c3320b17e50ef0822 (patch) | |
tree | af5fa28316d6e72b0754b06f5776c2824018d369 /audio/softsynth | |
parent | e5c41cbf9a5d00ee1b78112536c6916119964590 (diff) | |
download | scummvm-rg350-78e8b9dd5901fa396e06611c3320b17e50ef0822.tar.gz scummvm-rg350-78e8b9dd5901fa396e06611c3320b17e50ef0822.tar.bz2 scummvm-rg350-78e8b9dd5901fa396e06611c3320b17e50ef0822.zip |
AUDIO: Properly handle AdLibPercussionChannel::noteOff.
Diffstat (limited to 'audio/softsynth')
-rw-r--r-- | audio/softsynth/adlib.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/audio/softsynth/adlib.cpp b/audio/softsynth/adlib.cpp index 000939735f..a0429e54f8 100644 --- a/audio/softsynth/adlib.cpp +++ b/audio/softsynth/adlib.cpp @@ -839,18 +839,16 @@ void AdLibPercussionChannel::init(MidiDriver_ADLIB *owner, byte channel) { } void AdLibPercussionChannel::noteOff(byte note) { - // Jamieson630: Unless I run into a specific instrument that - // may require a key off, I'm going to ignore this message. - // The rationale is that a percussion instrument should - // fade out of its own accord, and the AdLib instrument - // definitions used should follow this rule. Since - // percussion voices are allocated at the lowest priority - // anyway, we know that "hanging" percussion sounds will - // not prevent later musical instruments (or even other - // percussion sounds) from playing. - /* + if (_customInstruments[note]) { + note = _notes[note]; + } + + // This used to ignore note off events, since the builtin percussion + // instrument data has a duration value, which causes the percussion notes + // to stop automatically. This is not the case for (Groovie's) custom + // percussion instruments though. Also the OPL3 driver of Sam&Max actually + // does not handle the duration value, so we need it there too. _owner->partKeyOff(this, note); - */ } void AdLibPercussionChannel::noteOn(byte note, byte velocity) { |