Issue metadata
Sign in to add a comment
|
ArrayBuffer is empty after AudioContext.decodeAudioData
Reported by
brian.ch...@gmail.com,
May 19 2017
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Steps to reproduce the problem: 1. Load an audio file from a web server with Fetch or XHR (xhr.responseType = 'arraybuffer') 2. call AudioContext.decodeAudioData with the response 3. inside success callback, check `byteLength` and content of the XHR response ArrayBuffer What is the expected behavior? After decoding the buffer succeeds, the original contents of the ArrayBuffer should remain intact in case it needs to be used again. What went wrong? After decoding the buffer succeeds, the ArrayBuffer is empty and `byteLength` is 0. Did this work before? Yes It works in stable 58 and I think it worked a week or two ago Does this work in other browsers? Yes Chrome version: 60.0.3104.0 Channel: canary OS Version: OS X 10.12.4 Flash Version: Shockwave Flash 25.0 r0 I see there are a number of other issues filed about memory leaks around decodeAudioData. Maybe an attempt at a fix caused this bug.
,
Jun 6 2017
Hi brian.chirls, It would be super helpful if you could include a repro case for this - preferably one that includes the audio file you used to repro. This makes as sure as possible that we're seeing what you see, which will help us track this down. Thanks!
,
Jun 9 2017
,
Jun 14 2017
,
Jun 14 2017
As mentioned in https://www.chromestatus.com/features/5539919174828032, this is a required part of the WebAudio spec: https://webaudio.github.io/web-audio-api/#widl-BaseAudioContext-decodeAudioData-Promise-AudioBuffer--ArrayBuffer-audioData-DecodeSuccessCallback-successCallback-DecodeErrorCallback-errorCallback, step 2.1. For the record, I find this rather annoying.
,
Jun 14 2017
Oh, I'm curious what the actual use case is for keeping the encoded audio file is. You've decoded it to audio, so what do you want to do with the encoded file?
For c#2, here is a simple repro case:
let c = new AudioContext();
let b = new ArrayBuffer(100);
c.decodeAudioData(b).catch(e => {console.log(e);});
console.log(b.byteLength);
This show a DOMException about failing to decode the data and also print out a length of 0.
,
Jun 14 2017
,
Jun 16 2017
The NextAction date has arrived: 2017-06-16
,
Jun 28 2017
Closing as WontFix (WAI) |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by krajshree@chromium.org
, May 23 2017