mp3 audio xing header TOC specification/information - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

mp3 audio xing header TOC specification/information

johnhenryjohnhenry Posts: 3Member
Can anyone point me at the definition/specification of the contents of a Xing header TOC please.
I've spent hours googling for this and can only find
"Every TOC entry contains the size of the n-th frame. Calculating the position of the 3rd frame should look as following: header_size + toc[0] + toc[1] + toc[2]"
which obviously isn't correct as there is always 100 TOC entries (and the calculation example would give the start position of the 4th frame).
Ive investigated existing Xing files and the TOC contains 100 bytes, the first being zero and each incremented by 2, 3, 4 etc.
Example 0, 2, 4, 7, 9, 11 ........ 248, 251, 253.
I am writing a C program which creates a .mp3 audio file from extracts from various other .mp3 files and so the result will be a Variable Bit Rate file.
I've everything working now and the result plays fine. However, I need to allow positioning within the file when being played (e.g. by Windows Media Player) which I think creating a correct TOC will do.
[If anyone is interested the program produces music to run to: selected tracks with 'timers' inside telling you your remaining duration etc. Once working I will be giving it away for free, including the C source if required.]
Sign In or Register to comment.