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: Nix <nix_at_esperi.demon.co.uk>
Date: 15 Mar 2003 18:40:06 +0000

On Sat, 15 Mar 2003, Daniel Stenberg uttered the following:
> On Sat, 15 Mar 2003, Nix wrote:
>> Since that (`recursive playlists'?) doesn't work it's unsurprising that
>> there's no way to play a sub-playlist linearly within a shuffled
>> super-playlist.
>
> If you spend some time reading the playlist code or reading about the
> playlist concept, you'll soon come to understand that it might not be
> something easily done.

Agreed, it's not that easy :(

>> Anyway, if I haven't missed a simpler way to do this, I'll go off and
>> implement sub-playlists and such.
>
> I think I'm not the only one who's very interested in how to plan to make
> this work with the existing functionality.

I'm not aware of all the existing functionality; hence my question here.
(`Is this sensible'...)

>> Of course the playlist will have to move to being stored on the stack in
>> play_list(); does this count as dynamic memory allocation?
>
> Well, when you've loaded the first song in that dir, the user wants to be
> able to press BACK and then FORWARD again...

Hm. True. We'd have to do all the recursion at once and build a bigger
playlist (probably doing the shuffling at the same time); this would probably
fit into the existing code more easily than would recursion of play_list().

> And, why would a specified
> directory be played linearly if I have set 'shuffle' to YES? And I assume
> that the second you say you can do this, people will want sub-lists that are
> playlists and not directory names...

You may well be right. This'll lead to a situation where *playlists* have an
optional play order that takes precedence over the systemwide one, which is
a bit of a bugger, because I really don't want to disrupt the nice property that
playlists are just lists of filenames. Perhaps if directories contain playlists
with a magic name, viz

.linear.m3u -> if recursing into this directory, play this playlist linearly
.shuffle.m3u -> play this playlist randomly

and so on... I'm not sure how intuitive this is, though.

> I like your "ok then, I'll go make this happen"-attitude. That's the kind of
> spirit we need to get things happen. I'm still curious on the implementation
> details... ;-)

That's the interesting question, to be sure... but as I need it, so it
*shall* come to pass. And since I seem to have lost my ten-thousand-mile-long
bullwhip, I'll have to do it myself. :)

-- 
#ifdef USE_ISPTS_FLAG
		} else {	/* else pty, not pts */
#endif
Received on 2003-03-15

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