Skip to content

Installation #3

Answered by RondeSC
voterpublic asked this question in Q&A
Discussion options

You must be logged in to vote

If upon starting, "the very same songs are always played", and not just some occurrences of repeats, it's likely not the shuffle algorithm but the random (PRNG) function. All shuffle algorithms are to some degree dependent on a system random function. As a PRNG function is not random at all, it must be initialized with a random seed value based on an independent event.
When you start the player or switch to ‘shuffle’ you could reseed the PRNG (e.g. using ‘srand()’) with the value of the system millisecond clock (not automatically from 'cron').

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by RondeSC
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants