lundi 18 décembre 2017

How to seed random for QMediaPlaylist

QMediaPlaylist's random playback is not really random.

It has same sequence for every application running.

I looked at the source code, and find it use QRandomGenerator::global() to get random.

But when I run QRandomGenerator::global()->seed(100);, I got error: Attempted to overwrite a QRandomGenerator to system() or global().




Aucun commentaire:

Enregistrer un commentaire