Query over WebAudio API

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 18:21:35 UTC