summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 0cb9d09f32..f3081397f6 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -66,7 +66,7 @@ int playlist_add(char *filename)
66 return 0; 66 return 0;
67} 67}
68 68
69char* playlist_next(int steps) 69char* playlist_next(int steps, int* index)
70{ 70{
71 int seek; 71 int seek;
72 int max; 72 int max;
@@ -103,7 +103,9 @@ char* playlist_next(int steps)
103 else 103 else
104 return NULL; 104 return NULL;
105 } 105 }
106 106
107 if (index)
108 *index = playlist.index;
107 109
108 /* Zero-terminate the file name */ 110 /* Zero-terminate the file name */
109 seek=0; 111 seek=0;
@@ -165,7 +167,11 @@ char* playlist_next(int steps)
165 } 167 }
166} 168}
167 169
168void play_list(char *dir, char *file, int start_index) 170void play_list(char *dir,
171 char *file,
172 int start_index,
173 int start_offset,
174 int random_seed )
169{ 175{
170 char *sep=""; 176 char *sep="";
171 int dirlen; 177 int dirlen;
@@ -211,7 +217,7 @@ void play_list(char *dir, char *file, int start_index)
211 status_draw(); 217 status_draw();
212 lcd_update(); 218 lcd_update();
213 } 219 }
214 randomise_playlist( current_tick ); 220 randomise_playlist( random_seed );
215 } 221 }
216 222
217 if(!playlist.in_ram) { 223 if(!playlist.in_ram) {
@@ -220,7 +226,7 @@ void play_list(char *dir, char *file, int start_index)
220 lcd_update(); 226 lcd_update();
221 } 227 }
222 /* also make the first song get playing */ 228 /* also make the first song get playing */
223 mpeg_play(playlist_next(0)); 229 mpeg_play(start_offset);
224} 230}
225 231
226/* 232/*