1
0
Fork 0
forked from len0rd/rockbox

Don't signal track change until all id3 entries have been updated. Also, correctly set new write index after removing all tracks. Both changes fix potential resume bugs.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3024 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Hardeep Sidhu 2002-12-19 00:58:11 +00:00
parent d2f90c9a74
commit d3d1b98d58

View file

@ -292,6 +292,9 @@ static void remove_all_tags(void)
for(i = 0;i < MAX_ID3_TAGS;i++) for(i = 0;i < MAX_ID3_TAGS;i++)
remove_current_tag(); remove_current_tag();
tag_write_idx = tag_read_idx;
debug_tags(); debug_tags();
} }
#endif #endif
@ -1133,9 +1136,8 @@ static void track_change(void)
#endif #endif
remove_current_tag(); remove_current_tag();
current_track_counter++;
update_playlist(); update_playlist();
current_track_counter++;
} }
#ifdef DEBUG #ifdef DEBUG
@ -1323,8 +1325,8 @@ static void mpeg_thread(void)
play_pending = true; play_pending = true;
paused = false; paused = false;
current_track_counter++;
update_playlist(); update_playlist();
current_track_counter++;
break; break;
case MPEG_STOP: case MPEG_STOP:
@ -1366,10 +1368,10 @@ static void mpeg_thread(void)
if ( num_tracks_in_memory() > 1 ) { if ( num_tracks_in_memory() > 1 ) {
int unplayed_space_left, unswapped_space_left; int unplayed_space_left, unswapped_space_left;
/* stop the current stream */ /* stop the current stream */
play_pending = false; play_pending = false;
playing = false; playing = false;
stop_dma(); stop_dma();
track_change(); track_change();
mp3buf_read = id3tags[tag_read_idx]->mempos; mp3buf_read = id3tags[tag_read_idx]->mempos;
@ -1423,8 +1425,8 @@ static void mpeg_thread(void)
to start playing as soon as we have some data */ to start playing as soon as we have some data */
play_pending = true; play_pending = true;
current_track_counter++;
update_playlist(); update_playlist();
current_track_counter++;
} }
} }
break; break;
@ -1458,8 +1460,8 @@ static void mpeg_thread(void)
start playing as soon as we have some data */ start playing as soon as we have some data */
play_pending = true; play_pending = true;
current_track_counter++;
update_playlist(); update_playlist();
current_track_counter++;
} }
break; break;
} }
@ -2287,8 +2289,8 @@ void mpeg_next(void)
continue; continue;
} }
index = playlist_next(steps); index = playlist_next(steps);
current_track_counter++;
taginfo.index = index; taginfo.index = index;
current_track_counter++;
is_playing = true; is_playing = true;
playing = true; playing = true;
break; break;
@ -2314,8 +2316,8 @@ void mpeg_prev(void)
continue; continue;
} }
index = playlist_next(steps); index = playlist_next(steps);
current_track_counter++;
taginfo.index = index; taginfo.index = index;
current_track_counter++;
is_playing = true; is_playing = true;
playing = true; playing = true;
break; break;