RESOLVED FIXED 181939
AudioBufferSourceNode start method causes OfflineAudioContext to start running
https://bugs.webkit.org/show_bug.cgi?id=181939
Summary AudioBufferSourceNode start method causes OfflineAudioContext to start running
yotammann
Reported 2018-01-22 12:31:57 PST
The OfflineAudioContext.state should be "suspended" and not increment the currentTime until `startRendering` is invoked. The issue is that as soon as AudioBufferSourceNode.start is invoked, the OfflineAudioContext.state returns "running" and the OfflineAudioContext.currentTime starts incrementing usually much faster than real time. This makes it impossible to schedule anything after an AudioBufferSourceNode is started since the scheduled time will usually be in the past. Test case: https://jsfiddle.net/3h8e3bcg/ Should print to the console: "should be suspended: suspended" then "should still be suspended: suspended" PASSES on Chrome, Firefox and Safari 11 on Desktop. FAILS on Safari on iOS 11. prints: "should be suspended: suspended" then "should still be suspended: running"
Attachments
Patch (6.10 KB, patch)
2018-03-26 11:14 PDT, Jer Noble
no flags
Radar WebKit Bug Importer
Comment 1 2018-01-22 16:56:58 PST
Sam Williams
Comment 2 2018-03-25 14:40:50 PDT
=---------------------------= F I X S O O N P L E A S E F I X S O O N P L E A S E F I X S O O N P L E A S E =---------------------------= But really, please do fix soon, as this bug is SO ANNOYING!!! https://jsfiddle.net/ayunami2000/c5xdL6xL/ This is where I discovered the bug. Everything else in the JSFiddle works, but offlineAudioContext's oncomplete event never fires. Also, https://codepen.io/tomduncalf/pen/GmvPNp works on iOS!!! =---------------------------= F I X S O O N P L E A S E F I X S O O N P L E A S E F I X S O O N P L E A S E =---------------------------=
Jer Noble
Comment 3 2018-03-26 11:14:07 PDT
Eric Carlson
Comment 4 2018-03-27 08:52:00 PDT
Comment on attachment 336527 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336527&action=review > LayoutTests/webaudio/offlineaudiocontext-restriction.html:18 > +var calledResumeWithUserGesture = false; Nit: this isn't used.
WebKit Commit Bot
Comment 5 2018-04-02 08:40:25 PDT
Comment on attachment 336527 [details] Patch Clearing flags on attachment: 336527 Committed r230158: <https://trac.webkit.org/changeset/230158>
WebKit Commit Bot
Comment 6 2018-04-02 08:40:26 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.