[Alsaplayer-devel] actual time calculation

Andy Lo A Foe andy@alsa-project.org
Wed, 23 Feb 2000 01:20:40 +0100 (CET)


On Mon, 21 Feb 2000, safemode wrote:

> doesn't calculate time correctly.  I'm
> speaking of mp3s of course, and in particularly VBR mp3s (since they're
> the best, I dont encode in anything
> less).   As all other players, alsaplayer simply looks at the first
> header of the mp3 to "calculate" the time of
> the mp3.  This leads to totally wrong time's for VBR mp3s, since usually
> the first header is encoded at 64k.
> A better, but albeit a bit more consuming method is to analyze every
> frame of the mp3 and calculate the time
> based on the average bitrate of the entire file.   It shoudln't take too
> long really to do this in alsaplayer's queue as the file is added.  VBR
> mp3s are the best sounding mp3s and they are supported by the mp3 codec.

Hmm, doing full support for VBR is not very high on my priority list since
I don't happen to have any on my hard disk. Sounds quite selfish no? :)
I'll bump it up and as soon as I have some spare time (not much these
weeks) I'll try to work something out. VBR's are more difficult to handle
correctly yeah. I'll also look into the correct timing stuff (it will add
some overhead, also think about slower media like CD-ROMSs)

Andy
--
AlsaPlayer, http://www.alsa-project.org/~andy/