MP3 decoder


#1

Hey - I’m wondering how other people heave found the MAD mp3 decoder:

http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=2522&highlight=mp3+decoder

It seems to work fine for the decoding, but not for get and set position(). Have other people used this satisfactorily?

I have this snippet …

int64 readPosition = reader->input->getPosition();
Buffer->readFromAudioReader(reader, start, length, readPosition , true, true);
reader->input->setPosition(readerPosition + length);

Which seems to work fine for WAVs, but has issues getting to the right positions when using the MAD classes.

Is the older audiere API better? It says it’s seekable, but it kinda old and there is a comment on the JUCE forum that it doesn’t work for all MP3s.

Aha … just found the JUCE QTaudioformat … switched it out and that seems to work fine … slower though. Is there documentation on that somewhere?


#2

Sorry for the late reply.

Short answer: libMAD sucks. Don’t use it. It is outdated software and the people who own it are unresponsive to obtaining licenses or providing support.

The best MP3 decoding library is called “libmpg123” and you can get it here:
http://www.mpg123.de/api/

This library is the fastest decoder in existence. It contains lovingly hand crafted assembly language decoding operations for a wide variety of systems. There is a seek feature. Its been maintained for over ten years, and I see the developers regularly in #mpg123 on FreeNode. Refinements are steadily added, the latest revision supports full Unicode filenames and character mappings in ID3 tags.