bug 1257718 move comment to within the code path it describes r?padenot
The comment was not necessarily true where it was previously positioned.
MozReview-Commit-ID: FMYkGkmuvVS
--- a/dom/media/webaudio/AudioEventTimeline.h
+++ b/dom/media/webaudio/AudioEventTimeline.h
@@ -454,18 +454,18 @@ public:
previous = next;
next = &mEvents[lastEventId];
if (aTime < mEvents[lastEventId].template Time<TimeType>()) {
bailOut = true;
}
}
- // The time was found in the list of events.
if (!bailOut && lastEventId < mEvents.Length()) {
+ // The time matches one of the events exactly.
MOZ_ASSERT(TimesEqual(aTime, mEvents[lastEventId].template Time<TimeType>()));
// SetTarget nodes can be handled no matter what their next node is (if they have one)
if (mEvents[lastEventId].mType == AudioTimelineEvent::SetTarget) {
// Follow the curve, without regard to the next event, starting at
// the last value of the last event.
aBuffer[bufferIndex] = ExponentialApproach(mEvents[lastEventId].template Time<TimeType>(),
mLastComputedValue, mEvents[lastEventId].mValue,