Previously if the loopCount property of a QSoundEffect was set to
QSoundEffect::Infinite then no sound would be played at all. This is
because QSoundEffect::Infinite == -2 and playback was only continued on
values above 0.
Task-number: QTBUG-32882
Change-Id: I739919a3e538128fc16f26ede5eb6cc4f2eb29fb
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
qint64 PrivateSoundSource::readData( char* data, qint64 len)
{
- if (m_runningCount > 0 && m_playing) {
+ if ((m_runningCount > 0 || m_runningCount == QSoundEffect::Infinite) && m_playing) {
if (m_sample->state() != QSample::Ready)
return 0;