[Webkit-unassigned] [Bug 183260] When Web Audio drops frames, scheduled audioParam changes are off

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 3 08:30:01 PST 2018


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

--- Comment #2 from ae at seven.systems ---
OK, I think this may not be a bug after all. As currentTime always seems to reflect the time measured in processed sample buffers, it's obvious that it will drift away from "wall clock time" every time a buffer is missed.

However, the question remains, how can I reliably schedule a parameter change 5 seconds into the future (in WALL CLOCK time)? (Full disclosure: I'm developing an entire DAW using web technologies, and I'm almost done apart from a few web audio roadblocks. When the user hits play, the MIDI data is processed in blocks of 300 ms and for each block, the corresponding AudioParam changes are scheduled for the nodes. As the DAW can run in sync with other (MIDI) equipment, it is essential to queue parameter changes in WALL CLOCK time, NOT audio buffer time. I could of course measure the drift by detecting any offset between (currentWallClockTime - startWallClockTime) and (currentAudioTime - startAudioTime), and then apply that offset to future scheduled events, but I wonder if there's a better way...?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180303/9a759207/attachment.html>


More information about the webkit-unassigned mailing list