Sound & Music

Moderators: Sephiroth
Number of threads: 597
Number of posts: 1201

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
mp3 audio xing header TOC specification/information Posted by johnhenry on 28 Jun 2009 at 5:03 AM
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.]



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.