js-mp3
Pure javascript mp3 decoder, translate from go-mp3 project.
Usage
let Mp3 = ; var mp3ArrayBuffer = ...; // prepare your mp3 decoded array buffer here var decoder = Mp3;var pcmArrayBuffer = decoder; // now you got decoded PCM data
you can visit js-mp3-example project to see how to decode mp3 file then play it.
Tests
Frameworks
rewire
: https://github.com/jhnns/rewireMocha
: https://mochajs.org/Chai
: https://github.com/chaijs/chaiIstanbul
: https://github.com/gotwarlost/istanbul
Run tests with:
$ npm test
Get coverage report:
$ npm run coverage
Then you can find the report html here: {project_location}/coverage/lcov-report/index.html
.
Issue
It put all decoded pcm data in ArrayBuffer now, so you'd better not use it to decode big size MP3 file.