Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: RE: playlists: directories randomly, linear within directories

RE: playlists: directories randomly, linear within directories

From: Matthew P. OReilly <moreilly_at_moreilly.com>
Date: Sun, 16 Mar 2003 10:39:40 -0500

Damn, I thought I had something going there. <grin>

Well, it would seem to me that a layer of abstraction would help here...
Shuffling the playlist doesn't require reading the names of the files until
they are played, correct? Simply knowing the number of total items in the
playlist is enough to shuffle - we're only messing with the order of play.
So we simply pseudo-randomize the order of entries based on their indexed
location (16, 1504, 957, 423, 1100, 2) and read the entry name and location
when required (again, back to that semi-arbitrary 20 number). When the
playlist encounters another playlist during preload or loading, it will take
the time to process that playlist when necessary and index it in the same
manner.

Of course this depends on being able to locate items in real-time based on
an index number corresponding to their position in the playlist. I don't
know how difficult that would be, but I imagine it could be done.

What do you think, would that work?

Matt

-----Original Message-----
From: owner-rockbox_at_cool.haxx.se [mailto:owner-rockbox_at_cool.haxx.se]On
Behalf Of Daniel Stenberg
Sent: Sunday, March 16, 2003 10:04 AM
To: Rockbox
Subject: RE: playlists: directories randomly, linear within directories


On Sun, 16 Mar 2003, Matthew P. OReilly wrote:

> Ok, that makes sense, but I can't help but question the underlying
> assumption that we have to have an array for all entries which is loaded
at
> playlist start.

How else can we make a full-playlist shuffle? We need to get them all and
shuffle them...

--
 Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/
Received on 2003-03-16

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy