imagedev/midiin.cpp: send All Notes Off CC when unloading a MIDI file (#10221)

This commit is contained in:
Devin Acker 2022-08-14 22:24:09 -04:00 committed by GitHub
parent 9ae123ea78
commit 2e91b7bbd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,6 +203,16 @@ void midiin_device::call_unload()
{
m_midi->close();
}
else
{
// send "all notes off" CC if unloading a MIDI file
for (u8 channel = 0; channel < 0x10; channel++)
{
xmit_char(0xb0 | channel);
xmit_char(123);
xmit_char(0);
}
}
m_midi.reset();
m_sequence.clear();
m_timer->enable(false);