bug 1187785 reverse tableInterpolationFactor to make it consistent with documentation r=rillian
authorKarl Tomlinson <karlt+@karlt.net>
Mon, 27 Jul 2015 16:59:17 +1200
changeset 286736 161362ba8d686c603a26dff26e0ea74664966a9f
parent 286735 e2c005a1936dfd2bf072ae6bee4a3c914b1ef9f7
child 286737 5959dd123953c902f9ba476b9318c8b6338886c8
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1187785
milestone42.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 1187785 reverse tableInterpolationFactor to make it consistent with documentation r=rillian tableInterpolationFactor = 0 now means use lowerWaveData, which is rangeIndex2.
dom/media/webaudio/blink/PeriodicWave.cpp
--- a/dom/media/webaudio/blink/PeriodicWave.cpp
+++ b/dom/media/webaudio/blink/PeriodicWave.cpp
@@ -142,17 +142,17 @@ void PeriodicWave::waveDataForFundamenta
     // So the lower table data will have a larger range index.
     unsigned rangeIndex1 = static_cast<unsigned>(pitchRange);
     unsigned rangeIndex2 = rangeIndex1 < m_numberOfRanges - 1 ? rangeIndex1 + 1 : rangeIndex1;
 
     lowerWaveData = m_bandLimitedTables[rangeIndex2]->Elements();
     higherWaveData = m_bandLimitedTables[rangeIndex1]->Elements();
 
     // Ranges from 0 -> 1 to interpolate between lower -> higher.
-    tableInterpolationFactor = pitchRange - rangeIndex1;
+    tableInterpolationFactor = rangeIndex2 - pitchRange;
 }
 
 unsigned PeriodicWave::maxNumberOfPartials() const
 {
     return m_periodicWaveSize / 2;
 }
 
 unsigned PeriodicWave::numberOfPartialsForRange(unsigned rangeIndex) const