diff options
author | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-04-19 02:25:56 (GMT) |
---|---|---|
committer | Kurt Korbatits <kurt.korbatits@nokia.com> | 2010-04-19 02:25:56 (GMT) |
commit | 9ddb31289ac123472c300efdba28c903a8be7a07 (patch) | |
tree | 13b5ff26ba84ce58a1c4536953a485cef07c4b89 /src/multimedia/audio/qaudiooutput_win32_p.cpp | |
parent | 544bbfadc0703597b7084213261053ca0e2facf6 (diff) | |
download | Qt-9ddb31289ac123472c300efdba28c903a8be7a07.zip Qt-9ddb31289ac123472c300efdba28c903a8be7a07.tar.gz Qt-9ddb31289ac123472c300efdba28c903a8be7a07.tar.bz2 |
Bug in QAudioOutput: Invalid use of "waveOutUnprepareHeader"
Fixed freeBlocks func in both input and output
Task-number:QTBUG-9875
Reviewed-by:Andrew den Exter
Diffstat (limited to 'src/multimedia/audio/qaudiooutput_win32_p.cpp')
-rw-r--r-- | src/multimedia/audio/qaudiooutput_win32_p.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp index e818723..b92565d 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.cpp +++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp @@ -150,7 +150,8 @@ void QAudioOutputPrivate::freeBlocks(WAVEHDR* blockArray) int count = buffer_size/period_size; for(int i = 0; i < count; i++) { - waveOutUnprepareHeader(hWaveOut,&blocks[i], sizeof(WAVEHDR)); + if (blocks->dwFlags & WHDR_PREPARED) + waveOutUnprepareHeader(hWaveOut,blocks, sizeof(WAVEHDR)); blocks+=sizeof(WAVEHDR); } HeapFree(GetProcessHeap(), 0, blockArray); |