diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-04-11 09:45:50 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-16 08:12:43 +0200 |
commit | f2af807c5bef83a6b0f79b3adacae72d8be5b1ad (patch) | |
tree | d307bb9db8d13dfa95f9d6d9f6bad3ac2143f36a /tests/auto/integration/qaudioinput/tst_qaudioinput.cpp | |
parent | 3d848f05ad88e0207d372a6d98a658c5d6e57212 (diff) | |
download | qtmultimedia-f2af807c5bef83a6b0f79b3adacae72d8be5b1ad.tar.gz qtmultimedia-f2af807c5bef83a6b0f79b3adacae72d8be5b1ad.tar.bz2 qtmultimedia-f2af807c5bef83a6b0f79b3adacae72d8be5b1ad.zip |
Fix hang in tst_qaudioinput (Windows).
Task-number: QTBUG-28731
Change-Id: Iebe598f9e0760b05d05d5a6b6ecbeb535e745e2c
Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
Diffstat (limited to 'tests/auto/integration/qaudioinput/tst_qaudioinput.cpp')
-rwxr-xr-x | tests/auto/integration/qaudioinput/tst_qaudioinput.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp index 9fb4dcbf..d1498379 100755 --- a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp @@ -767,9 +767,9 @@ void tst_QAudioInput::pushSuspendResume() QVERIFY(audioInput.processedUSecs() == processedUs); // Drain any data, in case we run out of space when resuming - while (audioInput.bytesReady() >= audioInput.periodSize()) { + const int reads = audioInput.bytesReady() / audioInput.periodSize(); + for (int r = 0; r < reads; ++r) feed->read(buffer.data(), audioInput.periodSize()); - } audioInput.resume(); |