Skip to content

Commit

Permalink
Fix hang on exit from specific MIDI devices + WinMM (#4451)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhysSong authored Jun 26, 2018
1 parent c45a21a commit 28a5228
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/midi/MidiWinMM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,13 @@ void MidiWinMM::closeDevices()
m_outputSubs.clear();

QMapIterator<HMIDIIN, QString> i( m_inputDevices );

HMIDIIN hInDev;
while( i.hasNext() )
{
midiInClose( i.next().key() );
hInDev = i.next().key();
midiInReset( hInDev );
midiInClose( hInDev );
}

QMapIterator<HMIDIOUT, QString> o( m_outputDevices );
Expand Down

0 comments on commit 28a5228

Please sign in to comment.