aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJP Cimalando <jpcima@users.noreply.github.com>2018-08-27 09:30:14 +0200
committerJP Cimalando <jpcima@users.noreply.github.com>2018-08-27 09:30:14 +0200
commitab65e333342b59deea859e07bf57a9a6dee97de3 (patch)
tree80df2fc74f89e28f6dd5572105f2911bc2b90702 /src
parent8bd614ddcb75541711ef287880f08c9f49f139b1 (diff)
downloadlibADLMIDI-ab65e333342b59deea859e07bf57a9a6dee97de3.tar.gz
libADLMIDI-ab65e333342b59deea859e07bf57a9a6dee97de3.tar.bz2
libADLMIDI-ab65e333342b59deea859e07bf57a9a6dee97de3.zip
early koff update to prevent a bad reuse of channel
Diffstat (limited to 'src')
-rw-r--r--src/adlmidi_midiplay.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index fc5a019..49aa119 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -578,6 +578,15 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity)
}
noteUpdate(channel, ir.first, Upd_All | Upd_Patch);
+
+ for(unsigned ccount = 0; ccount < MIDIchannel::NoteInfo::MaxNumPhysChans; ++ccount)
+ {
+ int32_t c = adlchannel[ccount];
+ if(c < 0)
+ continue;
+ m_chipChannels[c].addAge(0);
+ }
+
return true;
}