diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-08 16:52:29 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2007-11-08 16:52:29 +0000 |
commit | 12d479fd3e3408ccc97860312e9c151ba6afaf72 (patch) | |
tree | 1b1baf696afd9dbf75abdd4ce48369efd9949a6f | |
parent | 987faeaecd96526e7ca6a90ac523c2b97de585a8 (diff) |
Store the metadata of the first unbuffered track in a static struct so that it gets displayed in the next track info while playing the last buffered track.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15539 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/playback.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c index 20b3e76af0..fd60af2b6d 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -206,6 +206,7 @@ static int buffer_state = BUFFER_STATE_TRASHED; /* Buffer state */ static struct mp3entry prevtrack_id3; static struct mp3entry curtrack_id3; static struct mp3entry nexttrack_id3; +static struct mp3entry lasttrack_id3; /* Track info structure about songs in the file buffer (A/C-) */ struct track_info { @@ -684,6 +685,9 @@ struct mp3entry* audio_next_track(void) next_idx++; next_idx &= MAX_TRACK_MASK; + if (next_idx == track_widx) + return &lasttrack_id3; + if (tracks[next_idx].id3_hid < 0) return NULL; @@ -2304,6 +2308,7 @@ static bool audio_load_track(int offset, bool start_play) { last_peek_offset--; close(fd); + copy_mp3entry(&lasttrack_id3, &id3); return false; } |