Page 1 of 1

Use MAD instead of TagLib?

Posted: Fri Apr 06, 2007 4:22 pm
by Maurits
I noticed you mentioned "Use MAD instead of TagLib" in SVN. Is that just for the gapless-playback part?

Or are you switching to MAD for all ID3 reading? IIRC MAD uses the notoriously crappy id3lib for ID3 reading and writing. :(

By the way, I suppose this is gapless for MP3 only, not for AAC or Ogg Vorbis?

Posted: Sat Apr 07, 2007 12:12 am
by sbooth
This was an experiment for determining the properties (channels, duration, sample rate) of MPEG files. It seems MAD is much slower than TagLib for this, so I am going to revert back to TagLib.

I have successfully gotten gapless MP3 playback working with a decoder based on MAD. As soon as I add some more error checking I will post a new unstable version with the gapless decoder.

Posted: Sat Apr 07, 2007 12:53 pm
by Maurits
OK, that's a relief. ;)

Was there a particular reason to look into MAD for ID3 processing? Some things not satisfactory in TagLib? I assume you use the official release version of TagLib (1.4). You might want to have a look at the SVN version, a lot if ID3 patches have landed since 1.4. 1.4 is nearly two years old now and SVN is said to be still API-compatible.

Posted: Sat Apr 07, 2007 3:13 pm
by sbooth
I wasn't looking at MAD for ID3 processing, but for analysis of the stream's properties such as channels, sample rate, bitrate, VBR (via LAME headers), etc. It turns out that TagLib is much faster (since it is designed to scan files, not decode them!) at things like this, though slightly less complete.

I actually have been using various incarnations of the TagLib svn- I update it whenever I think about it, so Play includes a newer-than-released version.

Posted: Sat Apr 07, 2007 3:34 pm
by Maurits
I see. So patches like "CBR encoded mp3 files with "Info" Xing header have their duration reported incorrected by taglib" that landed last week are of interest to you.