summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/multimedia/audio/qsoundeffect_pulse_p.cpp3
-rw-r--r--tests/auto/integration/qsound/test2.wavbin38316 -> 0 bytes
-rw-r--r--tests/auto/integration/qsound/tst_qsound.cpp2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/multimedia/audio/qsoundeffect_pulse_p.cpp b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
index 373586ef5..58143fcc2 100644
--- a/src/multimedia/audio/qsoundeffect_pulse_p.cpp
+++ b/src/multimedia/audio/qsoundeffect_pulse_p.cpp
@@ -567,7 +567,7 @@ void QSoundEffectPrivate::play()
return;
PulseDaemonLocker locker;
- if (!m_sampleReady || !m_pulseStream || m_stopping || m_emptying) {
+ if (!m_pulseStream || m_status != QSoundEffect::Ready || m_stopping || m_emptying) {
#ifdef QT_PA_DEBUG
qDebug() << this << "play deferred";
#endif
@@ -794,6 +794,7 @@ void QSoundEffectPrivate::playSample()
qDebug() << this << "playSample";
#endif
Q_ASSERT(m_pulseStream);
+ Q_ASSERT(pa_stream_get_state(m_pulseStream) == PA_STREAM_READY);
pa_operation_unref(pa_stream_cork(m_pulseStream, 0, 0, 0));
}
diff --git a/tests/auto/integration/qsound/test2.wav b/tests/auto/integration/qsound/test2.wav
deleted file mode 100644
index e4088a973..000000000
--- a/tests/auto/integration/qsound/test2.wav
+++ /dev/null
Binary files differ
diff --git a/tests/auto/integration/qsound/tst_qsound.cpp b/tests/auto/integration/qsound/tst_qsound.cpp
index 6f98c45bb..3cb060c19 100644
--- a/tests/auto/integration/qsound/tst_qsound.cpp
+++ b/tests/auto/integration/qsound/tst_qsound.cpp
@@ -123,7 +123,7 @@ void tst_QSound::testStop()
void tst_QSound::testStaticPlay()
{
// Check that you hear sound with static play also.
- const QString testFileName = QStringLiteral("test2.wav");
+ const QString testFileName = QStringLiteral("test.wav");
const QString fullPath = QFINDTESTDATA(testFileName);
QVERIFY2(!fullPath.isEmpty(), qPrintable(QStringLiteral("Unable to locate ") + testFileName));