[xiph-commits] r12629 - trunk/ezstream/src

moritz at svn.xiph.org moritz at svn.xiph.org
Sun Mar 4 07:50:42 PST 2007


Author: moritz
Date: 2007-03-04 07:50:40 -0800 (Sun, 04 Mar 2007)
New Revision: 12629

Modified:
   trunk/ezstream/src/playlist.c
Log:
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.


Modified: trunk/ezstream/src/playlist.c
===================================================================
--- trunk/ezstream/src/playlist.c	2007-03-04 15:16:36 UTC (rev 12628)
+++ trunk/ezstream/src/playlist.c	2007-03-04 15:50:40 UTC (rev 12629)
@@ -115,14 +115,7 @@
 #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);



More information about the commits mailing list