Issue metadata
Sign in to add a comment
|
[WebAudio] Automation value by setTargetAtTime () skips halfway
Reported by
gait...@gmail.com,
Apr 20 2018
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3401.0 Safari/537.36 Steps to reproduce the problem: 1. Test code is in CodePen page, https://codepen.io/g200kg/pen/bMdoPN 2. Press "Start" button. 3. A graph of volume change is drawn. Please check What is the expected behavior? The signal from the oscillator is output via the gain node The gain node is simply controlled by setTargetAtTime (0.8, now). The volume should be asymptotic towards 0.8 What went wrong? The volume skips to the final value in the middle of the curve. A graph of the volume is drawn. Please check the attached screenshot. Did this work before? Yes I do not remember Does this work in other browsers? Yes Chrome version: 68.0.3401.0 Channel: canary OS Version: 10.0 Flash Version:
,
Apr 20 2018
It's a bug in the algorithm that determines if the setTarget event has converged to the final value or not.
,
Apr 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b0aa44ae53c07d7b407e34a66d5ae12b58c240ed commit b0aa44ae53c07d7b407e34a66d5ae12b58c240ed Author: Raymond Toy <rtoy@chromium.org> Date: Mon Apr 23 22:25:39 2018 Fix up convergence algorithm for setTargetAtTime The algorithm to determine if a setTargetAtTime automation converged to the target value incorrectly said the algorithm converged when it had not. Adjust the algorithm, simplifying it. There are now three simple criteria: 1. 10 time constants have passed since the start of the event 2. If the target is 0, the current value is less than exp(-10) 3. If the target is not 0, the relative error between the target and the current value must be less than exp(-10). Bug: 835298 Test: AudioParam/audioparam-setTargetAtTime-limit.html Change-Id: Iffc137b40929dc6542ad647a4e974ae11271157f Reviewed-on: https://chromium-review.googlesource.com/1022515 Commit-Queue: Raymond Toy <rtoy@chromium.org> Reviewed-by: Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#552863} [modify] https://crrev.com/b0aa44ae53c07d7b407e34a66d5ae12b58c240ed/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setTargetAtTime-limit.html [modify] https://crrev.com/b0aa44ae53c07d7b407e34a66d5ae12b58c240ed/third_party/blink/renderer/modules/webaudio/audio_param_timeline.cc
,
Apr 24 2018
Ran the repro case with ToT and it's a nice exponential curve without jumps. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by rtoy@chromium.org
, Apr 20 2018