summaryrefslogtreecommitdiffstats
path: root/apps/playlist.h
diff options
context:
space:
mode:
authorHardeep Sidhu <dyp@pobox.com>2002-10-06 05:50:41 +0000
committerHardeep Sidhu <dyp@pobox.com>2002-10-06 05:50:41 +0000
commit83611fe8c32d99bb463358f5ec8e0ebe466f1f42 (patch)
treeb91fa4d1e70adbccb10978b64db3c5d721b4b71c /apps/playlist.h
parentac2e0f1c3286edff9027404d4d15bc5e2445a4a2 (diff)
downloadrockbox-83611fe8c32d99bb463358f5ec8e0ebe466f1f42.tar.gz
rockbox-83611fe8c32d99bb463358f5ec8e0ebe466f1f42.zip
Store the first index of the playlist and use it when calculating the next index in repeat off mode so that shuffled dirplay works correctly when "play selected" is enabled.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2514 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playlist.h')
-rw-r--r--apps/playlist.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/playlist.h b/apps/playlist.h
index a18240db7f..9f66b7f49e 100644
--- a/apps/playlist.h
+++ b/apps/playlist.h
@@ -28,10 +28,11 @@
struct playlist_info
{
- char filename[MAX_PATH]; /* path name of m3u playlist on disk */
+ char filename[MAX_PATH]; /* path name of m3u playlist on disk */
int dirlen; /* Length of the path to the playlist file */
int indices[MAX_PLAYLIST_SIZE]; /* array of indices */
- int index; /* index of *NEXT* track to play */
+ int index; /* index of current playing track */
+ int first_index; /* index of first song in playlist */
int seed; /* random seed */
int amount; /* number of tracks in the index */
bool in_ram; /* True if the playlist is RAM-based */
@@ -41,7 +42,8 @@ extern struct playlist_info playlist;
extern bool playlist_shuffle;
int play_list(char *dir, char *file, int start_index,
- bool shuffled_index, int start_offset, int random_seed );
+ bool shuffled_index, int start_offset,
+ int random_seed, int first_index);
char* playlist_peek(int steps);
int playlist_next(int steps);
void randomise_playlist( unsigned int seed );