diff options
author | Hardeep Sidhu <dyp@pobox.com> | 2002-10-06 05:50:41 +0000 |
---|---|---|
committer | Hardeep Sidhu <dyp@pobox.com> | 2002-10-06 05:50:41 +0000 |
commit | 83611fe8c32d99bb463358f5ec8e0ebe466f1f42 (patch) | |
tree | b91fa4d1e70adbccb10978b64db3c5d721b4b71c /apps/playlist.h | |
parent | ac2e0f1c3286edff9027404d4d15bc5e2445a4a2 (diff) | |
download | rockbox-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.h | 8 |
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 @@ | |||
28 | 28 | ||
29 | struct playlist_info | 29 | struct playlist_info |
30 | { | 30 | { |
31 | char filename[MAX_PATH]; /* path name of m3u playlist on disk */ | 31 | char filename[MAX_PATH]; /* path name of m3u playlist on disk */ |
32 | int dirlen; /* Length of the path to the playlist file */ | 32 | int dirlen; /* Length of the path to the playlist file */ |
33 | int indices[MAX_PLAYLIST_SIZE]; /* array of indices */ | 33 | int indices[MAX_PLAYLIST_SIZE]; /* array of indices */ |
34 | int index; /* index of *NEXT* track to play */ | 34 | int index; /* index of current playing track */ |
35 | int first_index; /* index of first song in playlist */ | ||
35 | int seed; /* random seed */ | 36 | int seed; /* random seed */ |
36 | int amount; /* number of tracks in the index */ | 37 | int amount; /* number of tracks in the index */ |
37 | bool in_ram; /* True if the playlist is RAM-based */ | 38 | bool in_ram; /* True if the playlist is RAM-based */ |
@@ -41,7 +42,8 @@ extern struct playlist_info playlist; | |||
41 | extern bool playlist_shuffle; | 42 | extern bool playlist_shuffle; |
42 | 43 | ||
43 | int play_list(char *dir, char *file, int start_index, | 44 | int play_list(char *dir, char *file, int start_index, |
44 | bool shuffled_index, int start_offset, int random_seed ); | 45 | bool shuffled_index, int start_offset, |
46 | int random_seed, int first_index); | ||
45 | char* playlist_peek(int steps); | 47 | char* playlist_peek(int steps); |
46 | int playlist_next(int steps); | 48 | int playlist_next(int steps); |
47 | void randomise_playlist( unsigned int seed ); | 49 | void randomise_playlist( unsigned int seed ); |