Library failes to decode a valid MP2 file
Brought to you by:
javazoom
Hi,
The following MP2 is totally legit and valid MP2 file. It can be played and converted to WAV by many 3rd party tools. JavaLayer however fails to do this.
If I comment out the IF from javazoom.jl.decoder.Header line: 185 (if (stream.isSyncCurrentPosition(syncmode))), it parses ok and reads all frames just fine. But at least when trying to convert it to WAV, it is completely distorted.
As suggested by Durandal at http://stackoverflow.com/questions/25664444/java-mp2-playback-native. The header size got calculated wrong. With commenting out the "if (h_version == MPEG2_LSF || h_version == MPEG25_LSF) framesize >>= 1;" from Header.java. MPEG25_LSF might be correct, I have no idea, but for MP2 this seems not to be the case.
Now it is more in line with:
http://www.codeproject.com/Articles/8295/MPEG-Audio-Frame-Header
However, it is still not producing perfect WAVs. A bit better but still unplayable.