1
0
Fork 0
forked from len0rd/rockbox

audio_current_track: take wps_offset into account when no buffered metadata is available, and avoid using playlist_peek, which hits on the disk when dircache isn't enabled. This should make skipping nicer.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17128 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2008-04-15 20:59:47 +00:00
parent d88c5667d9
commit babd3beee3

View file

@ -542,6 +542,7 @@ struct mp3entry* audio_current_track(void)
const char *filename;
const char *p;
static struct mp3entry temp_id3;
struct playlist_track_info trackinfo;
int cur_idx;
int offset = ci.new_track + wps_offset;
@ -572,7 +573,8 @@ struct mp3entry* audio_current_track(void)
memset(&temp_id3, 0, sizeof(struct mp3entry));
filename = playlist_peek(0);
playlist_get_track_info(NULL, playlist_next(0)+wps_offset, &trackinfo);
filename = trackinfo.filename;
if (!filename)
filename = "No file!";