diff options
-rw-r--r-- | firmware/mpeg.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index fb27a3b904..914dd38319 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -292,6 +292,9 @@ static void remove_all_tags(void) | |||
292 | 292 | ||
293 | for(i = 0;i < MAX_ID3_TAGS;i++) | 293 | for(i = 0;i < MAX_ID3_TAGS;i++) |
294 | remove_current_tag(); | 294 | remove_current_tag(); |
295 | |||
296 | tag_write_idx = tag_read_idx; | ||
297 | |||
295 | debug_tags(); | 298 | debug_tags(); |
296 | } | 299 | } |
297 | #endif | 300 | #endif |
@@ -1133,9 +1136,8 @@ static void track_change(void) | |||
1133 | #endif | 1136 | #endif |
1134 | remove_current_tag(); | 1137 | remove_current_tag(); |
1135 | 1138 | ||
1136 | current_track_counter++; | ||
1137 | |||
1138 | update_playlist(); | 1139 | update_playlist(); |
1140 | current_track_counter++; | ||
1139 | } | 1141 | } |
1140 | 1142 | ||
1141 | #ifdef DEBUG | 1143 | #ifdef DEBUG |
@@ -1323,8 +1325,8 @@ static void mpeg_thread(void) | |||
1323 | play_pending = true; | 1325 | play_pending = true; |
1324 | paused = false; | 1326 | paused = false; |
1325 | 1327 | ||
1326 | current_track_counter++; | ||
1327 | update_playlist(); | 1328 | update_playlist(); |
1329 | current_track_counter++; | ||
1328 | break; | 1330 | break; |
1329 | 1331 | ||
1330 | case MPEG_STOP: | 1332 | case MPEG_STOP: |
@@ -1366,10 +1368,10 @@ static void mpeg_thread(void) | |||
1366 | if ( num_tracks_in_memory() > 1 ) { | 1368 | if ( num_tracks_in_memory() > 1 ) { |
1367 | int unplayed_space_left, unswapped_space_left; | 1369 | int unplayed_space_left, unswapped_space_left; |
1368 | 1370 | ||
1369 | /* stop the current stream */ | 1371 | /* stop the current stream */ |
1370 | play_pending = false; | 1372 | play_pending = false; |
1371 | playing = false; | 1373 | playing = false; |
1372 | stop_dma(); | 1374 | stop_dma(); |
1373 | 1375 | ||
1374 | track_change(); | 1376 | track_change(); |
1375 | mp3buf_read = id3tags[tag_read_idx]->mempos; | 1377 | mp3buf_read = id3tags[tag_read_idx]->mempos; |
@@ -1423,8 +1425,8 @@ static void mpeg_thread(void) | |||
1423 | to start playing as soon as we have some data */ | 1425 | to start playing as soon as we have some data */ |
1424 | play_pending = true; | 1426 | play_pending = true; |
1425 | 1427 | ||
1426 | current_track_counter++; | ||
1427 | update_playlist(); | 1428 | update_playlist(); |
1429 | current_track_counter++; | ||
1428 | } | 1430 | } |
1429 | } | 1431 | } |
1430 | break; | 1432 | break; |
@@ -1458,8 +1460,8 @@ static void mpeg_thread(void) | |||
1458 | start playing as soon as we have some data */ | 1460 | start playing as soon as we have some data */ |
1459 | play_pending = true; | 1461 | play_pending = true; |
1460 | 1462 | ||
1461 | current_track_counter++; | ||
1462 | update_playlist(); | 1463 | update_playlist(); |
1464 | current_track_counter++; | ||
1463 | } | 1465 | } |
1464 | break; | 1466 | break; |
1465 | } | 1467 | } |
@@ -2287,8 +2289,8 @@ void mpeg_next(void) | |||
2287 | continue; | 2289 | continue; |
2288 | } | 2290 | } |
2289 | index = playlist_next(steps); | 2291 | index = playlist_next(steps); |
2290 | current_track_counter++; | ||
2291 | taginfo.index = index; | 2292 | taginfo.index = index; |
2293 | current_track_counter++; | ||
2292 | is_playing = true; | 2294 | is_playing = true; |
2293 | playing = true; | 2295 | playing = true; |
2294 | break; | 2296 | break; |
@@ -2314,8 +2316,8 @@ void mpeg_prev(void) | |||
2314 | continue; | 2316 | continue; |
2315 | } | 2317 | } |
2316 | index = playlist_next(steps); | 2318 | index = playlist_next(steps); |
2317 | current_track_counter++; | ||
2318 | taginfo.index = index; | 2319 | taginfo.index = index; |
2320 | current_track_counter++; | ||
2319 | is_playing = true; | 2321 | is_playing = true; |
2320 | playing = true; | 2322 | playing = true; |
2321 | break; | 2323 | break; |