WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
183253
Multiple calls to setTargetAtTime with separate timestamps has unpredictable behavior
https://bugs.webkit.org/show_bug.cgi?id=183253
Summary
Multiple calls to setTargetAtTime with separate timestamps has unpredictable ...
ae
Reported
2018-03-01 11:45:29 PST
I've spent the last 2 days trying to make a simple ADSR envelope generator using setTargetAtTime. It's hard to isolate a testcase, but I can say that as soon as several targets are added to the timeline, for example: 0 at 1 second, 1 at 2 seconds, 0.5 at 3 seconds, and 0 at 4 seconds), the resulting curves are unpredictable, especially when interrupted with cancelScheduledValues and then re-constructed (both are necessary for making a working real-world ADSR generator). The same code works flawlessly in Chrome and Firefox... I could possibly provide a testcase if needed.
Attachments
Add attachment
proposed patch, testcase, etc.
ae
Comment 1
2018-03-01 12:54:50 PST
OK, sorry for the original inaccurate report. More investigation revealed the following: node.gain.setValueAtTime(1, timestamp) node.gain.setTargetAtTime(0.5, timestamp, 1) This code seems to cause a race condition when both timestamps are equal. If I use "timestamp + 0.001" in the second line, the problem goes away.
Radar WebKit Bug Importer
Comment 2
2018-03-02 17:07:15 PST
<
rdar://problem/38088304
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug