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)
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)
int rc, i;
int copy_n;
- /* Stop buffer filling if there is no free track entries. */
- if (track_count >= MAX_TRACK) {
+ /* Stop buffer filling if there is no free track entries.
+ Don't fill up the last track entry (we wan't to store next track
+ metadata there). */
+ if (track_count >= MAX_TRACK - 1) {
fill_bytesleft = 0;
return false;
}
@@ -1185,7 +1187,7 @@ void audio_check_buffer(void)
if (audio_load_track(0, false, last_peek_offset)) {
last_peek_offset++;
} else if (tracks[track_widx].filerem == 0 || fill_bytesleft == 0) {
- if (track_count <= 1)
+ if (audio_next_track() == NULL)
read_next_metadata();
generate_postbuffer_events();
@@ -1193,10 +1195,8 @@ void audio_check_buffer(void)
conf_bufferlimit = 0;
pcm_set_boost_mode(false);
- if (playing) {
- ata_flush();
+ if (playing)
ata_sleep();
- }
}
}