[Webkit-unassigned] [Bug 154538] Web Audio restores wrong sample rate and sounds distorted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 23 16:24:44 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=154538

--- Comment #4 from Ashley Gullen <ashley at scirra.com> ---
Hi Jer, thanks for looking in to this. However I'm a little confused by your response. When you say "you will still have to deal with a 48kHz sample rate", are you addressing that to web developers? As far as I am aware, there is no other platform that requires us to have to care about the output sample rate, since in general any content at a different sample rate is just automatically resampled to the output sample rate if necessary. In fact the Web Audio API spec states regarding decodeAudioData: "Take the result, representing the decoded linear PCM audio data, and resample it to the sample-rate of the AudioContext if it is different from the sample-rate of audioData." So this appears to be an explicit requirement that Safari's implementation should be complying with.

If we have to do anything differently to handle this, firstly I think iOS would be unique in that regard, which creates a web compatibility issue. Secondly I am not even sure what we would do differently in terms of the Web Audio API? Are we supposed to throw away all our buffers and re-decode them or something? The problem happens on startup, so it's a mystery to me what we would need to do differently and under what circumstances we ought to do it.

If I were to hazard a guess as to what's really going on, I'd guess Safari mistakes the output sample rate for 48 KHz when it's really 44.1 KHz, and accordingly decodeAudioData is resampled to the wrong rate, or something like that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160224/58e04564/attachment-0001.html>


More information about the webkit-unassigned mailing list