> 
> Hello!
> 
> Does anybody compared LAME's VBR header & original header from AC?
> 
> I mean first TOC element TOC[0] should be zero.
> I found this bug, when I tried to seek to zero frame using TOC.
> On  Catalyst  files  I  always get first frame... On LAME - something about
> one-two second's later (depending on source).
> 

The loop in question is this one, in VbrTag.c.  Maybe Albert will
comment since he wrote all of this code, but for now I'm going to
reverse the order of the loop.  This should make TOC[0]=0, but it
will also make TOC[99]=a few frames before the last frame.  
Right now it looks like TOC[0]=a few frames after the first frame,
TOC[99]=last frame.



        // Set unassigned toc value with its neighbor value
        for (i=0;i<nVbrNumFrames;i++)
        {
                // Calculate percentage
                int nPercent= i*(NUMTOCENTRIES-1)/nVbrNumFrames;

                // Calculate relative file postion, normalized to 0..255
                float fRelStreamPos=255*(float)pVbrFrames[i]/(float)lFileSize;

                // Just to be safe
                if (nPercent>=NUMTOCENTRIES ) nPercent=NUMTOCENTRIES-1;
                if (fRelStreamPos>255) fRelStreamPos=255;

                // Assign toc entry value
                btToc[nPercent]=(u_char)fRelStreamPos;
        }
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

Reply via email to