summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVal Doroshchuk <valentyn.doroshchuk@qt.io>2017-10-30 13:48:43 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-11-23 12:13:47 +0000
commitb04e044e24d67dc6092d964247900e081b628623 (patch)
tree12bbe23778c99a9f2d6c252c3a437c7b3e358871 /src
parent44e69e24adcd3cb6440d67cdc7a4a3d2883f91f7 (diff)
WindowsAudio: Remove unneeded Sleep() when stopping playback
To terminate playback waveOutReset is already used. Task-number: QTBUG-35916 Change-Id: I50d6c25c944b01d7dfe62b2f80ec153231818a33 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/windowsaudio/qwindowsaudiooutput.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/plugins/windowsaudio/qwindowsaudiooutput.cpp b/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
index 815b7897..eb4caf12 100644
--- a/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
+++ b/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
@@ -298,10 +298,7 @@ void QWindowsAudioOutput::close()
deviceState = QAudio::StoppedState;
errorState = QAudio::NoError;
- int delay = (buffer_size-bytesFree())*1000/(settings.sampleRate()
- *settings.channelCount()*(settings.sampleSize()/8));
waveOutReset(hWaveOut);
- Sleep(delay+10);
freeBlocks(waveBlocks);
waveOutClose(hWaveOut);