Rockbox mail archiveSubject: Re: randomness and playlists
Re: 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) ;)
----- Original Message -----
From: "Daniel Stenberg" <daniel_at_haxx.se>
Sent: Thursday, May 02, 2002 1:12 AM
Subject: randomness and playlists
> It struck me that if we end up with a playlist consisting of lots of
> and we want random selection, press play and a random tune starts... you
> 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
> becomes the same every time given the same seed.
> This way, we can store "index" and "seed" only, and then we always know
> 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
> If you're not happy with the random order, you get a new scramble by
> the seed.
> Daniel Stenberg -- Hacking Archos => http://bjorn.haxx.se/rockbox/
Received on 2002-05-02