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"
<rdar://problem/36755393>
=---------------------------= 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 =---------------------------=
Created attachment 336527 [details] Patch
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.
Comment on attachment 336527 [details] Patch Clearing flags on attachment: 336527 Committed r230158: <https://trac.webkit.org/changeset/230158>
All reviewed patches have been landed. Closing bug.