1
0
Fork 0
forked from len0rd/rockbox

1. Update the playlist index when starting the list (fixes invalid track num when playing from directory). 2. Estimate new position when ffw/rew VBR file with no TOC (eg. tracks recorded with AJBR).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2308 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Hardeep Sidhu 2002-09-17 07:04:43 +00:00
parent d96b78b5a5
commit aa287bb8cc

View file

@ -815,6 +815,7 @@ static void mpeg_thread(void)
paused = false;
current_track_counter++;
update_playlist();
break;
case MPEG_STOP:
@ -954,7 +955,9 @@ static void mpeg_thread(void)
id3->elapsed = newtime;
if (id3->vbr && (id3->vbrflags & VBR_TOC_FLAG))
if (id3->vbr)
{
if (id3->vbrflags & VBR_TOC_FLAG)
{
/* Use the TOC to find the new position */
unsigned int percent, remainder;
@ -979,6 +982,12 @@ static void mpeg_thread(void)
plen = (nexttoc - curtoc)*(id3->filesize/256);
newpos += (plen/100)*remainder;
}
else
{
/* No TOC exists, estimate the new position */
newpos = (id3->filesize/id3->length)*newtime;
}
}
else if (id3->bpf && id3->tpf)
newpos = (newtime/id3->tpf)*id3->bpf;
else