- From: Yury Delendik <ydelendik@mozilla.com>
- Date: Tue, 15 Jan 2013 07:55:05 -0600
- To: public-audio@w3.org
Hello, Is there a way to decode the audio data in chunks? The decodeAudioData method accepts the data that is complete audio files. But in some cases the data is delivered in chunks: a) the XHR range requests are used to deliver the sound track data (see also the moz-chunked-arraybuffer alternative); b) or, the encoded data is stored in some other containers (e.g. see swf format). The decoding of the audio data portions without saving some intermediate state is not possible for some formats, even if the data is split on a frame boundary, e.g. in MP3 format, to decode a frame you will need a data from at least one previous frame. Also, the "sound1.start(time1) / sound2.start(time1 + duration1)" workaround is needed for playback of the decoded chunks (does it even guarantee the absence of playback artifacts?) and deep understanding of the frame format is required. Is it possible to add the createAudioDataDecoder (?) method that will return the decoder session / buffer, which can be used to "push" the encoded audio data in chunks? If the decoding will return more than one buffer, the automatic scheduling of the next buffer playback must be provided. Thank you, Yury Delendik
Received on Tuesday, 15 January 2013 17:53:00 UTC