summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/imports/audioengine/qdeclarative_playvariation_p.cpp4
-rw-r--r--src/imports/audioengine/qdeclarative_sound_p.cpp2
-rw-r--r--src/multimedia/playback/qmedianetworkplaylistprovider.cpp2
-rw-r--r--src/multimedia/playback/qmediaplaylistnavigator.cpp4
4 files changed, 6 insertions, 6 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();
diff --git a/src/multimedia/playback/qmedianetworkplaylistprovider.cpp b/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
index 50db4fad2..3f24d0f55 100644
--- a/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
+++ b/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
@@ -267,7 +267,7 @@ void QMediaNetworkPlaylistProvider::shuffle()
QList<QMediaContent> resources;
while (!d->resources.isEmpty()) {
- resources.append(d->resources.takeAt(QRandomGenerator::bounded(d->resources.size())));
+ resources.append(d->resources.takeAt(QRandomGenerator::global()->bounded(d->resources.size())));
}
d->resources = resources;
diff --git a/src/multimedia/playback/qmediaplaylistnavigator.cpp b/src/multimedia/playback/qmediaplaylistnavigator.cpp
index 0bacbf2ba..0966c9396 100644
--- a/src/multimedia/playback/qmediaplaylistnavigator.cpp
+++ b/src/multimedia/playback/qmediaplaylistnavigator.cpp
@@ -125,7 +125,7 @@ int QMediaPlaylistNavigatorPrivate::nextItemPos(int steps) const
randomModePositions.append(-1);
int res = randomModePositions[randomPositionsOffset+steps];
if (res<0 || res >= playlist->mediaCount()) {
- res = QRandomGenerator::bounded(playlist->mediaCount());
+ res = QRandomGenerator::global()->bounded(playlist->mediaCount());
randomModePositions[randomPositionsOffset+steps] = res;
}
@@ -178,7 +178,7 @@ int QMediaPlaylistNavigatorPrivate::previousItemPos(int steps) const
int res = randomModePositions[randomPositionsOffset-steps];
if (res<0 || res >= playlist->mediaCount()) {
- res = QRandomGenerator::bounded(playlist->mediaCount());
+ res = QRandomGenerator::global()->bounded(playlist->mediaCount());
randomModePositions[randomPositionsOffset-steps] = res;
}