From d3c02f0c51f9cf69245a42ee690d90cd657c5fe2 Mon Sep 17 00:00:00 2001 From: Lev Zelenskiy Date: Fri, 29 Jun 2012 15:56:43 +1000 Subject: Clean buffers before closing the input device. Input device handle is invalid after waveInClose() QTBUG-24119 Change-Id: I3b2554f816f5ca66be4d992a0a579561639caf9f Reviewed-by: Michael Goddard --- src/multimedia/audio/qaudioinput_win32_p.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index f28b2e3..cb1baf8 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -338,6 +338,13 @@ void QAudioInputPrivate::close() deviceState = QAudio::StoppedState; waveInReset(hWaveIn); + + mutex.lock(); + for (int i=0; i