b=907986 don't calculate upProjection twice r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 04 Sep 2013 21:20:58 +1200
changeset 145486 845d86b48e8525e792bae94b7e8b63493dcfa80f
parent 145485 18e8eadef06fa025613b81b9d8eb87cc85e4b4e9
child 145487 084b01d1b6b381c82606e3a4f7b9e4ef2548aa4a
push id33296
push userktomlinson@mozilla.com
push dateWed, 04 Sep 2013 20:32:35 +0000
treeherdermozilla-inbound@15a71c6cb0d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs907986
milestone26.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
b=907986 don't calculate upProjection twice r=padenot
content/media/webaudio/PannerNode.cpp
--- a/content/media/webaudio/PannerNode.cpp
+++ b/content/media/webaudio/PannerNode.cpp
@@ -417,17 +417,17 @@ PannerNodeEngine::ComputeAzimuthAndEleva
   // Rotate the azimuth so it is relative to the listener front vector instead
   // of the right vector.
   if ((aAzimuth >= 0) && (aAzimuth <= 270)) {
     aAzimuth = 90 - aAzimuth;
   } else {
     aAzimuth = 450 - aAzimuth;
   }
 
-  aElevation = 90 - 180 * acos(sourceListener.DotProduct(up)) / M_PI;
+  aElevation = 90 - 180 * acos(upProjection) / M_PI;
 
   if (aElevation > 90) {
     aElevation = 180 - aElevation;
   } else if (aElevation < -90) {
     aElevation = -180 - aElevation;
   }
 }