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.
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.
<rdar://problem/38088304>