audiocogs / aac.js

AAC decoder in JavaScript.

Home Page:http://audiocogs.org/codecs/aac/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

5.1?

zhuker opened this issue · comments

i tried playing my 5.1 aac wrapped in mp4 container here http://audiocogs.org/codecs/aac/
did not work
is it a limitation of the player or decoder?

here is the link to the file
https://drive.google.com/file/d/0B14m-5S5eoNQdG5JT3ZwSzJRSjQ/view

I tried it and the number of channels is detected correctly by aurora. The error preventing playback is: Buffer was of incorrect sample length. It comes from the resampling code. I have tried to update that to the latest version (which comes from https://github.com/taisel/XAudioJS), but that broke playback completely. I suspect I'm misusing the new API.

I have updated the resampler in aurora, and that error no longer occurs. Released in v0.4.8.

However, that was not the only problem. We were reusing element objects in aac.js to save on allocations. However, it seems it is possible to have multiple instances of the same element type within the same frame, as demonstrated by this file. So as of 650d665 we no longer reuse the objects. This fixes the decoding problem. Released in v0.1.2.

Unfortunately, some implementations of the web audio API (particularly in Chrome) doesn't seem to handle audio with more than 2 channels very well, so there is some stuttering sounds when playing the file still. It works better in Firefox though.

@devongovett thanks
this same file plays fine in chrome audio tag