This interpolates over aCurveLength - 1 steps rather than over
aCurveLength steps as was done before.
Previously we would reach the final value on the curve before
the end of the specified duration. For example, on the curve
[1.0, 0.0] with duration 1000, we would interpolate from 1.0 to
0.0 by time 500 rather than time 1000. With these changes, we
don't reach 0.0 until time 1000, as expected.
This also updates TestSpecExample in TestAudioEventTimeline.cpp
to match the curve in the latest spec.
MozReview-Commit-ID: Cgs8csbRUMh
--HG--
extra : rebase_source : 1960128558ae9174933cd5be3c1fbfcb79f5ba1d
This required moving template function ValidateEvent into the .h file to avoid
linking problems in xul-gtest.
--HG--
rename : dom/media/webaudio/compiledtest/TestAudioEventTimeline.cpp => dom/media/webaudio/gtest/TestAudioEventTimeline.cpp
rename : dom/media/webaudio/compiledtest/moz.build => dom/media/webaudio/gtest/moz.build
extra : rebase_source : 1a8917fc0e75e9c264bc88aec5565d9fff085c12
This updates mLastComputedValue when removing events during the call to
CleanupEventsOlderThan.
MozReview-Commit-ID: 1Veyv8kLIna
--HG--
extra : rebase_source : 9ee9aeb458b60316f93616e3310ad26f9e85e79c
We need to update mLastComputedValue while processing events that occur at the
same time rather than just skipping over them.
MozReview-Commit-ID: LuxSK6PHFHv
--HG--
extra : rebase_source : be323da2a50ea32838aef322267115d153a14c3d
Running the test-case in the bug, and profiling under OSX using Instruments'
time profiler, the time spent in `AudioEventTimeline::ValidateEvent` was the
highest Web Audio API-related function. This patch makes it disappear from the
profile. We already use the same technique on the MSG thread to keep the number
of events low.
MozReview-Commit-ID: GJLPRWBh7nQ
with the new variable matching the loop exit status of interest.
MozReview-Commit-ID: 8xy5ipo4trp
--HG--
extra : rebase_source : e951177af0699a550a4fb56a6192720207e74cb2
|bailout| is reset for each aTime, so that the appropriate events for that
time can be found.
The |eventIndex| loop is adjusted so that, when it is re-entered, it keeps
the current set of events if they are appropriate (instead of advancing
every time it is entered).
|previous| and |next| are now advanced even when passing the last event,
removing the special case when past all events.
MozReview-Commit-ID: 8ZSIzKKGQbd
--HG--
extra : rebase_source : bfc899287abaf12d5cdbfbc1b22d6626ab2299dd
This is not necessarily related to the last event and it is not the
previous event.
MozReview-Commit-ID: 6hhv184BHfg
--HG--
extra : rebase_source : 8013606e27a159bb2598217db40df926539227c6
This limits recompilation required when modifying the methods, and
makes the public interface easier to read.
MozReview-Commit-ID: Lo2f7xmIdGu
--HG--
rename : dom/media/webaudio/AudioEventTimeline.h => dom/media/webaudio/AudioEventTimeline.cpp
extra : rebase_source : 75586bb320dd2e5606e691919b1c6a7c48c2065f