Re: decodeAudioData on partial ArrayBuffers

Hi Rob,

It's a bit tricky to distinguish the case where you're trying to decode a
corrupt audio file versus your use case, where it's ok to just decode up
until the first bad frame.  Also, even if we did read up to the first bad
frame, then we're still not handling the case where we need to decode a
range in the middle of the file (not starting at the beginning).  So, the
decodeAudioData() method is not really designed or suited for this general
case.  But, of course there should be a way to do it.  An interesting new
specification is the "Media Fragments" API:
http://www.w3.org/TR/media-frags/

It can specify a time range within a larger audio resource, so I think we
should leverage that in order to extract and decode "regions" from large
media files.

Chris

On Tue, Jan 24, 2012 at 9:11 AM, Robert Clouth <rob.clouth@gmail.com> wrote:

> Hello,
>
> I'm requesting parts of mp3s using request.setRequestHeader("Range",
> "bytes=0-500000");
> However, decodeAudioData doesn't seem to work on partial ArrayBuffers. Am
> I doing something wrong? Why does it not just read up until the first bad
> frame?
>
> Cheers,
>
> Rob Clouth
>

Received on Wednesday, 25 January 2012 19:59:02 UTC