delthas / JavaMP3

A fast and lightweight library to decode MP3 data into raw samples (supports MPEG 1 Layer I/II/III)
MIT License
52 stars 15 forks source link

samplesBuffer always returns zero values #3

Open clarcrz opened 6 years ago

clarcrz commented 6 years ago

I tried using this library to decode mp3 to PCM. There were no errors but when I read the PCM samples using the decodeFullyInto() function, the samplesBuffer does not contain any values (all zero values). The mainData byte array contains values so I'm not quite sure what the issue is.

madebyTimo commented 6 years ago

Hello, same problem here. The decodeFullyInto() function only writes zero values into the OutputStream

madebyTimo commented 6 years ago

Hey, I found a solution. The problem was that the decodeFullyInto() function only decoded one Frame, not like descripted the whole sound. You have to use the version from kevinstadler (https://github.com/kevinstadler/JavaMP3). He fixed the decodeFullyInto() function so that it doesn't just decode one frame.

clarcrz commented 6 years ago

You just saved my life. I'll try this one out. Thanks!!

Edit: I tried it out and I'm still getting zero values