summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2005-07-10 08:38:16 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2005-07-10 08:38:16 +0000
commitb288dda68504fc44d16bbc0d321166d291606a62 (patch)
tree515b972ef268596fe20bb98caf8f269a62cc356a
parent3e33f85f17b6189e1e7c869cf6030d4fcb33f39e (diff)
downloadrockbox-b288dda68504fc44d16bbc0d321166d291606a62.tar.gz
rockbox-b288dda68504fc44d16bbc0d321166d291606a62.zip
Fixed a problem that next track info was not always available after the
initial file buffering. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7091 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/playback.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 82ccddfac0..fb96592511 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -860,8 +860,10 @@ bool audio_load_track(int offset, bool start_play, int peek_offset)
860 int rc, i; 860 int rc, i;
861 int copy_n; 861 int copy_n;
862 862
863 /* Stop buffer filling if there is no free track entries. */ 863 /* Stop buffer filling if there is no free track entries.
864 if (track_count >= MAX_TRACK) { 864 Don't fill up the last track entry (we wan't to store next track
865 metadata there). */
866 if (track_count >= MAX_TRACK - 1) {
865 fill_bytesleft = 0; 867 fill_bytesleft = 0;
866 return false; 868 return false;
867 } 869 }
@@ -1185,7 +1187,7 @@ void audio_check_buffer(void)
1185 if (audio_load_track(0, false, last_peek_offset)) { 1187 if (audio_load_track(0, false, last_peek_offset)) {
1186 last_peek_offset++; 1188 last_peek_offset++;
1187 } else if (tracks[track_widx].filerem == 0 || fill_bytesleft == 0) { 1189 } else if (tracks[track_widx].filerem == 0 || fill_bytesleft == 0) {
1188 if (track_count <= 1) 1190 if (audio_next_track() == NULL)
1189 read_next_metadata(); 1191 read_next_metadata();
1190 1192
1191 generate_postbuffer_events(); 1193 generate_postbuffer_events();
@@ -1193,10 +1195,8 @@ void audio_check_buffer(void)
1193 conf_bufferlimit = 0; 1195 conf_bufferlimit = 0;
1194 pcm_set_boost_mode(false); 1196 pcm_set_boost_mode(false);
1195 1197
1196 if (playing) { 1198 if (playing)
1197 ata_flush();
1198 ata_sleep(); 1199 ata_sleep();
1199 }
1200 } 1200 }
1201} 1201}
1202 1202