mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2025-02-02 15:07:45 -05:00
While rand() being crappy is true for most/all *nix systems, on Windows, this
is different. The shifting severely screwed up its randomness. Just leave it away and systems that only have a bad version of rand() will have to just deal with it. git-svn-id: https://svn.xiph.org/trunk/ezstream@12629 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
parent
79f9d809d5
commit
78c5cc3115
@ -115,14 +115,7 @@ playlist_random(void)
|
||||
#elif HAVE_RANDOM
|
||||
ret = (unsigned int)random();
|
||||
#else
|
||||
/*
|
||||
* Throw away the lower 12 bits; they go through a cyclic pattern.
|
||||
* While this means that items in gigantic playlists won't be put
|
||||
* beyond a certain distance from their original place in the list,
|
||||
* it still improves the quality of the shuffler if this PRNG has
|
||||
* to be used.
|
||||
*/
|
||||
ret = (unsigned int)rand() >> 12;
|
||||
ret = (unsigned int)rand();
|
||||
#endif
|
||||
|
||||
return (ret);
|
||||
|
Loading…
Reference in New Issue
Block a user