From d10913e2de736b8b34d5efe12548c50296add378 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 15 Nov 2016 09:19:24 +1000 Subject: [PATCH] Fix intermittent hang when stopping PortaudioBackend This issue is not always reproducible but when it does occur it happens somewhat consistently on both 32bit and 64bit builds(Tested on Windows 7). The midiOutReset call does not return (or it takes so long that it might as well be indefinite) and as it is not strictly necessary just remove it. Resolves: http://tracker.ardour.org/view.php?id=7095 --- libs/backends/portaudio/winmmemidi_output_device.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libs/backends/portaudio/winmmemidi_output_device.cc b/libs/backends/portaudio/winmmemidi_output_device.cc index 89011d34d3..5730e4b1be 100644 --- a/libs/backends/portaudio/winmmemidi_output_device.cc +++ b/libs/backends/portaudio/winmmemidi_output_device.cc @@ -118,13 +118,7 @@ WinMMEMidiOutputDevice::close (std::string& error_msg) { // return error message for first error encountered? bool success = true; - MMRESULT result = midiOutReset (m_handle); - if (result != MMSYSERR_NOERROR) { - error_msg = get_error_string (result); - DEBUG_MIDI (error_msg); - success = false; - } - result = midiOutClose (m_handle); + MMRESULT result = midiOutClose (m_handle); if (result != MMSYSERR_NOERROR) { error_msg = get_error_string (result); DEBUG_MIDI (error_msg);