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
This commit is contained in:
parent
987faeaecd
commit
12d479fd3e
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue