summaryrefslogtreecommitdiff
path: root/src/imports/audioengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/audioengine')
-rw-r--r--src/imports/audioengine/qdeclarative_playvariation_p.cpp4
-rw-r--r--src/imports/audioengine/qdeclarative_sound_p.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/imports/audioengine/qdeclarative_playvariation_p.cpp b/src/imports/audioengine/qdeclarative_playvariation_p.cpp
index 5dd88506b..e6d3697d0 100644
--- a/src/imports/audioengine/qdeclarative_playvariation_p.cpp
+++ b/src/imports/audioengine/qdeclarative_playvariation_p.cpp
@@ -273,7 +273,7 @@ void QDeclarativePlayVariation::setSampleObject(QDeclarativeAudioSample *sampleO
void QDeclarativePlayVariation::applyParameters(QSoundInstance *soundInstance)
{
- qreal pitch = QRandomGenerator::bounded(1001 * 0.001f) * (m_maxPitch - m_minPitch) + m_minPitch;
- qreal gain = QRandomGenerator::bounded(1001 * 0.001f) * (m_maxGain - m_minGain) + m_minGain;
+ qreal pitch = QRandomGenerator::global()->bounded(1001 * 0.001f) * (m_maxPitch - m_minPitch) + m_minPitch;
+ qreal gain = QRandomGenerator::global()->bounded(1001 * 0.001f) * (m_maxGain - m_minGain) + m_minGain;
soundInstance->updateVariationParameters(pitch, gain, m_looping);
}
diff --git a/src/imports/audioengine/qdeclarative_sound_p.cpp b/src/imports/audioengine/qdeclarative_sound_p.cpp
index adbe9e53a..a11490cea 100644
--- a/src/imports/audioengine/qdeclarative_sound_p.cpp
+++ b/src/imports/audioengine/qdeclarative_sound_p.cpp
@@ -317,7 +317,7 @@ int QDeclarativeSound::genVariationIndex(int oldVariationIndex)
case QDeclarativeSound::Random: {
if (oldVariationIndex < 0)
oldVariationIndex = 0;
- return (oldVariationIndex + (QRandomGenerator::bounded(m_playlist.count() + 1))) % m_playlist.count();
+ return (oldVariationIndex + (QRandomGenerator::global()->bounded(m_playlist.count() + 1))) % m_playlist.count();
}
default:
return (oldVariationIndex + 1) % m_playlist.count();