Re: Query over WebAudio API

I believe it should decode the whole file, and pass the decoded data
to successCallback, or else call errorCallback.

On Thu, Jul 26, 2012 at 2:21 AM, Kaustubh Joshi <kdj.tikka@gmail.com> wrote:
> HI,
>
> I was going through WebAudio API, I found quite interesting.
>
> The definition of decodeAudioData() API says: "successCallback is a callback
> function which will be invoked when the decoding is finished. The single
> argument to this callback is an AudioBuffer representing the decoded PCM
> audio data."
>
> I have one doubt here:
> 1) decodeAudioData is asynch implementation,
>     Is the decoding of whole Audio file (for e.g. test.wav) happens in one
> go ?
>
> 2) Is it mandatory to after decode is finished completely the callback
> should return ?
>
> 3) Does is recommended to have on partial decoding callback returns and
> play-out happens for decoded data.
> After play-out, the remaining data will get decoded, so that decoding will
> not happen in one go and will take less time ?
>
> Thanks,
> kdj

Received on Saturday, 28 July 2012 23:34:37 UTC