|
Rockbox mail archiveSubject: RE: playlists: directories randomly, linear within directoriesRE: playlists: directories randomly, linear within directories
From: Blue Chip <cs_bluechip_at_webtribe.net>
Date: Sun, 16 Mar 2003 16:16:01 +0000 Without a file list, if you want to access file #2947, you will need to rescan the entire hard drive again and stop at that number. To minimise problems you can store only the info for, say, every 10th file, and then count from there. Or maybe you could store the playlist in the root dir (from where you wish to play), and then just read line #2947 from that file. The big dilemma being not playing the same song twice - standard {X = ((a*X)+c)%m} formulae _will_ generate duplicate hits before completing the run. >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 |