QUOTE
.. the proper algorithm to get duration whether or not it is CBR or VBR..
That would be like this (please correct me if I'm wrong):
total-number-of-frames x samples-per-frame / sample-frequencywith
samples-per-frame for MPEG-1 =
384 samples (Layer I);
1152 samples (Layer II);
1152 samples (Layer III);
with
samples-per-frame for MPEG-2 =
192 samples (Layer I);
1152 samples (Layer II);
576 samples (Layer III)
This only holds for a clean MPEG audio stream, which is very probably
not the practical case.
QUOTE
.. count the size of the frame header in the calculation..
As you can see header-
size's got nothing to do with this calculation.