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/qaudioinput_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/qaudioinput_win32_p.cpp')
-rw-r--r-- | src/multimedia/audio/qaudioinput_win32_p.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp index df469d7..5152d9a 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.cpp +++ b/src/multimedia/audio/qaudioinput_win32_p.cpp @@ -156,7 +156,8 @@ void QAudioInputPrivate::freeBlocks(WAVEHDR* blockArray) int count = buffer_size/period_size; for(int i = 0; i < count; i++) { - waveInUnprepareHeader(hWaveIn,&blocks[i], sizeof(WAVEHDR)); + if (blocks->dwFlags & WHDR_PREPARED) + waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR)); blocks+=sizeof(WAVEHDR); } HeapFree(GetProcessHeap(), 0, blockArray); |