[mad-dev] Mad winamp plugin bug
Robert K Marlton
Sat, 14 Dec 2002 14:41:16 +0000
Sorry to post twice in a row, but I've now got a more specific question.
I've been looking at the mad winamp plugin source code, and I've worked out
what causes the bug. When winamp tells the plugin to seek it basically
calculates a file position to seek to by doing:-
(seekpos / song length) * (filelength).
This works with CBR files but not with VBR files as they have different data
rates throughout the files.
I assume that the mad library seeks correctly and I would like to be able to
use it to do the seeking with the winamp plugin (as my alternative would be
to cludge it by reading frames from the beginning of the file until I got to
the right time). Any pointers on what functions I could use in the library?