From ab65e333342b59deea859e07bf57a9a6dee97de3 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Mon, 27 Aug 2018 09:30:14 +0200 Subject: early koff update to prevent a bad reuse of channel --- src/adlmidi_midiplay.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/adlmidi_midiplay.cpp') 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; } -- cgit v1.2.3