Bug 1308436 - Don't convert the curve duration from double to float in the EventInsertionHelper to avoid losing precision. r?karlt draft
authorPaul Adenot <paul@paul.cx>
Thu, 26 Jul 2018 14:26:57 +0200
changeset 824301 fbc877e07d2866a85dba04a611e43441471f9364
parent 823872 0be4463d29159905dded07f1dbddc5bb7dfaa336
child 824302 c4f30d22fef0d060b8e61ca5e6a532aa82453307
push id117873
push userpaul@paul.cx
push dateMon, 30 Jul 2018 16:35:38 +0000
reviewerskarlt
bugs1308436
milestone63.0a1
Bug 1308436 - Don't convert the curve duration from double to float in the EventInsertionHelper to avoid losing precision. r?karlt MozReview-Commit-ID: 9vazrYi3J8C
dom/media/webaudio/AudioParam.h
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -214,17 +214,17 @@ public:
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }
 
 private:
   void EventInsertionHelper(ErrorResult& aRv,
                             AudioTimelineEvent::Type aType,
                             double aTime, float aValue,
                             double aTimeConstant = 0.0,
-                            float aDuration = 0.0,
+                            double aDuration = 0.0,
                             const float* aCurve = nullptr,
                             uint32_t aCurveLength = 0)
   {
     AudioTimelineEvent event(aType, aTime, aValue,
                              aTimeConstant, aDuration, aCurve, aCurveLength);
 
     if (!ValidateEvent(event, aRv)) {
       return;