This is a web aac decoder based on Faad2.
I made this decoder to convert aac mpeg-2 bitstream to pcm data, that can be played with AudioContext.
If you need handling aac mpeg-4 audio, you need to modify a bit of code manually.
Difference between AAC MPEG2 and AAC MEPG4
Author: Sunqi
Version: 1.0.0
Install Emscripten before running the commands below.
- unix:
./dl.sh
- unix:
./compile.sh
function onDecode({pcm}) {
// play pcm
}
let decoder = new AAC_ADTS_DECODER({
onDecode: onDecode
})
decoder.ready.then(() => {
decoder.decode(aac_stream_buffer)
})
.catch(e) {
// handle error
}
- support AAC MPEG4
- and more
- ๅ่ฅ