My code for calculating the frame length in bytes for MPEGv2/v2.5 Layer II and III was:
(144/2)* (bitrate * 1000 / samplerate + padding bit)
This was working fine, except for one MPEGv2 Layer II file, but it works ok if I double the frame length
144* (bitrate * 1000 / samplerate + padding bit)
but of course then breaks my MPEGv2 layer III files ( I dont have nay other layer II files)
I dont know why I divided by two in the first place, it doesnt seem to mentioned in the specs, but cant work if should should just be for Layer III or could be for either but dependent on something else
Can anyone please put me staright on this.
Paul
