Bug 811864 - Remove PannerNode.coneGain/distanceGain; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 14 Nov 2012 13:03:24 -0800
changeset 113313 89346db799db81c25ccbb34ca0a33633c5b3b6f8
parent 113306 baba249d52f8c577c5136a17afc34916178e805d
child 113314 d3a58eacf6dfe4e939c78883871eaf0cd9704677
push id23869
push useremorley@mozilla.com
push dateThu, 15 Nov 2012 16:18:16 +0000
treeherdermozilla-central@a37525d304d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky
bugs811864
milestone19.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 811864 - Remove PannerNode.coneGain/distanceGain; r=bzbarsky
content/media/webaudio/PannerNode.cpp
content/media/webaudio/PannerNode.h
content/media/webaudio/test/test_pannerNode.html
dom/webidl/PannerNode.webidl
--- a/content/media/webaudio/PannerNode.cpp
+++ b/content/media/webaudio/PannerNode.cpp
@@ -7,22 +7,18 @@
 #include "PannerNode.h"
 #include "mozilla/dom/PannerNodeBinding.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(PannerNode)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(PannerNode, AudioNode)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mConeGain)
-  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDistanceGain)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(PannerNode, AudioNode)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mConeGain, AudioParam, "cone gain value")
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NATIVE_PTR(tmp->mDistanceGain, AudioParam, "distance gain value")
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(PannerNode)
 NS_INTERFACE_MAP_END_INHERITING(AudioNode)
 
 NS_IMPL_ADDREF_INHERITED(PannerNode, AudioNode)
 NS_IMPL_RELEASE_INHERITED(PannerNode, AudioNode)
 
@@ -34,18 +30,16 @@ PannerNode::PannerNode(AudioContext* aCo
   , mOrientation(1.f, 0.f, 0.f)
   , mVelocity()
   , mRefDistance(1.f)
   , mMaxDistance(10000.f)
   , mRolloffFactor(1.f)
   , mConeInnerAngle(360.f)
   , mConeOuterAngle(360.f)
   , mConeOuterGain(0.f)
-  , mConeGain(new AudioParam(aContext, 1.f, 0.f, 1.f))
-  , mDistanceGain(new AudioParam(aContext, 1.f, 0.f, 1.f))
 {
 }
 
 JSObject*
 PannerNode::WrapObject(JSContext* aCx, JSObject* aScope,
                        bool* aTriedToWrap)
 {
   return PannerNodeBinding::Wrap(aCx, aScope, this, aTriedToWrap);
--- a/content/media/webaudio/PannerNode.h
+++ b/content/media/webaudio/PannerNode.h
@@ -151,39 +151,27 @@ public:
   {
     return mConeOuterGain;
   }
   void SetConeOuterGain(float aConeOuterGain)
   {
     mConeOuterGain = aConeOuterGain;
   }
 
-  AudioParam* ConeGain() const
-  {
-    return mConeGain;
-  }
-
-  AudioParam* DistanceGain() const
-  {
-    return mDistanceGain;
-  }
-
 private:
   PanningModelEnum mPanningModel;
   DistanceModelEnum mDistanceModel;
   ThreeDPoint mPosition;
   ThreeDPoint mOrientation;
   ThreeDPoint mVelocity;
   float mRefDistance;
   float mMaxDistance;
   float mRolloffFactor;
   float mConeInnerAngle;
   float mConeOuterAngle;
   float mConeOuterGain;
-  nsRefPtr<AudioParam> mConeGain;
-  nsRefPtr<AudioParam> mDistanceGain;
 };
 
 }
 }
 
 #endif
 
--- a/content/media/webaudio/test/test_pannerNode.html
+++ b/content/media/webaudio/test/test_pannerNode.html
@@ -39,19 +39,16 @@ addLoadEvent(function() {
   is(panner.distanceModel, 1, "Correct default value for distance model");
   near(panner.refDistance, 1, "Correct default value for ref distance");
   near(panner.maxDistance, 10000, "Correct default value for max distance");
   near(panner.rolloffFactor, 1, "Correct default value for rolloff factor");
   near(panner.coneInnerAngle, 360, "Correct default value for cone inner angle");
   near(panner.coneOuterAngle, 360, "Correct default value for cone outer angle");
   near(panner.coneOuterGain, 0, "Correct default value for cone outer gain");
 
-  ok("coneGain" in panner, "panner.coneGain exists");
-  ok("distanceGain in panner", "panner.distanceGain exists");
-
   panner.setPosition(1, 1, 1);
   panner.setOrientation(1, 1, 1);
   panner.setVelocity(1, 1, 1);
 
   source.start(0);
   SimpleTest.executeSoon(function() {
     source.stop(0);
     source.disconnect();
--- a/dom/webidl/PannerNode.webidl
+++ b/dom/webidl/PannerNode.webidl
@@ -39,14 +39,10 @@ interface PannerNode : AudioNode {
     attribute float maxDistance;
     attribute float rolloffFactor;
 
     // Directional sound cone 
     attribute float coneInnerAngle;
     attribute float coneOuterAngle;
     attribute float coneOuterGain;
 
-    // Dynamically calculated gain values 
-    readonly attribute AudioParam coneGain;
-    readonly attribute AudioParam distanceGain;
-
 };