Bug 916285 - Fix bustage on windows, on a CLOSED TREE.
☠☠ backed out by 58388db74dfb ☠ ☠
authorPaul Adenot <paul@paul.cx>
Mon, 05 Jan 2015 15:30:53 +0100
changeset 222017 f33f5ff9d956b4b7d52fd5e808e90b734d5afd1b
parent 222016 c66197902d879b4d6bfd69c7ea9b08560fd2616e
child 222018 5c86509a11bc8868f0967c451c216b8d0ce2e1c2
push id53492
push userpaul@paul.cx
push dateMon, 05 Jan 2015 14:34:04 +0000
treeherdermozilla-inbound@f33f5ff9d956 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs916285
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 916285 - Fix bustage on windows, on a CLOSED TREE.
dom/media/webaudio/OscillatorNode.cpp
--- a/dom/media/webaudio/OscillatorNode.cpp
+++ b/dom/media/webaudio/OscillatorNode.cpp
@@ -138,19 +138,19 @@ public:
     mPeriodicWave = WebCore::PeriodicWave::create(mSource->SampleRate(),
     mCustom->GetData(0), mCustom->GetData(1), mCustomLength);
   }
 
   void IncrementPhase()
   {
     mPhase += mPhaseIncrement;
     if (mPhase > 2 * M_PI) {
-      mPhase -= 2 * M_PI;
+      mPhase -= float(2 * M_PI);
     } else if (mPhase < -2 * M_PI) {
-      mPhase += 2 * M_PI;
+      mPhase += float(2 * M_PI);
     }
   }
 
   void UpdateParametersIfNeeded(StreamTime ticks, size_t count)
   {
     double frequency, detune;
 
     // Shortcut if frequency-related AudioParam are not automated, and we
@@ -172,17 +172,17 @@ public:
     } else {
       detune = mDetune.GetValueAtTime(ticks, count);
     }
 
     float signalPeriod = mSource->SampleRate() / mFinalFrequency;
     mFinalFrequency = frequency * pow(2., detune / 1200.);
     mRecomputeParameters = false;
 
-    mPhaseWrap = 2 * M_PI;
+    mPhaseWrap = float(2 * M_PI);
     mPhaseIncrement = 2 * M_PI / signalPeriod;
   }
 
   void FillBounds(float* output, StreamTime ticks,
                   uint32_t& start, uint32_t& end)
   {
     MOZ_ASSERT(output);
     static_assert(StreamTime(WEBAUDIO_BLOCK_SIZE) < UINT_MAX,