|
Rockbox mail archiveSubject: Re: randomness and playlistsRe: randomness and playlists
From: Andrew Jamieson <ajamiesn_at_mira.net>
Date: Thu, 2 May 2002 21:01:06 +1000 This is a good idea. A couple of questions: * What are you planning to use as the entropy source for the random seed? The least significant digits on keystroke timing and hard disk spin-up timing is sometimes used in crypto circles. Also there are the A/D inputs (that go somewhere, and may not be usable, I'll check this). * What algorithm are you thinking of for the iterations (something like SHA-1 would be indistingushible from random for our purposes, but is probably overkill)? And how do we stop songs repeating? Just trying to make myself feel useful (or at least annoying) ;) A ----- Original Message ----- From: "Daniel Stenberg" <daniel_at_haxx.se> To: <rockbox_at_cool.haxx.se> Sent: Thursday, May 02, 2002 1:12 AM Subject: randomness and playlists > Hey > > It struck me that if we end up with a playlist consisting of lots of tracks > and we want random selection, press play and a random tune starts... you play > N pieces of music and then shuts off. > > Now, you start the player again. Where do you start again? > > My thoughts: > > We do no true random selections. We do a random based on a seed. The random > becomes the same every time given the same seed. > > This way, we can store "index" and "seed" only, and then we always know which > track we played before this one (in fact, we have full backtrace all the > way), which one is next etc. No matter if you shut off the player in > between... And you won't hear the same tune twice until all tunes are played! > > If you're not happy with the random order, you get a new scramble by changing > the seed. > > -- > Daniel Stenberg -- Hacking Archos => http://bjorn.haxx.se/rockbox/ > Received on 2002-05-02 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |