New issue
Advanced search Search tips

Issue 795051 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Automations scheduled far in future cause automation code to run

Project Member Reported by rtoy@chromium.org, Dec 14 2017

Issue description

If automations are scheduled to occur far in the future, we would expect AudioParam processing to use the fast path because the AudioParam value is constant.

However, that is not the case.  If there are *any* events scheduled, the slow path is taken.  (See AudioParam::HasSampleAccurateValues() and AudioParamTimeline::HasValues())

It would be helpful to use the fast path if the events are in the future.

Basically, adjust HasValues() to return true only if the current render quantum has automations scheduled in the quantum.
 

Comment 1 by rtoy@chromium.org, Dec 18 2017

Owner: rtoy@chromium.org
Status: Started (was: Available)
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1e42b591c1d8fe411fe396d807aa6a6c0c7c189f

commit 1e42b591c1d8fe411fe396d807aa6a6c0c7c189f
Author: Raymond Toy <rtoy@chromium.org>
Date: Thu Jan 04 18:33:32 2018

Optimize for automations that haven't started yet

If automations are scheduled to start in the future, the slow
automation path is run instead of the fast path where the AudioParam
value is known to be constant.  For most nodes this doesn't matter,
but for BiquadFilters that have a complicated relationship between the
AudioParam values and the filter coefficients, this is a significant
performance hit.

So, if there are no automations scheduled to run in the current render
quantum, we can still use the fast path.

Bug:  795051 
Change-Id: Iad144c5ce0bcea4af1921ba879c6c55f210fcb16
Reviewed-on: https://chromium-review.googlesource.com/830033
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527041}
[modify] https://crrev.com/1e42b591c1d8fe411fe396d807aa6a6c0c7c189f/third_party/WebKit/Source/modules/webaudio/AudioParam.h
[modify] https://crrev.com/1e42b591c1d8fe411fe396d807aa6a6c0c7c189f/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
[modify] https://crrev.com/1e42b591c1d8fe411fe396d807aa6a6c0c7c189f/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h

Comment 3 by rtoy@chromium.org, Jan 5 2018

Status: Fixed (was: Started)

Sign in to add a comment