Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp |
| index dbb6a1b8defe27a58eb4ce5f9b3cb4d60a898c33..eacec0b72c9e5da2a8b148736bbf19764fd6f25f 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp |
| @@ -857,7 +857,15 @@ float AudioParamTimeline::valuesForFrameRangeImpl(size_t startFrame, |
| // "forever". SetValueCurve also has an explicit SetValue at the end of |
| // the curve, so we don't need to worry that SetValueCurve time is a |
| // start time, not an end time. |
| - if (lastEventTime < currentTime && lastEventType != ParamEvent::SetTarget) { |
| + // |
| + // Allow at least one render quantum to go by before handling this |
| + // to allow k-rate parameters to finish processing the event. See |
| + // crbug.com/672857. Due to possible roundoff, arbirtrarily wait |
| + // for 1.5 render quanta instead of 1. |
|
hongchan
2017/01/12 23:32:16
What is the possible side effect of waiting 1.5 RQ
Raymond Toy
2017/01/12 23:49:10
I think the only side-effect would be that we now
|
| + if (lastEventTime + |
| + 1.5 * AudioUtilities::kRenderQuantumFrames / sampleRate < |
| + currentTime && |
| + lastEventType != ParamEvent::SetTarget) { |
|
hongchan
2017/01/12 23:32:15
Wow. Is this what 'git cl format' offers? Could yo
Raymond Toy
2017/01/12 23:46:51
Yep. This isn't how I had originally indented it.
|
| // The event has finished, so just copy the default value out. |
| // Since all events are now also in the past, we can just remove all |
| // timeline events too because |defaultValue| has the expected |