* David A. Walker ([EMAIL PROTECTED]) wrote:
> In my recent explorations of the freeamp playlist code, I discovered
> something very interesting. There are five separate places where
> random_shuffle is called, all of them pertaining to shuffling the playlis
> or adding items to a shuffled list. Three of these functions use my_rand
> as a parameter to random_shuffle, where my_rand is a small function that
> seeds and uses the OS default rand() function. However, the two most used
> functions do not use this, but instead use the STL default random
> generator, which never gets seeded. This results in the shuffle operation
> shuffling the same list the same way every time! The interesting thing is
> that these functions used to use my_rand, but that got commented out. Is
> there a reason behind this?

I was also looking at the shuffle function a little while ago, and noticed
the same thing.  However, I removed the comments and have been running
it for awhile and the shuffle isn't noticibly better, unfortunately.  
According to Isaac, the best bet would be to rip out all the random play
code and redo it in a slightly sane manner.  Unfortunately, I haven't had
time to look at the code closely enough to start this...

-- 
.michael lea                   _/_/  "when in danger or in 
  Associate System Engineer   _/_/    doubt, run in circles, 
    [EMAIL PROTECTED]           _/_/     scream and shout"
_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to