Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1122)

Issue 2567183002: k-rate playbackRate and detune reaches final value (Closed)

Created:
4 years ago by Raymond Toy
Modified:
3 years, 11 months ago
Reviewers:
hongchan
CC:
chromium-reviews, blink-reviews, haraken, Raymond Toy, hongchan
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

k-rate playbackRate and detune reaches final value The optimization for the case when the last event is in the past does not work for k-rate AudioParams because the final value returned is the last value requested. This happens because for k-rate parameters we only ask for one sample from the automation at the beginning of the rendering quantum. This also computes a default value for future use. At the next render, the event is in the past so we were just using the default value, which is actually now a render quantum behind. Change the criteria so that we wait for 1.5 render quantum before applying the optimization. This allows the timeline to compute one more value, updating the default value too, which will be the correct ending value of the event. Additional test added that illustrates the issue is fixed and also test for the other k-rate parameters. BUG=672857 TEST=audioparam-k-rate.html Review-Url: https://codereview.chromium.org/2567183002 Cr-Commit-Position: refs/heads/master@{#444455} Committed: https://chromium.googlesource.com/chromium/src/+/01154e998c7a37c47cf83aabe44331ff4503ec3c

Patch Set 1 #

Patch Set 2 : Let a render quantum go by before optimizing #

Patch Set 3 : Wait 1.5 quanta instead of 1 for roundoff. #

Total comments: 8

Patch Set 4 : Address review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-k-rate.html View 1 2 3 1 chunk +173 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp View 1 2 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 19 (12 generated)
Raymond Toy
PTAL
3 years, 11 months ago (2017-01-12 19:01:57 UTC) #8
hongchan
https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-k-rate.html File third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-k-rate.html (right): https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-k-rate.html#newcode13 third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-k-rate.html:13: var sampleRate = 48000; Use 'let' since this is ...
3 years, 11 months ago (2017-01-12 23:32:16 UTC) #9
Raymond Toy
https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp File third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp (right): https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp#newcode868 third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp:868: lastEventType != ParamEvent::SetTarget) { On 2017/01/12 23:32:15, hongchan wrote: ...
3 years, 11 months ago (2017-01-12 23:46:51 UTC) #10
Raymond Toy
https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp File third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp (right): https://codereview.chromium.org/2567183002/diff/40001/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp#newcode864 third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp:864: // for 1.5 render quanta instead of 1. On ...
3 years, 11 months ago (2017-01-12 23:49:11 UTC) #11
hongchan
lgtm
3 years, 11 months ago (2017-01-18 18:07:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2567183002/60001
3 years, 11 months ago (2017-01-18 18:18:28 UTC) #16
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 20:14:22 UTC) #19
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/01154e998c7a37c47cf83aabe443...

Powered by Google App Engine
This is Rietveld 408576698