Title: [146486] trunk
Revision
146486
Author
commit-qu...@webkit.org
Date
2013-03-21 11:08:05 -0700 (Thu, 21 Mar 2013)

Log Message

Remove AudioGain.idl from compilation.
https://bugs.webkit.org/show_bug.cgi?id=112650

Patch by Praveen R Jadhav <pravee...@samsung.com> on 2013-03-21
Reviewed by Chris Rogers.

Source/WebCore:

Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
      https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode

AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
AudioParam class and doesn't have its own member functions/parameters. Also,
AudioGain is not part of WebAudio W3C specifications.

Test: webaudio/gain-basic.html

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
* Modules/webaudio/AudioBufferSourceNode.h:
(AudioBufferSourceNode):
(WebCore::AudioBufferSourceNode::gain):
* Modules/webaudio/AudioBufferSourceNode.idl:
* Modules/webaudio/AudioGain.h: Removed.
* Modules/webaudio/AudioGain.idl: Removed.
* Modules/webaudio/GainNode.cpp:
(WebCore::GainNode::GainNode):
* Modules/webaudio/GainNode.h:
(WebCore):
(WebCore::GainNode::create):
(GainNode):
(WebCore::GainNode::gain):
* Modules/webaudio/GainNode.idl:
* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
* Modules/webaudio/PannerNode.h:
(WebCore::PannerNode::distanceGain):
(WebCore::PannerNode::coneGain):
* Target.pri:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:

LayoutTests:

Test to verify GainNode attributes.

* webaudio/gain-basic-expected.txt: Added.
* webaudio/gain-basic.html: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (146485 => 146486)


--- trunk/LayoutTests/ChangeLog	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/LayoutTests/ChangeLog	2013-03-21 18:08:05 UTC (rev 146486)
@@ -1,3 +1,15 @@
+2013-03-21  Praveen R Jadhav  <pravee...@samsung.com>
+
+        Remove AudioGain.idl from compilation.
+        https://bugs.webkit.org/show_bug.cgi?id=112650
+
+        Reviewed by Chris Rogers.
+
+        Test to verify GainNode attributes.
+
+        * webaudio/gain-basic-expected.txt: Added.
+        * webaudio/gain-basic.html: Added.
+
 2013-03-21  Anton Muhin  <ant...@chromium.org>
 
         Unreviewed Chromium gardening.

Added: trunk/LayoutTests/webaudio/gain-basic-expected.txt (0 => 146486)


--- trunk/LayoutTests/webaudio/gain-basic-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/webaudio/gain-basic-expected.txt	2013-03-21 18:08:05 UTC (rev 146486)
@@ -0,0 +1,10 @@
+Tests GainNode attributes in IDL.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS gain is of AudioParam type.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/webaudio/gain-basic.html (0 => 146486)


--- trunk/LayoutTests/webaudio/gain-basic.html	                        (rev 0)
+++ trunk/LayoutTests/webaudio/gain-basic.html	2013-03-21 18:08:05 UTC (rev 146486)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+
+<!--
+Verifies GainNode attributes and their type.
+-->
+
+<html>
+<head>
+<script src=""
+<script type="text/_javascript_" src=""
+
+</head>
+<body>
+
+<script>
+description("Tests GainNode attributes in IDL.");
+
+function runTest() {
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+    }
+
+    // Create audio context.
+    var context = new webkitAudioContext();
+
+    // Create gain node.
+    var gainNode = context.createGainNode();
+
+    if (gainNode.gain.toString().indexOf("AudioParam") > -1)
+        testPassed("gain is of AudioParam type.");
+    else
+        testFailed("gain is not of AudioParam type.");
+}
+
+runTest();
+</script>
+<script src=""
+
+</body>
+</html>

Modified: trunk/Source/WebCore/CMakeLists.txt (146485 => 146486)


--- trunk/Source/WebCore/CMakeLists.txt	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-03-21 18:08:05 UTC (rev 146486)
@@ -251,7 +251,6 @@
     Modules/webaudio/ChannelMergerNode.idl
     Modules/webaudio/AudioContext.idl
     Modules/webaudio/AudioDestinationNode.idl
-    Modules/webaudio/AudioGain.idl
     Modules/webaudio/GainNode.idl
     Modules/webaudio/AudioListener.idl
     Modules/webaudio/AudioNode.idl

Modified: trunk/Source/WebCore/ChangeLog (146485 => 146486)


--- trunk/Source/WebCore/ChangeLog	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/ChangeLog	2013-03-21 18:08:05 UTC (rev 146486)
@@ -1,3 +1,48 @@
+2013-03-21  Praveen R Jadhav  <pravee...@samsung.com>
+
+        Remove AudioGain.idl from compilation.
+        https://bugs.webkit.org/show_bug.cgi?id=112650
+
+        Reviewed by Chris Rogers.
+
+        Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
+              https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
+
+        AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
+        AudioParam class and doesn't have its own member functions/parameters. Also,
+        AudioGain is not part of WebAudio W3C specifications.
+
+        Test: webaudio/gain-basic.html
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * Modules/webaudio/AudioBufferSourceNode.cpp:
+        (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
+        * Modules/webaudio/AudioBufferSourceNode.h:
+        (AudioBufferSourceNode):
+        (WebCore::AudioBufferSourceNode::gain):
+        * Modules/webaudio/AudioBufferSourceNode.idl:
+        * Modules/webaudio/AudioGain.h: Removed.
+        * Modules/webaudio/AudioGain.idl: Removed.
+        * Modules/webaudio/GainNode.cpp:
+        (WebCore::GainNode::GainNode):
+        * Modules/webaudio/GainNode.h:
+        (WebCore):
+        (WebCore::GainNode::create):
+        (GainNode):
+        (WebCore::GainNode::gain):
+        * Modules/webaudio/GainNode.idl:
+        * Modules/webaudio/PannerNode.cpp:
+        (WebCore::PannerNode::PannerNode):
+        * Modules/webaudio/PannerNode.h:
+        (WebCore::PannerNode::distanceGain):
+        (WebCore::PannerNode::coneGain):
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2013-03-21  Dominic Mazzoni  <dmazz...@google.com>
 
         Implement Web Speech Synthesis for Chromium

Modified: trunk/Source/WebCore/DerivedSources.make (146485 => 146486)


--- trunk/Source/WebCore/DerivedSources.make	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/DerivedSources.make	2013-03-21 18:08:05 UTC (rev 146486)
@@ -136,7 +136,6 @@
     $(WebCore)/Modules/webaudio/ChannelSplitterNode.idl \
     $(WebCore)/Modules/webaudio/AudioContext.idl \
     $(WebCore)/Modules/webaudio/AudioDestinationNode.idl \
-    $(WebCore)/Modules/webaudio/AudioGain.idl \
     $(WebCore)/Modules/webaudio/GainNode.idl \
     $(WebCore)/Modules/webaudio/AudioListener.idl \
     $(WebCore)/Modules/webaudio/AudioNode.idl \

Modified: trunk/Source/WebCore/DerivedSources.pri (146485 => 146486)


--- trunk/Source/WebCore/DerivedSources.pri	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/DerivedSources.pri	2013-03-21 18:08:05 UTC (rev 146486)
@@ -146,7 +146,6 @@
     $$PWD/Modules/webaudio/ChannelSplitterNode.idl \
     $$PWD/Modules/webaudio/AudioContext.idl \
     $$PWD/Modules/webaudio/AudioDestinationNode.idl \
-    $$PWD/Modules/webaudio/AudioGain.idl \
     $$PWD/Modules/webaudio/GainNode.idl \
     $$PWD/Modules/webaudio/AudioListener.idl \
     $$PWD/Modules/webaudio/AudioNode.idl \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (146485 => 146486)


--- trunk/Source/WebCore/GNUmakefile.list.am	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-03-21 18:08:05 UTC (rev 146486)
@@ -51,8 +51,6 @@
 	DerivedSources/WebCore/JSAudioContext.h \
 	DerivedSources/WebCore/JSAudioDestinationNode.cpp \
 	DerivedSources/WebCore/JSAudioDestinationNode.h \
-	DerivedSources/WebCore/JSAudioGain.cpp \
-	DerivedSources/WebCore/JSAudioGain.h \
 	DerivedSources/WebCore/JSGainNode.cpp \
 	DerivedSources/WebCore/JSGainNode.h \
 	DerivedSources/WebCore/JSAudioListener.cpp \
@@ -1296,7 +1294,6 @@
 	$(WebCore)/Modules/webaudio/ChannelSplitterNode.idl \
 	$(WebCore)/Modules/webaudio/AudioContext.idl \
 	$(WebCore)/Modules/webaudio/AudioDestinationNode.idl \
-	$(WebCore)/Modules/webaudio/AudioGain.idl \
 	$(WebCore)/Modules/webaudio/GainNode.idl \
 	$(WebCore)/Modules/webaudio/AudioListener.idl \
 	$(WebCore)/Modules/webaudio/AudioNode.idl \
@@ -2053,7 +2050,6 @@
 	Source/WebCore/Modules/webaudio/AudioContext.h \
 	Source/WebCore/Modules/webaudio/AudioDestinationNode.cpp \
 	Source/WebCore/Modules/webaudio/AudioDestinationNode.h \
-	Source/WebCore/Modules/webaudio/AudioGain.h \
 	Source/WebCore/Modules/webaudio/GainNode.cpp \
 	Source/WebCore/Modules/webaudio/GainNode.h \
 	Source/WebCore/Modules/webaudio/AudioListener.cpp \

Modified: trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp	2013-03-21 18:08:05 UTC (rev 146486)
@@ -69,9 +69,9 @@
 {
     setNodeType(NodeTypeAudioBufferSource);
 
-    m_gain = AudioGain::create(context, "gain", 1.0, 0.0, 1.0);
+    m_gain = AudioParam::create(context, "gain", 1.0, 0.0, 1.0);
     m_playbackRate = AudioParam::create(context, "playbackRate", 1.0, 0.0, MaxRate);
-    
+
     // Default to mono.  A call to setBuffer() will set the number of output channels to that of the buffer.
     addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
 

Modified: trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h	2013-03-21 18:08:05 UTC (rev 146486)
@@ -27,7 +27,7 @@
 
 #include "AudioBuffer.h"
 #include "AudioBus.h"
-#include "AudioGain.h"
+#include "AudioParam.h"
 #include "AudioScheduledSourceNode.h"
 #include "PannerNode.h"
 #include <wtf/OwnArrayPtr.h>
@@ -43,24 +43,24 @@
 // It generally will be used for short sounds which require a high degree of scheduling flexibility (can playback in rhythmically perfect ways).
 
 class AudioBufferSourceNode : public AudioScheduledSourceNode {
-public:    
+public:
     static PassRefPtr<AudioBufferSourceNode> create(AudioContext*, float sampleRate);
 
     virtual ~AudioBufferSourceNode();
-    
+
     // AudioNode
     virtual void process(size_t framesToProcess);
     virtual void reset();
-    
+
     // setBuffer() is called on the main thread.  This is the buffer we use for playback.
     // returns true on success.
     bool setBuffer(AudioBuffer*);
     AudioBuffer* buffer() { return m_buffer.get(); }
-                    
+
     // numberOfChannels() returns the number of output channels.  This value equals the number of channels from the buffer.
     // If a new buffer is set with a different number of channels, then this value will dynamically change.
     unsigned numberOfChannels();
-                    
+
     // Play-state
     void startGrain(double when, double grainOffset);
     void startGrain(double when, double grainOffset, double grainDuration);
@@ -85,7 +85,7 @@
     bool looping();
     void setLooping(bool);
 
-    AudioGain* gain() { return m_gain.get(); }                                        
+    AudioParam* gain() { return m_gain.get(); }
     AudioParam* playbackRate() { return m_playbackRate.get(); }
 
     // If a panner node is set, then we can incorporate doppler shift into the playback pitch rate.
@@ -115,7 +115,7 @@
     OwnArrayPtr<float*> m_destinationChannels;
 
     // Used for the "gain" and "playbackRate" attributes.
-    RefPtr<AudioGain> m_gain;
+    RefPtr<AudioParam> m_gain;
     RefPtr<AudioParam> m_playbackRate;
 
     // If m_isLooping is false, then this node will be done playing and become inactive after it reaches the end of the sample data in the buffer.
@@ -140,7 +140,7 @@
 
     // m_lastGain provides continuity when we dynamically adjust the gain.
     float m_lastGain;
-    
+
     // We optionally keep track of a panner node which has a doppler shift that is incorporated into
     // the pitch rate. We manually manage ref-counting because we want to use RefTypeConnection.
     PannerNode* m_pannerNode;

Modified: trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl	2013-03-21 18:08:05 UTC (rev 146486)
@@ -37,7 +37,7 @@
 
     readonly attribute unsigned short playbackState;
 
-    readonly attribute AudioGain gain;
+    readonly attribute AudioParam gain;
     readonly attribute AudioParam playbackRate;
 
     attribute boolean loop; // This is the proper attribute name from the specification.

Deleted: trunk/Source/WebCore/Modules/webaudio/AudioGain.h (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/AudioGain.h	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/AudioGain.h	2013-03-21 18:08:05 UTC (rev 146486)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef AudioGain_h
-#define AudioGain_h
-
-#include "AudioParam.h"
-#include <wtf/PassRefPtr.h>
-
-namespace WebCore {
-
-class AudioGain : public AudioParam {
-public:   
-    static PassRefPtr<AudioGain> create(AudioContext* context, const char* name, double defaultValue, double minValue, double maxValue)
-    {
-        return adoptRef(new AudioGain(context, name, defaultValue, minValue, maxValue));
-    }
-
-private:
-    AudioGain(AudioContext* context, const char* name, double defaultValue, double minValue, double maxValue)
-        : AudioParam(context, name, defaultValue, minValue, maxValue)
-    {
-    }
-};
-
-} // namespace WebCore
-
-#endif // AudioParam_h

Deleted: trunk/Source/WebCore/Modules/webaudio/AudioGain.idl (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/AudioGain.idl	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/AudioGain.idl	2013-03-21 18:08:05 UTC (rev 146486)
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=WEB_AUDIO,
-    JSGenerateToJSObject
-] interface AudioGain : AudioParam {
-};

Modified: trunk/Source/WebCore/Modules/webaudio/GainNode.cpp (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/GainNode.cpp	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/GainNode.cpp	2013-03-21 18:08:05 UTC (rev 146486)
@@ -39,13 +39,13 @@
     , m_lastGain(1.0)
     , m_sampleAccurateGainValues(AudioNode::ProcessingSizeInFrames) // FIXME: can probably share temp buffer in context
 {
-    m_gain = AudioGain::create(context, "gain", 1.0, 0.0, 1.0);
+    m_gain = AudioParam::create(context, "gain", 1.0, 0.0, 1.0);
 
     addInput(adoptPtr(new AudioNodeInput(this)));
     addOutput(adoptPtr(new AudioNodeOutput(this, 1)));
-    
+
     setNodeType(NodeTypeGain);
-    
+
     initialize();
 }
 

Modified: trunk/Source/WebCore/Modules/webaudio/GainNode.h (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/GainNode.h	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/GainNode.h	2013-03-21 18:08:05 UTC (rev 146486)
@@ -25,15 +25,15 @@
 #ifndef GainNode_h
 #define GainNode_h
 
-#include "AudioGain.h"
 #include "AudioNode.h"
+#include "AudioParam.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/Threading.h>
 
 namespace WebCore {
 
 class AudioContext;
-    
+
 // GainNode is an AudioNode with one input and one output which applies a gain (volume) change to the audio signal.
 // De-zippering (smoothing) is applied when the gain value is changed dynamically.
 
@@ -41,9 +41,9 @@
 public:
     static PassRefPtr<GainNode> create(AudioContext* context, float sampleRate)
     {
-        return adoptRef(new GainNode(context, sampleRate));      
+        return adoptRef(new GainNode(context, sampleRate));
     }
-    
+
     // AudioNode
     virtual void process(size_t framesToProcess);
     virtual void reset();
@@ -52,8 +52,8 @@
     virtual void checkNumberOfChannelsForInput(AudioNodeInput*);
 
     // _javascript_ interface
-    AudioGain* gain() { return m_gain.get(); }                                   
-    
+    AudioParam* gain() { return m_gain.get(); }
+
 private:
     virtual double tailTime() const OVERRIDE { return 0; }
     virtual double latencyTime() const OVERRIDE { return 0; }
@@ -61,7 +61,7 @@
     GainNode(AudioContext*, float sampleRate);
 
     float m_lastGain; // for de-zippering
-    RefPtr<AudioGain> m_gain;
+    RefPtr<AudioParam> m_gain;
 
     AudioFloatArray m_sampleAccurateGainValues;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/GainNode.idl (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/GainNode.idl	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/GainNode.idl	2013-03-21 18:08:05 UTC (rev 146486)
@@ -27,5 +27,5 @@
     JSGenerateToJSObject
 ] interface GainNode : AudioNode {
     // FIXME: eventually it will be interesting to remove the readonly restriction, but need to properly deal with thread safety here.
-    readonly attribute AudioGain gain;
+    readonly attribute AudioParam gain;
 };

Modified: trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/PannerNode.cpp	2013-03-21 18:08:05 UTC (rev 146486)
@@ -62,13 +62,13 @@
     m_channelCountMode = ClampedMax;
     m_channelInterpretation = AudioBus::Speakers;
 
-    m_distanceGain = AudioGain::create(context, "distanceGain", 1.0, 0.0, 1.0);
-    m_coneGain = AudioGain::create(context, "coneGain", 1.0, 0.0, 1.0);
+    m_distanceGain = AudioParam::create(context, "distanceGain", 1.0, 0.0, 1.0);
+    m_coneGain = AudioParam::create(context, "coneGain", 1.0, 0.0, 1.0);
 
     m_position = FloatPoint3D(0, 0, 0);
     m_orientation = FloatPoint3D(1, 0, 0);
     m_velocity = FloatPoint3D(0, 0, 0);
-    
+
     setNodeType(NodeTypePanner);
 
     initialize();

Modified: trunk/Source/WebCore/Modules/webaudio/PannerNode.h (146485 => 146486)


--- trunk/Source/WebCore/Modules/webaudio/PannerNode.h	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Modules/webaudio/PannerNode.h	2013-03-21 18:08:05 UTC (rev 146486)
@@ -26,9 +26,9 @@
 #define PannerNode_h
 
 #include "AudioBus.h"
-#include "AudioGain.h"
 #include "AudioListener.h"
 #include "AudioNode.h"
+#include "AudioParam.h"
 #include "Cone.h"
 #include "Distance.h"
 #include "FloatPoint3D.h"
@@ -60,7 +60,7 @@
         INVERSE_DISTANCE = 1,
         EXPONENTIAL_DISTANCE = 2,
     };
-    
+
     static PassRefPtr<PannerNode> create(AudioContext* context, float sampleRate)
     {
         return adoptRef(new PannerNode(context, sampleRate));
@@ -123,8 +123,8 @@
     float dopplerRate();
 
     // Accessors for dynamically calculated gain values.
-    AudioGain* distanceGain() { return m_distanceGain.get(); }                                        
-    AudioGain* coneGain() { return m_coneGain.get(); }                                        
+    AudioParam* distanceGain() { return m_distanceGain.get(); }
+    AudioParam* coneGain() { return m_coneGain.get(); }
 
     virtual double tailTime() const OVERRIDE { return m_panner ? m_panner->tailTime() : 0; }
     virtual double latencyTime() const OVERRIDE { return m_panner ? m_panner->latencyTime() : 0; }
@@ -147,8 +147,8 @@
     FloatPoint3D m_velocity;
 
     // Gain
-    RefPtr<AudioGain> m_distanceGain;
-    RefPtr<AudioGain> m_coneGain;
+    RefPtr<AudioParam> m_distanceGain;
+    RefPtr<AudioParam> m_coneGain;
     DistanceEffect m_distanceEffect;
     ConeEffect m_coneEffect;
     float m_lastGain;

Modified: trunk/Source/WebCore/Target.pri (146485 => 146486)


--- trunk/Source/WebCore/Target.pri	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/Target.pri	2013-03-21 18:08:05 UTC (rev 146486)
@@ -3436,7 +3436,6 @@
         Modules/webaudio/ChannelSplitterNode.h \
         Modules/webaudio/AudioContext.h \
         Modules/webaudio/AudioDestinationNode.h \
-        Modules/webaudio/AudioGain.h \
         Modules/webaudio/GainNode.h \
         Modules/webaudio/AudioListener.h \
         Modules/webaudio/AudioNode.h \

Modified: trunk/Source/WebCore/WebCore.gypi (146485 => 146486)


--- trunk/Source/WebCore/WebCore.gypi	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/WebCore.gypi	2013-03-21 18:08:05 UTC (rev 146486)
@@ -201,7 +201,6 @@
             'Modules/webaudio/ChannelSplitterNode.idl',
             'Modules/webaudio/AudioContext.idl',
             'Modules/webaudio/AudioDestinationNode.idl',
-            'Modules/webaudio/AudioGain.idl',
             'Modules/webaudio/GainNode.idl',
             'Modules/webaudio/AudioListener.idl',
             'Modules/webaudio/AudioNode.idl',
@@ -1010,7 +1009,6 @@
             'Modules/webaudio/AudioContext.h',
             'Modules/webaudio/AudioDestinationNode.cpp',
             'Modules/webaudio/AudioDestinationNode.h',
-            'Modules/webaudio/AudioGain.h',
             'Modules/webaudio/GainNode.cpp',
             'Modules/webaudio/GainNode.h',
             'Modules/webaudio/AudioListener.cpp',
@@ -6345,8 +6343,6 @@
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioContext.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioDestinationNode.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioDestinationNode.h',
-            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioGain.cpp',
-            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioGain.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSGainNode.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSGainNode.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSAudioListener.cpp',

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (146485 => 146486)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-03-21 17:56:31 UTC (rev 146485)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-03-21 18:08:05 UTC (rev 146486)
@@ -6598,7 +6598,6 @@
 		FD31600512B0267600C1A359 /* AudioContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FBB12B0267500C1A359 /* AudioContext.h */; };
 		FD31600712B0267600C1A359 /* AudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FBD12B0267500C1A359 /* AudioDestinationNode.cpp */; };
 		FD31600812B0267600C1A359 /* AudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FBE12B0267500C1A359 /* AudioDestinationNode.h */; };
-		FD31600A12B0267600C1A359 /* AudioGain.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC012B0267500C1A359 /* AudioGain.h */; };
 		FD31600C12B0267600C1A359 /* GainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC212B0267500C1A359 /* GainNode.cpp */; };
 		FD31600D12B0267600C1A359 /* GainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD315FC312B0267500C1A359 /* GainNode.h */; };
 		FD31600F12B0267600C1A359 /* AudioListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD315FC512B0267500C1A359 /* AudioListener.cpp */; };
@@ -6746,8 +6745,6 @@
 		FDA15EA612B03EE1003A583A /* JSAudioContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8A12B03EE1003A583A /* JSAudioContext.h */; };
 		FDA15EA712B03EE1003A583A /* JSAudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8B12B03EE1003A583A /* JSAudioDestinationNode.cpp */; };
 		FDA15EA812B03EE1003A583A /* JSAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8C12B03EE1003A583A /* JSAudioDestinationNode.h */; };
-		FDA15EA912B03EE1003A583A /* JSAudioGain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8D12B03EE1003A583A /* JSAudioGain.cpp */; };
-		FDA15EAA12B03EE1003A583A /* JSAudioGain.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E8E12B03EE1003A583A /* JSAudioGain.h */; };
 		FDA15EAB12B03EE1003A583A /* JSGainNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */; };
 		FDA15EAC12B03EE1003A583A /* JSGainNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA15E9012B03EE1003A583A /* JSGainNode.h */; };
 		FDA15EAD12B03EE1003A583A /* JSAudioListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E9112B03EE1003A583A /* JSAudioListener.cpp */; };
@@ -14390,8 +14387,6 @@
 		FD315FBD12B0267500C1A359 /* AudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioDestinationNode.cpp; sourceTree = "<group>"; };
 		FD315FBE12B0267500C1A359 /* AudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioDestinationNode.h; sourceTree = "<group>"; };
 		FD315FBF12B0267500C1A359 /* AudioDestinationNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioDestinationNode.idl; sourceTree = "<group>"; };
-		FD315FC012B0267500C1A359 /* AudioGain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioGain.h; sourceTree = "<group>"; };
-		FD315FC112B0267500C1A359 /* AudioGain.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AudioGain.idl; sourceTree = "<group>"; };
 		FD315FC212B0267500C1A359 /* GainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GainNode.cpp; sourceTree = "<group>"; };
 		FD315FC312B0267500C1A359 /* GainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GainNode.h; sourceTree = "<group>"; };
 		FD315FC412B0267500C1A359 /* GainNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = GainNode.idl; sourceTree = "<group>"; };
@@ -14557,8 +14552,6 @@
 		FDA15E8A12B03EE1003A583A /* JSAudioContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioContext.h; sourceTree = "<group>"; };
 		FDA15E8B12B03EE1003A583A /* JSAudioDestinationNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioDestinationNode.cpp; sourceTree = "<group>"; };
 		FDA15E8C12B03EE1003A583A /* JSAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioDestinationNode.h; sourceTree = "<group>"; };
-		FDA15E8D12B03EE1003A583A /* JSAudioGain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioGain.cpp; sourceTree = "<group>"; };
-		FDA15E8E12B03EE1003A583A /* JSAudioGain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioGain.h; sourceTree = "<group>"; };
 		FDA15E8F12B03EE1003A583A /* JSGainNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGainNode.cpp; sourceTree = "<group>"; };
 		FDA15E9012B03EE1003A583A /* JSGainNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGainNode.h; sourceTree = "<group>"; };
 		FDA15E9112B03EE1003A583A /* JSAudioListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioListener.cpp; sourceTree = "<group>"; };
@@ -23063,8 +23056,6 @@
 				FD315FBD12B0267500C1A359 /* AudioDestinationNode.cpp */,
 				FD315FBE12B0267500C1A359 /* AudioDestinationNode.h */,
 				FD315FBF12B0267500C1A359 /* AudioDestinationNode.idl */,
-				FD315FC012B0267500C1A359 /* AudioGain.h */,
-				FD315FC112B0267500C1A359 /* AudioGain.idl */,
 				FD315FC512B0267500C1A359 /* AudioListener.cpp */,
 				FD315FC612B0267500C1A359 /* AudioListener.h */,
 				FD315FC712B0267500C1A359 /* AudioListener.idl */,
@@ -23265,8 +23256,6 @@
 				FDA15E8A12B03EE1003A583A /* JSAudioContext.h */,
 				FDA15E8B12B03EE1003A583A /* JSAudioDestinationNode.cpp */,
 				FDA15E8C12B03EE1003A583A /* JSAudioDestinationNode.h */,
-				FDA15E8D12B03EE1003A583A /* JSAudioGain.cpp */,
-				FDA15E8E12B03EE1003A583A /* JSAudioGain.h */,
 				FDA15E9112B03EE1003A583A /* JSAudioListener.cpp */,
 				FDA15E9212B03EE1003A583A /* JSAudioListener.h */,
 				FDA15E9312B03EE1003A583A /* JSAudioNode.cpp */,
@@ -23420,7 +23409,6 @@
 				FD31608212B026F700C1A359 /* AudioDSPKernelProcessor.h in Headers */,
 				FD31608312B026F700C1A359 /* AudioFileReader.h in Headers */,
 				FD3160BF12B0272A00C1A359 /* AudioFileReaderMac.h in Headers */,
-				FD31600A12B0267600C1A359 /* AudioGain.h in Headers */,
 				FDE2D55B159E66EB00DCCCF8 /* AudioIOCallback.h in Headers */,
 				FD31601012B0267600C1A359 /* AudioListener.h in Headers */,
 				FD31601312B0267600C1A359 /* AudioNode.h in Headers */,
@@ -24962,7 +24950,6 @@
 				FDA15EA012B03EE1003A583A /* JSAudioBufferSourceNode.h in Headers */,
 				FDA15EA612B03EE1003A583A /* JSAudioContext.h in Headers */,
 				FDA15EA812B03EE1003A583A /* JSAudioDestinationNode.h in Headers */,
-				FDA15EAA12B03EE1003A583A /* JSAudioGain.h in Headers */,
 				FDA15EAE12B03EE1003A583A /* JSAudioListener.h in Headers */,
 				FDA15EB012B03EE1003A583A /* JSAudioNode.h in Headers */,
 				FDA15EB412B03EE1003A583A /* JSAudioParam.h in Headers */,
@@ -28275,7 +28262,6 @@
 				FDA15EA512B03EE1003A583A /* JSAudioContext.cpp in Sources */,
 				FDEAAAF412B02EE400DCF33B /* JSAudioContextCustom.cpp in Sources */,
 				FDA15EA712B03EE1003A583A /* JSAudioDestinationNode.cpp in Sources */,
-				FDA15EA912B03EE1003A583A /* JSAudioGain.cpp in Sources */,
 				FDA15EAD12B03EE1003A583A /* JSAudioListener.cpp in Sources */,
 				FDA15EAF12B03EE1003A583A /* JSAudioNode.cpp in Sources */,
 				FDA15EB312B03EE1003A583A /* JSAudioParam.cpp in Sources */,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to