Remove checking exact remaining loop amount right after calling play()

Depending on platform it is unknown how many times it has already been
actually playing the audio.

Change-Id: I27b65cee8de5f9f75ceda277ee22d86f7897ce7b
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Pasi Petäjäjärvi
2016-01-11 17:20:29 +02:00
committed by Yoann Lopes
parent 0521766417
commit ba847185e2

View File

@@ -150,8 +150,7 @@ void tst_QSoundEffect::testLooping()
QCOMPARE(readSignal_Remaining.count(), 0);
sound->play();
QCOMPARE(sound->loopsRemaining(), 5);
QCOMPARE(readSignal_Remaining.count(), 1);
QVERIFY(readSignal_Remaining.count() > 0);
// test.wav is about 200ms, wait until it has finished playing 5 times
QTestEventLoop::instance().enterLoop(3);
@@ -172,8 +171,7 @@ void tst_QSoundEffect::testLooping()
QCOMPARE(readSignal_Remaining.count(), 0);
sound->play();
QCOMPARE(sound->loopsRemaining(), 30);
QCOMPARE(readSignal_Remaining.count(), 1);
QVERIFY(readSignal_Remaining.count() > 0);
// wait for the sound to be played several times
QTRY_COMPARE(sound->loopsRemaining(), 20);