summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-04-19 06:12:48 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-04-19 06:12:48 (GMT)
commit1f12c4824942949f3c030f7b2afd44cfac215417 (patch)
tree393a2fcf1d84dcd561e0dafc3cab0c14f59d8c6f /src/multimedia/audio
parentf020167901f9f19ded2bd15baec11107df939894 (diff)
parent9ddb31289ac123472c300efdba28c903a8be7a07 (diff)
downloadQt-1f12c4824942949f3c030f7b2afd44cfac215417.zip
Qt-1f12c4824942949f3c030f7b2afd44cfac215417.tar.gz
Qt-1f12c4824942949f3c030f7b2afd44cfac215417.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging: Bug in QAudioOutput: Invalid use of "waveOutUnprepareHeader"
Diffstat (limited to 'src/multimedia/audio')
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp3
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp3
2 files changed, 4 insertions, 2 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);
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);