Fix hang in tst_qaudioinput (Windows).
Task-number: QTBUG-28731 Change-Id: Iebe598f9e0760b05d05d5a6b6ecbeb535e745e2c Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com>
This commit is contained in:
committed by
The Qt Project
parent
3d848f05ad
commit
f2af807c5b
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user