Backed out changeset f350bbf9e636 (bug 1324659)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Tue, 20 Dec 2016 23:02:44 +0100
changeset 373958 faf170d0bdba2f09f6b5875099a930109591fd14
parent 373957 bf74c90bff441b33a29e2a15a41e83b551851dc7
child 373959 4ee212f486d788dc8343605f9e364b654834854b
push id1419
push userjlund@mozilla.com
push dateMon, 10 Apr 2017 20:44:07 +0000
treeherdermozilla-release@5e6801b73ef6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1324659
milestone53.0a1
backs outf350bbf9e6363a685520b2ad9ba8071f6eebfd07
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
Backed out changeset f350bbf9e636 (bug 1324659)
dom/media/webaudio/AudioBufferSourceNode.cpp
dom/media/webaudio/AudioParam.cpp
dom/media/webaudio/AudioParam.h
dom/media/webaudio/BiquadFilterNode.cpp
dom/media/webaudio/ConstantSourceNode.cpp
dom/media/webaudio/DelayNode.cpp
dom/media/webaudio/DynamicsCompressorNode.cpp
dom/media/webaudio/GainNode.cpp
dom/media/webaudio/OscillatorNode.cpp
dom/media/webaudio/PannerNode.cpp
dom/media/webaudio/StereoPannerNode.cpp
dom/webidl/AudioParam.webidl
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/webaudio/the-audio-api/the-audioparam-interface/idl-test.html
testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/idl-test.html
testing/web-platform/tests/webaudio/the-audio-api/the-gainnode-interface/idl-test.html
--- a/dom/media/webaudio/AudioBufferSourceNode.cpp
+++ b/dom/media/webaudio/AudioBufferSourceNode.cpp
@@ -592,18 +592,18 @@ public:
 AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext)
   : AudioScheduledSourceNode(aContext,
                              2,
                              ChannelCountMode::Max,
                              ChannelInterpretation::Speakers)
   , mLoopStart(0.0)
   , mLoopEnd(0.0)
   // mOffset and mDuration are initialized in Start().
-  , mPlaybackRate(new AudioParam(this, PLAYBACKRATE, "playbackRate", 1.0f))
-  , mDetune(new AudioParam(this, DETUNE, "detune", 0.0f))
+  , mPlaybackRate(new AudioParam(this, PLAYBACKRATE, 1.0f, "playbackRate"))
+  , mDetune(new AudioParam(this, DETUNE, 0.0f, "detune"))
   , mLoop(false)
   , mStartCalled(false)
 {
   AudioBufferSourceNodeEngine* engine = new AudioBufferSourceNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NEED_MAIN_THREAD_FINISHED,
                                     aContext->Graph());
   engine->SetSourceStream(mStream);
--- a/dom/media/webaudio/AudioParam.cpp
+++ b/dom/media/webaudio/AudioParam.cpp
@@ -30,27 +30,23 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCA
 NS_IMPL_CYCLE_COLLECTING_NATIVE_ADDREF(AudioParam)
 NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE(AudioParam)
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AudioParam, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AudioParam, Release)
 
 AudioParam::AudioParam(AudioNode* aNode,
                        uint32_t aIndex,
-                       const char* aName,
                        float aDefaultValue,
-                       float aMinValue,
-                       float aMaxValue)
+                       const char* aName)
   : AudioParamTimeline(aDefaultValue)
   , mNode(aNode)
   , mName(aName)
   , mIndex(aIndex)
   , mDefaultValue(aDefaultValue)
-  , mMinValue(aMinValue)
-  , mMaxValue(aMaxValue)
 {
 }
 
 AudioParam::~AudioParam()
 {
   DisconnectFromGraphAndDestroyStream();
 }
 
--- a/dom/media/webaudio/AudioParam.h
+++ b/dom/media/webaudio/AudioParam.h
@@ -22,20 +22,18 @@ namespace dom {
 class AudioParam final : public nsWrapperCache,
                          public AudioParamTimeline
 {
   virtual ~AudioParam();
 
 public:
   AudioParam(AudioNode* aNode,
              uint32_t aIndex,
-             const char* aName,
              float aDefaultValue,
-             float aMinValue = -std::numeric_limits<float>::infinity(),
-             float aMaxValue = std::numeric_limits<float>::infinity());
+             const char* aName);
 
   NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
   NS_IMETHOD_(MozExternalRefCountType) Release(void);
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AudioParam)
 
   AudioContext* GetParentObject() const
   {
     return mNode->Context();
@@ -162,26 +160,16 @@ public:
     aName.AssignASCII(mName);
   }
 
   float DefaultValue() const
   {
     return mDefaultValue;
   }
 
-  float MinValue() const
-  {
-    return mMinValue;
-  }
-
-  float MaxValue() const
-  {
-    return mMaxValue;
-  }
-
   const nsTArray<AudioNode::InputNode>& InputNodes() const
   {
     return mInputNodes;
   }
 
   void RemoveInputNode(uint32_t aIndex)
   {
     mInputNodes.RemoveElementAt(aIndex);
@@ -251,17 +239,15 @@ private:
   // For every InputNode, there is a corresponding entry in mOutputParams of the
   // InputNode's mInputNode.
   nsTArray<AudioNode::InputNode> mInputNodes;
   const char* mName;
   // The input port used to connect the AudioParam's stream to its node's stream
   RefPtr<MediaInputPort> mNodeStreamPort;
   const uint32_t mIndex;
   const float mDefaultValue;
-  const float mMinValue;
-  const float mMaxValue;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif
 
--- a/dom/media/webaudio/BiquadFilterNode.cpp
+++ b/dom/media/webaudio/BiquadFilterNode.cpp
@@ -246,22 +246,20 @@ private:
 
 BiquadFilterNode::BiquadFilterNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
   , mType(BiquadFilterType::Lowpass)
   , mFrequency(new AudioParam(this, BiquadFilterNodeEngine::FREQUENCY,
-                              "frequency", 350.f,
-                              -(aContext->SampleRate() / 2),
-                              aContext->SampleRate() / 2))
-  , mDetune(new AudioParam(this, BiquadFilterNodeEngine::DETUNE, "detune", 0.f))
-  , mQ(new AudioParam(this, BiquadFilterNodeEngine::Q, "Q", 1.f))
-  , mGain(new AudioParam(this, BiquadFilterNodeEngine::GAIN, "gain", 0.f))
+                              350.f, "frequency"))
+  , mDetune(new AudioParam(this, BiquadFilterNodeEngine::DETUNE, 0.f, "detune"))
+  , mQ(new AudioParam(this, BiquadFilterNodeEngine::Q, 1.f, "Q"))
+  , mGain(new AudioParam(this, BiquadFilterNodeEngine::GAIN, 0.f, "gain"))
 {
   uint64_t windowID = aContext->GetParentObject()->WindowID();
   BiquadFilterNodeEngine* engine = new BiquadFilterNodeEngine(this, aContext->Destination(), windowID);
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NO_STREAM_FLAGS,
                                     aContext->Graph());
 }
 
--- a/dom/media/webaudio/ConstantSourceNode.cpp
+++ b/dom/media/webaudio/ConstantSourceNode.cpp
@@ -142,17 +142,17 @@ public:
 };
 
 ConstantSourceNode::ConstantSourceNode(AudioContext* aContext)
   : AudioScheduledSourceNode(aContext,
                              1,
                              ChannelCountMode::Max,
                              ChannelInterpretation::Speakers)
   , mOffset(new AudioParam(this, ConstantSourceNodeEngine::OFFSET,
-                           "offset", 1.0f))
+                           1.0, "offset"))
   , mStartCalled(false)
 {
   ConstantSourceNodeEngine* engine = new ConstantSourceNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NEED_MAIN_THREAD_FINISHED,
                                     aContext->Graph());
   engine->SetSourceStream(mStream);
   mStream->AddMainThreadListener(this);
--- a/dom/media/webaudio/DelayNode.cpp
+++ b/dom/media/webaudio/DelayNode.cpp
@@ -191,18 +191,17 @@ public:
   int32_t mLeftOverData;
 };
 
 DelayNode::DelayNode(AudioContext* aContext, double aMaxDelay)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
-  , mDelay(new AudioParam(this, DelayNodeEngine::DELAY, "delayTime", 0.0f,
-                          0.f, aMaxDelay))
+  , mDelay(new AudioParam(this, DelayNodeEngine::DELAY, 0.0f, "delayTime"))
 {
   DelayNodeEngine* engine =
     new DelayNodeEngine(this, aContext->Destination(),
                         aContext->SampleRate() * aMaxDelay);
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NO_STREAM_FLAGS,
                                     aContext->Graph());
 }
--- a/dom/media/webaudio/DynamicsCompressorNode.cpp
+++ b/dom/media/webaudio/DynamicsCompressorNode.cpp
@@ -183,26 +183,26 @@ private:
 };
 
 DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Explicit,
               ChannelInterpretation::Speakers)
   , mThreshold(new AudioParam(this, DynamicsCompressorNodeEngine::THRESHOLD,
-                              "threshold", -24.f, -100.f, 0.f))
+                              -24.f, "threshold"))
   , mKnee(new AudioParam(this, DynamicsCompressorNodeEngine::KNEE,
-                         "knee", 30.f, 0.f, 40.f))
+                         30.f, "knee"))
   , mRatio(new AudioParam(this, DynamicsCompressorNodeEngine::RATIO,
-                          "ratio", 12.f, 1.f, 20.f))
+                          12.f, "ratio"))
   , mReduction(0)
   , mAttack(new AudioParam(this, DynamicsCompressorNodeEngine::ATTACK,
-                           "attack", 0.003f, 0.f, 1.f))
+                           0.003f, "attack"))
   , mRelease(new AudioParam(this, DynamicsCompressorNodeEngine::RELEASE,
-                            "release", 0.25f, 0.f, 1.f))
+                            0.25f, "release"))
 {
   DynamicsCompressorNodeEngine* engine = new DynamicsCompressorNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NO_STREAM_FLAGS,
                                     aContext->Graph());
 }
 
 /* static */ already_AddRefed<DynamicsCompressorNode>
--- a/dom/media/webaudio/GainNode.cpp
+++ b/dom/media/webaudio/GainNode.cpp
@@ -115,17 +115,17 @@ public:
   AudioParamTimeline mGain;
 };
 
 GainNode::GainNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Max,
               ChannelInterpretation::Speakers)
-  , mGain(new AudioParam(this, GainNodeEngine::GAIN, "gain", 1.0f))
+  , mGain(new AudioParam(this, GainNodeEngine::GAIN, 1.0f, "gain"))
 {
   GainNodeEngine* engine = new GainNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NO_STREAM_FLAGS,
                                     aContext->Graph());
 }
 
 /* static */ already_AddRefed<GainNode>
--- a/dom/media/webaudio/OscillatorNode.cpp
+++ b/dom/media/webaudio/OscillatorNode.cpp
@@ -408,23 +408,21 @@ public:
 };
 
 OscillatorNode::OscillatorNode(AudioContext* aContext)
   : AudioScheduledSourceNode(aContext,
                              2,
                              ChannelCountMode::Max,
                              ChannelInterpretation::Speakers)
   , mType(OscillatorType::Sine)
-  , mFrequency(
-    new AudioParam(this, OscillatorNodeEngine::FREQUENCY, "frequency", 440.0f,
-                   -(aContext->SampleRate() / 2), aContext->SampleRate() / 2))
-  , mDetune(new AudioParam(this, OscillatorNodeEngine::DETUNE, "detune", 0.0f))
+  , mFrequency(new AudioParam(this, OscillatorNodeEngine::FREQUENCY,
+                              440.0f, "frequency"))
+  , mDetune(new AudioParam(this, OscillatorNodeEngine::DETUNE, 0.0f, "detune"))
   , mStartCalled(false)
 {
-
   OscillatorNodeEngine* engine = new OscillatorNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NEED_MAIN_THREAD_FINISHED,
                                     aContext->Graph());
   engine->SetSourceStream(mStream);
   mStream->AddMainThreadListener(this);
 }
 
--- a/dom/media/webaudio/PannerNode.cpp
+++ b/dom/media/webaudio/PannerNode.cpp
@@ -296,22 +296,22 @@ public:
 PannerNode::PannerNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Clamped_max,
               ChannelInterpretation::Speakers)
   // Please keep these default values consistent with PannerNodeEngine::PannerNodeEngine above.
   , mPanningModel(PanningModelType::Equalpower)
   , mDistanceModel(DistanceModelType::Inverse)
-  , mPositionX(new AudioParam(this, PannerNode::POSITIONX, this->NodeType(), 0.f))
-  , mPositionY(new AudioParam(this, PannerNode::POSITIONY, this->NodeType(), 0.f))
-  , mPositionZ(new AudioParam(this, PannerNode::POSITIONZ, this->NodeType(), 0.f))
-  , mOrientationX(new AudioParam(this, PannerNode::ORIENTATIONX, this->NodeType(), 1.0f))
-  , mOrientationY(new AudioParam(this, PannerNode::ORIENTATIONY, this->NodeType(), 0.f))
-  , mOrientationZ(new AudioParam(this, PannerNode::ORIENTATIONZ, this->NodeType(), 0.f))
+  , mPositionX(new AudioParam(this, PannerNode::POSITIONX, 0., this->NodeType()))
+  , mPositionY(new AudioParam(this, PannerNode::POSITIONY, 0., this->NodeType()))
+  , mPositionZ(new AudioParam(this, PannerNode::POSITIONZ, 0., this->NodeType()))
+  , mOrientationX(new AudioParam(this, PannerNode::ORIENTATIONX, 1., this->NodeType()))
+  , mOrientationY(new AudioParam(this, PannerNode::ORIENTATIONY, 0., this->NodeType()))
+  , mOrientationZ(new AudioParam(this, PannerNode::ORIENTATIONZ, 0., this->NodeType()))
   , mVelocity()
   , mRefDistance(1.)
   , mMaxDistance(10000.)
   , mRolloffFactor(1.)
   , mConeInnerAngle(360.)
   , mConeOuterAngle(360.)
   , mConeOuterGain(0.)
 {
--- a/dom/media/webaudio/StereoPannerNode.cpp
+++ b/dom/media/webaudio/StereoPannerNode.cpp
@@ -170,17 +170,17 @@ public:
   AudioParamTimeline mPan;
 };
 
 StereoPannerNode::StereoPannerNode(AudioContext* aContext)
   : AudioNode(aContext,
               2,
               ChannelCountMode::Clamped_max,
               ChannelInterpretation::Speakers)
-  , mPan(new AudioParam(this, StereoPannerNodeEngine::PAN, "pan", 0.f, -1.f, 1.f))
+  , mPan(new AudioParam(this, StereoPannerNodeEngine::PAN, 0.f, "pan"))
 {
   StereoPannerNodeEngine* engine = new StereoPannerNodeEngine(this, aContext->Destination());
   mStream = AudioNodeStream::Create(aContext, engine,
                                     AudioNodeStream::NO_STREAM_FLAGS,
                                     aContext->Graph());
 }
 
 /* static */ already_AddRefed<StereoPannerNode>
--- a/dom/webidl/AudioParam.webidl
+++ b/dom/webidl/AudioParam.webidl
@@ -8,20 +8,18 @@
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 [Pref="dom.webaudio.enabled"]
 interface AudioParam {
 
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
+    attribute float value;
+    readonly attribute float defaultValue;
 
     // Parameter automation. 
     [Throws]
     AudioParam setValueAtTime(float value, double startTime);
     [Throws]
     AudioParam linearRampToValueAtTime(float value, double endTime);
     [Throws]
     AudioParam exponentialRampToValueAtTime(float value, double endTime);
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -32189,20 +32189,16 @@
         "path": "webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html",
         "url": "/webaudio/the-audio-api/the-audiodestinationnode-interface/idl-test.html"
       },
       {
         "path": "webaudio/the-audio-api/the-audionode-interface/audionode-connect-return-value.html",
         "url": "/webaudio/the-audio-api/the-audionode-interface/audionode-connect-return-value.html"
       },
       {
-        "path": "webaudio/the-audio-api/the-audioparam-interface/idl-test.html",
-        "url": "/webaudio/the-audio-api/the-audioparam-interface/idl-test.html"
-      },
-      {
         "path": "webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime.html",
         "url": "/webaudio/the-audio-api/the-audioparam-interface/retrospective-setValueAtTime.html"
       },
       {
         "path": "webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html",
         "url": "/webaudio/the-audio-api/the-audioparam-interface/setTargetAtTime-after-event-within-block.html"
       },
       {
deleted file mode 100644
--- a/testing/web-platform/tests/webaudio/the-audio-api/the-audioparam-interface/idl-test.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<!DOCTYPE html>
-<html class="a">
-<head>
-<title>AudioParam IDL Test</title>
-<script src="/resources/testharness.js"></script><script src="/resources/testharnessreport.js"></script><script src="/resources/idlharness.js"></script><script src="/resources/WebIDLParser.js"></script><script src="/webaudio/js/lodash.js"></script><script src="/webaudio/js/vendor-prefixes.js"></script><script src="/webaudio/js/helpers.js"></script><style type="text/css">
-    #audio-param-idl
-    { visibility:hidden; height: 0px;}
-  </style>
-</head>
-<body class="a">
-
-   <pre id="audio-param-idl">interface AudioParam {
-
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
-
-    // Parameter automation.
-    void setValueAtTime(float value, double startTime);
-    void linearRampToValueAtTime(float value, double endTime);
-    void exponentialRampToValueAtTime(float value, double endTime);
-
-    // Exponentially approach the target value with a rate having the given time constant.
-    void setTargetAtTime(float target, double startTime, double timeConstant);
-
-    // Sets an array of arbitrary parameter values starting at time for the given duration.
-    // The number of values will be scaled to fit into the desired duration.
-    void setValueCurveAtTime(Float32Array values, double startTime, double duration);
-
-    // Cancels all scheduled parameter changes with times greater than or equal to startTime.
-    void cancelScheduledValues(double startTime);
-
-};</pre>
-
-  <div id="log"></div>
-
-  <script>
-(function() {
-  var idl_array = new IdlArray();
-  idl_array.add_untested_idls(document.getElementById("audio-param-idl").textContent);
-
-  delay_time = (new AudioContext).createDelay().delayTime;
-
-  idl_array.add_objects({AudioParam: ["delay_time"]});
-  idl_array.test();
-})();
-  </script>
-</body>
-</html>
--- a/testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/idl-test.html
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-delaynode-interface/idl-test.html
@@ -91,20 +91,18 @@ interface AudioNode : EventTarget {
     attribute unsigned long channelCount;
     attribute ChannelCountMode channelCountMode;
     attribute ChannelInterpretation channelInterpretation;
 
 };</pre>
 
    <pre id="audio-param-idl">interface AudioParam {
 
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
+    attribute float value;
+    readonly attribute float defaultValue;
 
     // Parameter automation.
     void setValueAtTime(float value, double startTime);
     void linearRampToValueAtTime(float value, double endTime);
     void exponentialRampToValueAtTime(float value, double endTime);
 
     // Exponentially approach the target value with a rate having the given time constant.
     void setTargetAtTime(float target, double startTime, double timeConstant);
--- a/testing/web-platform/tests/webaudio/the-audio-api/the-gainnode-interface/idl-test.html
+++ b/testing/web-platform/tests/webaudio/the-audio-api/the-gainnode-interface/idl-test.html
@@ -90,20 +90,18 @@ interface AudioNode : EventTarget {
     attribute unsigned long channelCount;
     attribute ChannelCountMode channelCountMode;
     attribute ChannelInterpretation channelInterpretation;
 
 };</pre>
 
    <pre id="audio-param-idl">interface AudioParam {
 
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
+    attribute float value;
+    readonly attribute float defaultValue;
 
     // Parameter automation.
     void setValueAtTime(float value, double startTime);
     void linearRampToValueAtTime(float value, double endTime);
     void exponentialRampToValueAtTime(float value, double endTime);
 
     // Exponentially approach the target value with a rate having the given time constant.
     void setTargetAtTime(float target, double startTime, double timeConstant);