|
|
@ -35,6 +35,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <vector>
|
|
|
|
#include <algorithm>
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
|
|
#include <random>
|
|
|
|
using std::vector;
|
|
|
|
using std::vector;
|
|
|
|
using std::iterator;
|
|
|
|
using std::iterator;
|
|
|
|
|
|
|
|
|
|
|
@ -548,9 +549,9 @@ void Dub::Shuffle_OneDir::init(const TQString& dir)
|
|
|
|
kdDebug(90010) << num_items << " file items" << endl;
|
|
|
|
kdDebug(90010) << num_items << " file items" << endl;
|
|
|
|
for (int i=0; i<num_items; i++)
|
|
|
|
for (int i=0; i<num_items; i++)
|
|
|
|
play_order[i] = i;
|
|
|
|
play_order[i] = i;
|
|
|
|
Random random;
|
|
|
|
std::random_device randomDev;
|
|
|
|
Random::init();
|
|
|
|
std::mt19937 randomGenerator(randomDev());
|
|
|
|
std::random_shuffle(play_order.begin(), play_order.end(), random);
|
|
|
|
std::shuffle(play_order.begin(), play_order.end(), randomGenerator);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|