Use frames instead of time for running AudioParam timelines.
This is a large change of how the AudioParam timeline is
implemented. Previously, the timeline used floats/doubles to process
the timeline. This poses several issues including round-off errors in
computing the timeline values and updating the timeline. In addition,
the sampling of the automation curves was incorrect.
First, to remove the roundoff issues, use the currentFrame to step
through the timeline so roundoff is reduced.
Second, update the sampling of the automation curves correctly. These
errors are shown in crbug 534613 and 527194, which are fixed now.
The audioparam tests were also updated to sample the curves correctly
and also use the formulas from the spec to implement them instead of
trying to duplicate the implementation.
Third, a ManualLayoutTest is added for crbug 522229, which is fixed.
BUG=
534613,
527194,
522229
TESTS=updated existing tests and added
audioparam-sampling.html,
audioparam-setTargetValue-value.html, and osc-exponentialRamp.html.
Committed:
https://crrev.com/748834c3a5b1b0479835c4cb3ce7d9b9c8302934
Cr-Commit-Position: refs/heads/master@{#352131}