WaveTable name has changed to PeriodicWave
authorcrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jun 2013 16:21:52 +0000 (16:21 +0000)
committercrogers@google.com <crogers@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 24 Jun 2013 16:21:52 +0000 (16:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117748

Reviewed by Jer Noble.

Source/WebCore:

See related Web Audio bug and spec change:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createPeriodicWave):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::setType):
(WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
(WebCore::OscillatorNode::process):
(WebCore::OscillatorNode::setPeriodicWave):
(WebCore::OscillatorNode::propagatesSilence):
* Modules/webaudio/OscillatorNode.h:
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
(WebCore::PeriodicWave::create):
(WebCore::PeriodicWave::createSine):
(WebCore::PeriodicWave::createSquare):
(WebCore::PeriodicWave::createSawtooth):
(WebCore::PeriodicWave::createTriangle):
(WebCore::PeriodicWave::PeriodicWave):
(WebCore::PeriodicWave::waveDataForFundamentalFrequency):
(WebCore::PeriodicWave::maxNumberOfPartials):
(WebCore::PeriodicWave::numberOfPartialsForRange):
(WebCore::PeriodicWave::createBandLimitedTables):
(WebCore::PeriodicWave::generateBasicWaveform):
* Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
(WebCore::PeriodicWave::rateScale):
(WebCore::PeriodicWave::periodicWaveSize):
(WebCore::PeriodicWave::sampleRate):
(WebCore::PeriodicWave::numberOfRanges):
* Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
* Target.pri:
* WebCore.xcodeproj/project.pbxproj:

Tools:

* Scripts/do-webcore-rename:

LayoutTests:

* fast/js/global-constructors-attributes-expected.txt:
* webaudio/oscillator-basic-expected.txt:
* webaudio/oscillator-basic.html:
* webaudio/oscillator-custom.html:
* webaudio/resources/oscillator-testing.js:
(generateExponentialOscillatorSweep):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151914 268f45cc-cd09-0410-ab3c-d52691b4dbfc

24 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/js/global-constructors-attributes-expected.txt
LayoutTests/webaudio/oscillator-basic-expected.txt
LayoutTests/webaudio/oscillator-basic.html
LayoutTests/webaudio/oscillator-custom.html
LayoutTests/webaudio/resources/oscillator-testing.js
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/DerivedSources.pri
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/AudioContext.idl
Source/WebCore/Modules/webaudio/OscillatorNode.cpp
Source/WebCore/Modules/webaudio/OscillatorNode.h
Source/WebCore/Modules/webaudio/OscillatorNode.idl
Source/WebCore/Modules/webaudio/PeriodicWave.cpp [moved from Source/WebCore/Modules/webaudio/WaveTable.cpp with 83% similarity]
Source/WebCore/Modules/webaudio/PeriodicWave.h [moved from Source/WebCore/Modules/webaudio/WaveTable.h with 78% similarity]
Source/WebCore/Modules/webaudio/PeriodicWave.idl [moved from Source/WebCore/Modules/webaudio/WaveTable.idl with 92% similarity]
Source/WebCore/Target.pri
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/Scripts/do-webcore-rename

index 50eab2f..d39cf05 100644 (file)
@@ -1,3 +1,17 @@
+2013-06-24  Chris Rogers  <crogers@google.com>
+
+        WaveTable name has changed to PeriodicWave
+        https://bugs.webkit.org/show_bug.cgi?id=117748
+
+        Reviewed by Jer Noble.
+
+        * fast/js/global-constructors-attributes-expected.txt:
+        * webaudio/oscillator-basic-expected.txt:
+        * webaudio/oscillator-basic.html:
+        * webaudio/oscillator-custom.html:
+        * webaudio/resources/oscillator-testing.js:
+        (generateExponentialOscillatorSweep):
+
 2013-06-24  Brent Fulgham  <bfulgham@apple.com>
 
         [Mac] Unreviewed build correction after r151868
index 6af90cf..d58c699 100644 (file)
@@ -908,6 +908,11 @@ PASS Object.getOwnPropertyDescriptor(global, 'Path').hasOwnProperty('get') is fa
 PASS Object.getOwnPropertyDescriptor(global, 'Path').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Path').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'Path').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'PeriodicWave').value is PeriodicWave
+PASS Object.getOwnPropertyDescriptor(global, 'PeriodicWave').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PeriodicWave').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'PeriodicWave').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'PeriodicWave').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Plugin').value is Plugin
 PASS Object.getOwnPropertyDescriptor(global, 'Plugin').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Plugin').hasOwnProperty('set') is false
@@ -1813,11 +1818,6 @@ PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').hasOwnProperty('g
 PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'WaveShaperNode').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WaveTable').value is WaveTable
-PASS Object.getOwnPropertyDescriptor(global, 'WaveTable').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WaveTable').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WaveTable').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WaveTable').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').value is WebGLActiveInfo
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'WebGLActiveInfo').hasOwnProperty('set') is false
index b076d76..6e5b07c 100644 (file)
@@ -10,7 +10,7 @@ PASS Oscillator correctly set to SINE type using legacy integer value.
 PASS Oscillator correctly set to SQUARE type using legacy integer value.
 PASS Oscillator correctly set to SAWTOOTH type using legacy integer value.
 PASS Oscillator correctly set to TRIANGLE type using legacy integer value.
-PASS Oscillator correctly set to CUSTOM type using setWaveTable.
+PASS Oscillator correctly set to CUSTOM type using setPeriodicWave.
 PASS Directly setting oscillator type to CUSTOM correctly throws exception.
 PASS Setting oscillator to invalid type 5 correctly throws exception.
 PASS Setting .type to illegal string value threw TypeError.
index 020ab73..f8bc558 100644 (file)
@@ -62,10 +62,10 @@ function runTest()
     // Now set a custom oscillator
     var coeffA = new Float32Array([0, 1, 0.5]);
     var coeffB = new Float32Array([0, 0, 0]);        
-    var wavetable = context.createWaveTable(coeffA, coeffB);
-    osc.setWaveTable(wavetable);
+    var wave = context.createPeriodicWave(coeffA, coeffB);
+    osc.setPeriodicWave(wave);
     if (osc.type == "custom")
-        testPassed("Oscillator correctly set to CUSTOM type using setWaveTable.");
+        testPassed("Oscillator correctly set to CUSTOM type using setPeriodicWave.");
     else
         testFailed("Oscillator set to CUSTOM type, but returns " + oscTypes[osc.type].name + " type.");
 
index 1c2192d..89c75a1 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 
 <!--
-Create an oscillator with a custom WaveTable and generate a slow exponential tone sweep.
+Create an oscillator with a custom PeriodicWave and generate a slow exponential tone sweep.
 The result can be checked for the correct wave shape and for aliasing artifacts.
 See oscillator-testing.js for details.
 -->
index 575baba..f39fbe9 100644 (file)
@@ -35,8 +35,8 @@ function generateExponentialOscillatorSweep(oscillatorType) {
         // Note the first values are expected to be zero (DC for coeffA and Nyquist for coeffB).
         var coeffA = new Float32Array([0, 1, 0.5]);
         var coeffB = new Float32Array([0, 0, 0]);        
-        var wavetable = context.createWaveTable(coeffA, coeffB);
-        osc.setWaveTable(wavetable);
+        var wave = context.createPeriodicWave(coeffA, coeffB);
+        osc.setPeriodicWave(wave);
     } else {
         osc.type = oscillatorType;
     }
index afe9422..c1ace5e 100644 (file)
@@ -273,7 +273,7 @@ set(WebCore_IDL_FILES
     Modules/webaudio/OscillatorNode.idl
     Modules/webaudio/AnalyserNode.idl
     Modules/webaudio/WaveShaperNode.idl
-    Modules/webaudio/WaveTable.idl
+    Modules/webaudio/PeriodicWave.idl
 
     Modules/webdatabase/Database.idl
     Modules/webdatabase/DatabaseCallback.idl
@@ -923,7 +923,7 @@ set(WebCore_SOURCES
     Modules/webaudio/WaveShaperDSPKernel.cpp
     Modules/webaudio/WaveShaperNode.cpp
     Modules/webaudio/WaveShaperProcessor.cpp
-    Modules/webaudio/WaveTable.cpp
+    Modules/webaudio/PeriodicWave.cpp
 
     Modules/webdatabase/ChangeVersionWrapper.cpp
     Modules/webdatabase/DOMWindowWebDatabase.cpp
index 628587c..00c44ad 100644 (file)
@@ -1,3 +1,52 @@
+2013-06-24  Chris Rogers  <crogers@google.com>
+
+        WaveTable name has changed to PeriodicWave
+        https://bugs.webkit.org/show_bug.cgi?id=117748
+
+        Reviewed by Jer Noble.
+
+        See related Web Audio bug and spec change:
+        https://www.w3.org/Bugs/Public/show_bug.cgi?id=19561
+        https://dvcs.w3.org/hg/audio/rev/7c4a40a9bb57
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * Modules/webaudio/AudioContext.cpp:
+        (WebCore::AudioContext::createPeriodicWave):
+        * Modules/webaudio/AudioContext.h:
+        * Modules/webaudio/AudioContext.idl:
+        * Modules/webaudio/OscillatorNode.cpp:
+        (WebCore::OscillatorNode::OscillatorNode):
+        (WebCore::OscillatorNode::setType):
+        (WebCore::OscillatorNode::calculateSampleAccuratePhaseIncrements):
+        (WebCore::OscillatorNode::process):
+        (WebCore::OscillatorNode::setPeriodicWave):
+        (WebCore::OscillatorNode::propagatesSilence):
+        * Modules/webaudio/OscillatorNode.h:
+        * Modules/webaudio/OscillatorNode.idl:
+        * Modules/webaudio/PeriodicWave.cpp: Renamed from Source/WebCore/Modules/webaudio/WaveTable.cpp.
+        (WebCore::PeriodicWave::create):
+        (WebCore::PeriodicWave::createSine):
+        (WebCore::PeriodicWave::createSquare):
+        (WebCore::PeriodicWave::createSawtooth):
+        (WebCore::PeriodicWave::createTriangle):
+        (WebCore::PeriodicWave::PeriodicWave):
+        (WebCore::PeriodicWave::waveDataForFundamentalFrequency):
+        (WebCore::PeriodicWave::maxNumberOfPartials):
+        (WebCore::PeriodicWave::numberOfPartialsForRange):
+        (WebCore::PeriodicWave::createBandLimitedTables):
+        (WebCore::PeriodicWave::generateBasicWaveform):
+        * Modules/webaudio/PeriodicWave.h: Renamed from Source/WebCore/Modules/webaudio/WaveTable.h.
+        (WebCore::PeriodicWave::rateScale):
+        (WebCore::PeriodicWave::periodicWaveSize):
+        (WebCore::PeriodicWave::sampleRate):
+        (WebCore::PeriodicWave::numberOfRanges):
+        * Modules/webaudio/PeriodicWave.idl: Renamed from Source/WebCore/Modules/webaudio/WaveTable.idl.
+        * Target.pri:
+        * WebCore.xcodeproj/project.pbxproj:
+
 2013-06-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
 
         Commented IDL implements statements should not impact code generation
index 4230220..1f6712b 100644 (file)
@@ -158,7 +158,7 @@ BINDING_IDLS = \
     $(WebCore)/Modules/webaudio/OfflineAudioCompletionEvent.idl \
     $(WebCore)/Modules/webaudio/AnalyserNode.idl \
     $(WebCore)/Modules/webaudio/WaveShaperNode.idl \
-    $(WebCore)/Modules/webaudio/WaveTable.idl \
+    $(WebCore)/Modules/webaudio/PeriodicWave.idl \
     $(WebCore)/Modules/webdatabase/DOMWindowWebDatabase.idl \
     $(WebCore)/Modules/webdatabase/Database.idl \
     $(WebCore)/Modules/webdatabase/DatabaseCallback.idl \
index 529abf4..84d98d3 100644 (file)
@@ -169,7 +169,7 @@ IDL_BINDINGS += \
     $$PWD/Modules/webaudio/OscillatorNode.idl \
     $$PWD/Modules/webaudio/AnalyserNode.idl \
     $$PWD/Modules/webaudio/WaveShaperNode.idl \
-    $$PWD/Modules/webaudio/WaveTable.idl \
+    $$PWD/Modules/webaudio/PeriodicWave.idl \
     $$PWD/Modules/webdatabase/DOMWindowWebDatabase.idl \
     $$PWD/Modules/webdatabase/Database.idl \
     $$PWD/Modules/webdatabase/DatabaseCallback.idl \
index a11f355..13c72cd 100644 (file)
@@ -782,8 +782,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSVideoTrackList.h \
        DerivedSources/WebCore/JSWaveShaperNode.cpp \
        DerivedSources/WebCore/JSWaveShaperNode.h \
-       DerivedSources/WebCore/JSWaveTable.cpp \
-       DerivedSources/WebCore/JSWaveTable.h \
+       DerivedSources/WebCore/JSPeriodicWave.cpp \
+       DerivedSources/WebCore/JSPeriodicWave.h \
        DerivedSources/WebCore/JSWebGLActiveInfo.cpp \
        DerivedSources/WebCore/JSWebGLActiveInfo.h \
        DerivedSources/WebCore/JSWebGLBuffer.cpp \
@@ -1329,7 +1329,7 @@ dom_binding_idls += \
        $(WebCore)/Modules/webaudio/OscillatorNode.idl \
        $(WebCore)/Modules/webaudio/AnalyserNode.idl \
        $(WebCore)/Modules/webaudio/WaveShaperNode.idl \
-       $(WebCore)/Modules/webaudio/WaveTable.idl \
+       $(WebCore)/Modules/webaudio/PeriodicWave.idl \
        $(WebCore)/Modules/webdatabase/DOMWindowWebDatabase.idl \
        $(WebCore)/Modules/webdatabase/Database.idl \
        $(WebCore)/Modules/webdatabase/DatabaseCallback.idl \
@@ -2148,8 +2148,8 @@ webcore_modules_sources += \
        Source/WebCore/Modules/webaudio/WaveShaperDSPKernel.h \
        Source/WebCore/Modules/webaudio/WaveShaperProcessor.cpp \
        Source/WebCore/Modules/webaudio/WaveShaperNode.h \
-       Source/WebCore/Modules/webaudio/WaveTable.cpp \
-       Source/WebCore/Modules/webaudio/WaveTable.h \
+       Source/WebCore/Modules/webaudio/PeriodicWave.cpp \
+       Source/WebCore/Modules/webaudio/PeriodicWave.h \
        Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h \
        Source/WebCore/Modules/webdatabase/AbstractSQLStatement.h \
        Source/WebCore/Modules/webdatabase/AbstractSQLStatementBackend.h \
index 526616a..24fab83 100644 (file)
 #include "OscillatorNode.h"
 #include "Page.h"
 #include "PannerNode.h"
+#include "PeriodicWave.h"
 #include "ScriptCallStack.h"
 #include "ScriptController.h"
 #include "ScriptProcessorNode.h"
 #include "WaveShaperNode.h"
-#include "WaveTable.h"
 
 #if ENABLE(MEDIA_STREAM)
 #include "MediaStream.h"
@@ -593,7 +593,7 @@ PassRefPtr<OscillatorNode> AudioContext::createOscillator()
     return node;
 }
 
-PassRefPtr<WaveTable> AudioContext::createWaveTable(Float32Array* real, Float32Array* imag, ExceptionCode& ec)
+PassRefPtr<PeriodicWave> AudioContext::createPeriodicWave(Float32Array* real, Float32Array* imag, ExceptionCode& ec)
 {
     ASSERT(isMainThread());
     
@@ -603,7 +603,7 @@ PassRefPtr<WaveTable> AudioContext::createWaveTable(Float32Array* real, Float32A
     }
     
     lazyInitialize();
-    return WaveTable::create(sampleRate(), real, imag);
+    return PeriodicWave::create(sampleRate(), real, imag);
 }
 
 void AudioContext::notifyNodeFinishedProcessing(AudioNode* node)
index 8fa938f..fab75c4 100644 (file)
@@ -68,7 +68,7 @@ class AnalyserNode;
 class WaveShaperNode;
 class ScriptProcessorNode;
 class OscillatorNode;
-class WaveTable;
+class PeriodicWave;
 
 // AudioContext is the cornerstone of the web audio API and all AudioNodes are created from it.
 // For thread safety between the audio thread and the main thread, it has a rendering graph locking mechanism. 
@@ -141,7 +141,7 @@ public:
     PassRefPtr<ChannelMergerNode> createChannelMerger(ExceptionCode&);
     PassRefPtr<ChannelMergerNode> createChannelMerger(size_t numberOfInputs, ExceptionCode&);
     PassRefPtr<OscillatorNode> createOscillator();
-    PassRefPtr<WaveTable> createWaveTable(Float32Array* real, Float32Array* imag, ExceptionCode&);
+    PassRefPtr<PeriodicWave> createPeriodicWave(Float32Array* real, Float32Array* imag, ExceptionCode&);
 
     // When a source node has no more processing to do (has finished playing), then it tells the context to dereference it.
     void notifyNodeFinishedProcessing(AudioNode*);
index 9094fce..4d49605 100644 (file)
@@ -75,7 +75,7 @@
     AnalyserNode createAnalyser();
     [RaisesException] ScriptProcessorNode createScriptProcessor(unsigned long bufferSize, optional unsigned long numberOfInputChannels, optional unsigned long numberOfOutputChannels);
     OscillatorNode createOscillator();
-    [RaisesException] WaveTable createWaveTable(Float32Array real, Float32Array imag);
+    [RaisesException] PeriodicWave createPeriodicWave(Float32Array real, Float32Array imag);
 
     // Channel splitting and merging
     [RaisesException] ChannelSplitterNode createChannelSplitter(optional unsigned long numberOfOutputs);
index 91c2917..e68d8dd 100644 (file)
@@ -32,8 +32,8 @@
 #include "AudioNodeOutput.h"
 #include "AudioUtilities.h"
 #include "ExceptionCode.h"
+#include "PeriodicWave.h"
 #include "VectorMath.h"
-#include "WaveTable.h"
 #include <algorithm>
 #include <wtf/MathExtras.h>
 
@@ -43,10 +43,10 @@ namespace WebCore {
 
 using namespace VectorMath;
 
-WaveTable* OscillatorNode::s_waveTableSine = 0;
-WaveTable* OscillatorNode::s_waveTableSquare = 0;
-WaveTable* OscillatorNode::s_waveTableSawtooth = 0;
-WaveTable* OscillatorNode::s_waveTableTriangle = 0;
+PeriodicWave* OscillatorNode::s_periodicWaveSine = 0;
+PeriodicWave* OscillatorNode::s_periodicWaveSquare = 0;
+PeriodicWave* OscillatorNode::s_periodicWaveSawtooth = 0;
+PeriodicWave* OscillatorNode::s_periodicWaveTriangle = 0;
 
 PassRefPtr<OscillatorNode> OscillatorNode::create(AudioContext* context, float sampleRate)
 {
@@ -68,7 +68,7 @@ OscillatorNode::OscillatorNode(AudioContext* context, float sampleRate)
     // Default to no detuning.
     m_detune = AudioParam::create(context, "detune", 0, -4800, 4800);
 
-    // Sets up default wavetable.
+    // Sets up default wave.
     setType(m_type);
 
     // An oscillator is always mono.
@@ -117,38 +117,38 @@ void OscillatorNode::setType(const String& type)
 
 bool OscillatorNode::setType(unsigned type)
 {
-    WaveTable* waveTable = 0;
+    PeriodicWave* periodicWave = 0;
     float sampleRate = this->sampleRate();
 
     switch (type) {
     case SINE:
-        if (!s_waveTableSine)
-            s_waveTableSine = WaveTable::createSine(sampleRate).leakRef();
-        waveTable = s_waveTableSine;
+        if (!s_periodicWaveSine)
+            s_periodicWaveSine = PeriodicWave::createSine(sampleRate).leakRef();
+        periodicWave = s_periodicWaveSine;
         break;
     case SQUARE:
-        if (!s_waveTableSquare)
-            s_waveTableSquare = WaveTable::createSquare(sampleRate).leakRef();
-        waveTable = s_waveTableSquare;
+        if (!s_periodicWaveSquare)
+            s_periodicWaveSquare = PeriodicWave::createSquare(sampleRate).leakRef();
+        periodicWave = s_periodicWaveSquare;
         break;
     case SAWTOOTH:
-        if (!s_waveTableSawtooth)
-            s_waveTableSawtooth = WaveTable::createSawtooth(sampleRate).leakRef();
-        waveTable = s_waveTableSawtooth;
+        if (!s_periodicWaveSawtooth)
+            s_periodicWaveSawtooth = PeriodicWave::createSawtooth(sampleRate).leakRef();
+        periodicWave = s_periodicWaveSawtooth;
         break;
     case TRIANGLE:
-        if (!s_waveTableTriangle)
-            s_waveTableTriangle = WaveTable::createTriangle(sampleRate).leakRef();
-        waveTable = s_waveTableTriangle;
+        if (!s_periodicWaveTriangle)
+            s_periodicWaveTriangle = PeriodicWave::createTriangle(sampleRate).leakRef();
+        periodicWave = s_periodicWaveTriangle;
         break;
     case CUSTOM:
     default:
-        // Return error for invalid types, including CUSTOM since setWaveTable() method must be
+        // Return error for invalid types, including CUSTOM since setPeriodicWave() method must be
         // called explicitly.
         return false;
     }
 
-    setWaveTable(waveTable);
+    setPeriodicWave(periodicWave);
     m_type = type;
     return true;
 }
@@ -170,7 +170,7 @@ bool OscillatorNode::calculateSampleAccuratePhaseIncrements(size_t framesToProce
     bool hasFrequencyChanges = false;
     float* phaseIncrements = m_phaseIncrements.data();
 
-    float finalScale = m_waveTable->rateScale();
+    float finalScale = m_periodicWave->rateScale();
 
     if (m_frequency->hasSampleAccurateValues()) {
         hasSampleAccurateValues = true;
@@ -212,7 +212,7 @@ bool OscillatorNode::calculateSampleAccuratePhaseIncrements(size_t framesToProce
     }
 
     if (hasSampleAccurateValues) {
-        // Convert from frequency to wavetable increment.
+        // Convert from frequency to wave increment.
         vsmul(phaseIncrements, 1, &finalScale, phaseIncrements, 1, framesToProcess);
     }
 
@@ -240,8 +240,8 @@ void OscillatorNode::process(size_t framesToProcess)
         return;
     }
 
-    // We must access m_waveTable only inside the lock.
-    if (!m_waveTable.get()) {
+    // We must access m_periodicWave only inside the lock.
+    if (!m_periodicWave.get()) {
         outputBus->zero();
         return;
     }
@@ -256,8 +256,8 @@ void OscillatorNode::process(size_t framesToProcess)
         return;
     }
 
-    unsigned waveTableSize = m_waveTable->waveTableSize();
-    double invWaveTableSize = 1.0 / waveTableSize;
+    unsigned periodicWaveSize = m_periodicWave->periodicWaveSize();
+    double invPeriodicWaveSize = 1.0 / periodicWaveSize;
 
     float* destP = outputBus->channel(0)->mutableData();
 
@@ -266,7 +266,7 @@ void OscillatorNode::process(size_t framesToProcess)
     // We keep virtualReadIndex double-precision since we're accumulating values.
     double virtualReadIndex = m_virtualReadIndex;
 
-    float rateScale = m_waveTable->rateScale();
+    float rateScale = m_periodicWave->rateScale();
     float invRateScale = 1 / rateScale;
     bool hasSampleAccurateValues = calculateSampleAccuratePhaseIncrements(framesToProcess);
 
@@ -280,13 +280,13 @@ void OscillatorNode::process(size_t framesToProcess)
         float detune = m_detune->smoothedValue();
         float detuneScale = powf(2, detune / 1200);
         frequency *= detuneScale;
-        m_waveTable->waveDataForFundamentalFrequency(frequency, lowerWaveData, higherWaveData, tableInterpolationFactor);
+        m_periodicWave->waveDataForFundamentalFrequency(frequency, lowerWaveData, higherWaveData, tableInterpolationFactor);
     }
 
     float incr = frequency * rateScale;
     float* phaseIncrements = m_phaseIncrements.data();
 
-    unsigned readIndexMask = waveTableSize - 1;
+    unsigned readIndexMask = periodicWaveSize - 1;
 
     // Start rendering at the correct offset.
     destP += quantumFrameOffset;
@@ -304,7 +304,7 @@ void OscillatorNode::process(size_t framesToProcess)
             incr = *phaseIncrements++;
 
             frequency = invRateScale * incr;
-            m_waveTable->waveDataForFundamentalFrequency(frequency, lowerWaveData, higherWaveData, tableInterpolationFactor);
+            m_periodicWave->waveDataForFundamentalFrequency(frequency, lowerWaveData, higherWaveData, tableInterpolationFactor);
         }
 
         float sample1Lower = lowerWaveData[readIndex];
@@ -322,9 +322,9 @@ void OscillatorNode::process(size_t framesToProcess)
 
         *destP++ = sample;
 
-        // Increment virtual read index and wrap virtualReadIndex into the range 0 -> waveTableSize.
+        // Increment virtual read index and wrap virtualReadIndex into the range 0 -> periodicWaveSize.
         virtualReadIndex += incr;
-        virtualReadIndex -= floor(virtualReadIndex * invWaveTableSize) * waveTableSize;
+        virtualReadIndex -= floor(virtualReadIndex * invPeriodicWaveSize) * periodicWaveSize;
     }
 
     m_virtualReadIndex = virtualReadIndex;
@@ -337,19 +337,19 @@ void OscillatorNode::reset()
     m_virtualReadIndex = 0;
 }
 
-void OscillatorNode::setWaveTable(WaveTable* waveTable)
+void OscillatorNode::setPeriodicWave(PeriodicWave* periodicWave)
 {
     ASSERT(isMainThread());
 
     // This synchronizes with process().
     MutexLocker processLocker(m_processLock);
-    m_waveTable = waveTable;
+    m_periodicWave = periodicWave;
     m_type = CUSTOM;
 }
 
 bool OscillatorNode::propagatesSilence() const
 {
-    return !isPlayingOrScheduled() || hasFinished() || !m_waveTable.get();
+    return !isPlayingOrScheduled() || hasFinished() || !m_periodicWave.get();
 }
 
 } // namespace WebCore
index 6f6d0fa..737926b 100644 (file)
@@ -36,7 +36,7 @@
 namespace WebCore {
 
 class AudioContext;
-class WaveTable;
+class PeriodicWave;
 
 // OscillatorNode is an audio generator of periodic waveforms.
 
@@ -68,7 +68,7 @@ public:
     AudioParam* frequency() { return m_frequency.get(); }
     AudioParam* detune() { return m_detune.get(); }
 
-    void setWaveTable(WaveTable*);
+    void setPeriodicWave(PeriodicWave*);
 
 private:
     OscillatorNode(AudioContext*, float sampleRate);
@@ -103,13 +103,13 @@ private:
     AudioFloatArray m_phaseIncrements;
     AudioFloatArray m_detuneValues;
     
-    RefPtr<WaveTable> m_waveTable;
+    RefPtr<PeriodicWave> m_periodicWave;
 
     // Cache the wave tables for different waveform types, except CUSTOM.
-    static WaveTable* s_waveTableSine;
-    static WaveTable* s_waveTableSquare;
-    static WaveTable* s_waveTableSawtooth;
-    static WaveTable* s_waveTableTriangle;
+    static PeriodicWave* s_periodicWaveSine;
+    static PeriodicWave* s_periodicWaveSquare;
+    static PeriodicWave* s_periodicWaveSawtooth;
+    static PeriodicWave* s_periodicWaveTriangle;
 };
 
 } // namespace WebCore
index d239db7..8e53396 100644 (file)
@@ -54,7 +54,7 @@
     [Conditional=LEGACY_WEB_AUDIO] void noteOn(double when);
     [Conditional=LEGACY_WEB_AUDIO] void noteOff(double when);
 
-    void setWaveTable(WaveTable waveTable);
+    void setPeriodicWave(PeriodicWave wave);
 
     attribute EventListener onended;
 };
@@ -30,7 +30,7 @@
 
 #if ENABLE(WEB_AUDIO)
 
-#include "WaveTable.h"
+#include "PeriodicWave.h"
 
 #include "FFTFrame.h"
 #include "OscillatorNode.h"
 #include <algorithm>
 #include <wtf/OwnPtr.h>
 
-const unsigned WaveTableSize = 4096; // This must be a power of two.
-const unsigned NumberOfRanges = 36; // There should be 3 * log2(WaveTableSize) 1/3 octave ranges.
+const unsigned PeriodicWaveSize = 4096; // This must be a power of two.
+const unsigned NumberOfRanges = 36; // There should be 3 * log2(PeriodicWaveSize) 1/3 octave ranges.
 const float CentsPerRange = 1200 / 3; // 1/3 Octave.
 
 namespace WebCore {
     
 using namespace VectorMath;
 
-PassRefPtr<WaveTable> WaveTable::create(float sampleRate, Float32Array* real, Float32Array* imag)
+PassRefPtr<PeriodicWave> PeriodicWave::create(float sampleRate, Float32Array* real, Float32Array* imag)
 {
     bool isGood = real && imag && real->length() == imag->length();
     ASSERT(isGood);
     if (isGood) {
-        RefPtr<WaveTable> waveTable = adoptRef(new WaveTable(sampleRate));
+        RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
         size_t numberOfComponents = real->length();
         waveTable->createBandLimitedTables(real->data(), imag->data(), numberOfComponents);
         return waveTable;
@@ -59,46 +59,46 @@ PassRefPtr<WaveTable> WaveTable::create(float sampleRate, Float32Array* real, Fl
     return 0;
 }
 
-PassRefPtr<WaveTable> WaveTable::createSine(float sampleRate)
+PassRefPtr<PeriodicWave> PeriodicWave::createSine(float sampleRate)
 {
-    RefPtr<WaveTable> waveTable = adoptRef(new WaveTable(sampleRate));
+    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SINE);
     return waveTable;
 }
 
-PassRefPtr<WaveTable> WaveTable::createSquare(float sampleRate)
+PassRefPtr<PeriodicWave> PeriodicWave::createSquare(float sampleRate)
 {
-    RefPtr<WaveTable> waveTable = adoptRef(new WaveTable(sampleRate));
+    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SQUARE);
     return waveTable;
 }
 
-PassRefPtr<WaveTable> WaveTable::createSawtooth(float sampleRate)
+PassRefPtr<PeriodicWave> PeriodicWave::createSawtooth(float sampleRate)
 {
-    RefPtr<WaveTable> waveTable = adoptRef(new WaveTable(sampleRate));
+    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::SAWTOOTH);
     return waveTable;
 }
 
-PassRefPtr<WaveTable> WaveTable::createTriangle(float sampleRate)
+PassRefPtr<PeriodicWave> PeriodicWave::createTriangle(float sampleRate)
 {
-    RefPtr<WaveTable> waveTable = adoptRef(new WaveTable(sampleRate));
+    RefPtr<PeriodicWave> waveTable = adoptRef(new PeriodicWave(sampleRate));
     waveTable->generateBasicWaveform(OscillatorNode::TRIANGLE);
     return waveTable;
 }
 
-WaveTable::WaveTable(float sampleRate)
+PeriodicWave::PeriodicWave(float sampleRate)
     : m_sampleRate(sampleRate)
-    , m_waveTableSize(WaveTableSize)
+    , m_periodicWaveSize(PeriodicWaveSize)
     , m_numberOfRanges(NumberOfRanges)
     , m_centsPerRange(CentsPerRange)
 {
     float nyquist = 0.5 * m_sampleRate;
     m_lowestFundamentalFrequency = nyquist / maxNumberOfPartials();
-    m_rateScale = m_waveTableSize / m_sampleRate;
+    m_rateScale = m_periodicWaveSize / m_sampleRate;
 }
 
-void WaveTable::waveDataForFundamentalFrequency(float fundamentalFrequency, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor)
+void PeriodicWave::waveDataForFundamentalFrequency(float fundamentalFrequency, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor)
 {
     // Negative frequencies are allowed, in which case we alias to the positive frequency.
     fundamentalFrequency = fabsf(fundamentalFrequency);
@@ -126,12 +126,12 @@ void WaveTable::waveDataForFundamentalFrequency(float fundamentalFrequency, floa
     tableInterpolationFactor = pitchRange - rangeIndex1;
 }
 
-unsigned WaveTable::maxNumberOfPartials() const
+unsigned PeriodicWave::maxNumberOfPartials() const
 {
-    return m_waveTableSize / 2;
+    return m_periodicWaveSize / 2;
 }
 
-unsigned WaveTable::numberOfPartialsForRange(unsigned rangeIndex) const
+unsigned PeriodicWave::numberOfPartialsForRange(unsigned rangeIndex) const
 {
     // Number of cents below nyquist where we cull partials.
     float centsToCull = rangeIndex * m_centsPerRange;
@@ -148,11 +148,11 @@ unsigned WaveTable::numberOfPartialsForRange(unsigned rangeIndex) const
 // Convert into time-domain wave tables.
 // One table is created for each range for non-aliasing playback at different playback rates.
 // Thus, higher ranges have more high-frequency partials culled out.
-void WaveTable::createBandLimitedTables(const float* realData, const float* imagData, unsigned numberOfComponents)
+void PeriodicWave::createBandLimitedTables(const float* realData, const float* imagData, unsigned numberOfComponents)
 {
     float normalizationScale = 1;
 
-    unsigned fftSize = m_waveTableSize;
+    unsigned fftSize = m_periodicWaveSize;
     unsigned halfSize = fftSize / 2;
     unsigned i;
     
@@ -198,7 +198,7 @@ void WaveTable::createBandLimitedTables(const float* realData, const float* imag
         realP[0] = 0;
 
         // Create the band-limited table.
-        OwnPtr<AudioFloatArray> table = adoptPtr(new AudioFloatArray(m_waveTableSize));
+        OwnPtr<AudioFloatArray> table = adoptPtr(new AudioFloatArray(m_periodicWaveSize));
         m_bandLimitedTables.append(table.release());
 
         // Apply an inverse FFT to generate the time-domain table data.
@@ -208,20 +208,20 @@ void WaveTable::createBandLimitedTables(const float* realData, const float* imag
         // For the first range (which has the highest power), calculate its peak value then compute normalization scale.
         if (!rangeIndex) {
             float maxValue;
-            vmaxmgv(data, 1, &maxValue, m_waveTableSize);
+            vmaxmgv(data, 1, &maxValue, m_periodicWaveSize);
 
             if (maxValue)
                 normalizationScale = 1.0f / maxValue;
         }
 
         // Apply normalization scale.
-        vsmul(data, 1, &normalizationScale, data, 1, m_waveTableSize);          
+        vsmul(data, 1, &normalizationScale, data, 1, m_periodicWaveSize);          
     }
 }
 
-void WaveTable::generateBasicWaveform(int shape)
+void PeriodicWave::generateBasicWaveform(int shape)
 {
-    unsigned fftSize = waveTableSize();
+    unsigned fftSize = periodicWaveSize();
     unsigned halfSize = fftSize / 2;
 
     AudioFloatArray real(halfSize);
similarity index 78%
rename from Source/WebCore/Modules/webaudio/WaveTable.h
rename to Source/WebCore/Modules/webaudio/PeriodicWave.h
index e351efa..3b6de68 100644 (file)
@@ -26,8 +26,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WaveTable_h
-#define WaveTable_h
+#ifndef PeriodicWave_h
+#define PeriodicWave_h
 
 #include "AudioArray.h"
 #include <wtf/Float32Array.h>
 
 namespace WebCore {
 
-class WaveTable : public RefCounted<WaveTable> {
+class PeriodicWave : public RefCounted<PeriodicWave> {
 public:
-    static PassRefPtr<WaveTable> createSine(float sampleRate);
-    static PassRefPtr<WaveTable> createSquare(float sampleRate);
-    static PassRefPtr<WaveTable> createSawtooth(float sampleRate);
-    static PassRefPtr<WaveTable> createTriangle(float sampleRate);
+    static PassRefPtr<PeriodicWave> createSine(float sampleRate);
+    static PassRefPtr<PeriodicWave> createSquare(float sampleRate);
+    static PassRefPtr<PeriodicWave> createSawtooth(float sampleRate);
+    static PassRefPtr<PeriodicWave> createTriangle(float sampleRate);
 
-    // Creates an arbitrary wavetable given the frequency components (Fourier coefficients).
-    static PassRefPtr<WaveTable> create(float sampleRate, Float32Array* real, Float32Array* imag);
+    // Creates an arbitrary wave given the frequency components (Fourier coefficients).
+    static PassRefPtr<PeriodicWave> create(float sampleRate, Float32Array* real, Float32Array* imag);
 
-    // Returns pointers to the lower and higher wavetable data for the pitch range containing
+    // Returns pointers to the lower and higher wave data for the pitch range containing
     // the given fundamental frequency. These two tables are in adjacent "pitch" ranges
     // where the higher table will have the maximum number of partials which won't alias when played back
-    // at this fundamental frequency. The lower wavetable is the next range containing fewer partials than the higher wavetable.
+    // at this fundamental frequency. The lower wave is the next range containing fewer partials than the higher wave.
     // Interpolation between these two tables can be made according to tableInterpolationFactor.
     // Where values from 0 -> 1 interpolate between lower -> higher.
     void waveDataForFundamentalFrequency(float, float* &lowerWaveData, float* &higherWaveData, float& tableInterpolationFactor);
@@ -60,16 +60,16 @@ public:
     // Returns the scalar multiplier to the oscillator frequency to calculate wave table phase increment.
     float rateScale() const { return m_rateScale; }
 
-    unsigned waveTableSize() const { return m_waveTableSize; }
+    unsigned periodicWaveSize() const { return m_periodicWaveSize; }
     float sampleRate() const { return m_sampleRate; }
 
 private:
-    explicit WaveTable(float sampleRate);
+    explicit PeriodicWave(float sampleRate);
 
     void generateBasicWaveform(int);
 
     float m_sampleRate;
-    unsigned m_waveTableSize;
+    unsigned m_periodicWaveSize;
     unsigned m_numberOfRanges;
     float m_centsPerRange;
 
@@ -94,4 +94,4 @@ private:
 
 } // namespace WebCore
 
-#endif // WaveTable_h
+#endif // PeriodicWave_h
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// WaveTable represents a periodic audio waveform given by its Fourier coefficients.
+// PeriodicWave represents a periodic audio waveform given by its Fourier coefficients.
 [
     Conditional=WEB_AUDIO,
     ImplementationLacksVTable
-] interface WaveTable {
+] interface PeriodicWave {
 
 };
index cba426c..ee9eddf 100644 (file)
@@ -3376,7 +3376,7 @@ enable?(WEB_AUDIO) {
         Modules/webaudio/WaveShaperDSPKernel.h \
         Modules/webaudio/WaveShaperNode.h \
         Modules/webaudio/WaveShaperProcessor.h \
-        Modules/webaudio/WaveTable.h \
+        Modules/webaudio/PeriodicWave.h \
         platform/audio/AudioArray.h \
         platform/audio/AudioBus.h \
         platform/audio/AudioChannel.h \
@@ -3466,7 +3466,7 @@ enable?(WEB_AUDIO) {
         Modules/webaudio/WaveShaperDSPKernel.cpp \
         Modules/webaudio/WaveShaperNode.cpp \
         Modules/webaudio/WaveShaperProcessor.cpp \
-        Modules/webaudio/WaveTable.cpp \
+        Modules/webaudio/PeriodicWave.cpp \
         platform/audio/AudioBus.cpp \
         platform/audio/AudioChannel.cpp \
         platform/audio/AudioDSPKernelProcessor.cpp \
index bfd2b8c..aaa131c 100644 (file)
                FD5686CC13AC181400B69C68 /* AudioBufferCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5686CB13AC181400B69C68 /* AudioBufferCallback.h */; };
                FD581FAE1520F91F003A7A75 /* OscillatorNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD581FAB1520F91F003A7A75 /* OscillatorNode.cpp */; };
                FD581FAF1520F91F003A7A75 /* OscillatorNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD581FAC1520F91F003A7A75 /* OscillatorNode.h */; };
-               FD581FB41520F93B003A7A75 /* WaveTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD581FB11520F93B003A7A75 /* WaveTable.cpp */; };
-               FD581FB51520F93B003A7A75 /* WaveTable.h in Headers */ = {isa = PBXBuildFile; fileRef = FD581FB21520F93B003A7A75 /* WaveTable.h */; };
+               FD581FB41520F93B003A7A75 /* PeriodicWave.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD581FB11520F93B003A7A75 /* PeriodicWave.cpp */; };
+               FD581FB51520F93B003A7A75 /* PeriodicWave.h in Headers */ = {isa = PBXBuildFile; fileRef = FD581FB21520F93B003A7A75 /* PeriodicWave.h */; };
                FD629EA3154B47160006D026 /* AudioBasicInspectorNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD629EA1154B47160006D026 /* AudioBasicInspectorNode.h */; };
                FD629EA4154B47160006D026 /* AudioBasicInspectorNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD629EA2154B47160006D026 /* AudioBasicInspectorNode.cpp */; };
                FD62F52E145898D80094B0ED /* AudioSourceProviderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = FD62F52D145898D80094B0ED /* AudioSourceProviderClient.h */; };
                FDE2D55B159E66EB00DCCCF8 /* AudioIOCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FDE2D55A159E66EB00DCCCF8 /* AudioIOCallback.h */; };
                FDEA6242152102E200479DF0 /* JSOscillatorNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEA6240152102E200479DF0 /* JSOscillatorNode.cpp */; };
                FDEA6243152102E200479DF0 /* JSOscillatorNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDEA6241152102E200479DF0 /* JSOscillatorNode.h */; };
-               FDEA6246152102FC00479DF0 /* JSWaveTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEA6244152102FC00479DF0 /* JSWaveTable.cpp */; };
-               FDEA6247152102FC00479DF0 /* JSWaveTable.h in Headers */ = {isa = PBXBuildFile; fileRef = FDEA6245152102FC00479DF0 /* JSWaveTable.h */; };
+               FDEA6246152102FC00479DF0 /* JSPeriodicWave.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEA6244152102FC00479DF0 /* JSPeriodicWave.cpp */; };
+               FDEA6247152102FC00479DF0 /* JSPeriodicWave.h in Headers */ = {isa = PBXBuildFile; fileRef = FDEA6245152102FC00479DF0 /* JSPeriodicWave.h */; };
                FDEAAAF312B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAEF12B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp */; };
                FDEAAAF412B02EE400DCF33B /* JSAudioContextCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */; };
                FDF09DC81399B62200688E5B /* JSBiquadFilterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDF09DC61399B62200688E5B /* JSBiquadFilterNode.cpp */; };
                FD581FAB1520F91F003A7A75 /* OscillatorNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OscillatorNode.cpp; sourceTree = "<group>"; };
                FD581FAC1520F91F003A7A75 /* OscillatorNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OscillatorNode.h; sourceTree = "<group>"; };
                FD581FAD1520F91F003A7A75 /* OscillatorNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = OscillatorNode.idl; sourceTree = "<group>"; };
-               FD581FB11520F93B003A7A75 /* WaveTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WaveTable.cpp; sourceTree = "<group>"; };
-               FD581FB21520F93B003A7A75 /* WaveTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveTable.h; sourceTree = "<group>"; };
-               FD581FB31520F93B003A7A75 /* WaveTable.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WaveTable.idl; sourceTree = "<group>"; };
+               FD581FB11520F93B003A7A75 /* PeriodicWave.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PeriodicWave.cpp; sourceTree = "<group>"; };
+               FD581FB21520F93B003A7A75 /* PeriodicWave.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PeriodicWave.h; sourceTree = "<group>"; };
+               FD581FB31520F93B003A7A75 /* PeriodicWave.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PeriodicWave.idl; sourceTree = "<group>"; };
                FD629EA1154B47160006D026 /* AudioBasicInspectorNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioBasicInspectorNode.h; sourceTree = "<group>"; };
                FD629EA2154B47160006D026 /* AudioBasicInspectorNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioBasicInspectorNode.cpp; sourceTree = "<group>"; };
                FD62F52D145898D80094B0ED /* AudioSourceProviderClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSourceProviderClient.h; sourceTree = "<group>"; };
                FDE2D55A159E66EB00DCCCF8 /* AudioIOCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioIOCallback.h; sourceTree = "<group>"; };
                FDEA6240152102E200479DF0 /* JSOscillatorNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOscillatorNode.cpp; sourceTree = "<group>"; };
                FDEA6241152102E200479DF0 /* JSOscillatorNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOscillatorNode.h; sourceTree = "<group>"; };
-               FDEA6244152102FC00479DF0 /* JSWaveTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWaveTable.cpp; sourceTree = "<group>"; };
-               FDEA6245152102FC00479DF0 /* JSWaveTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWaveTable.h; sourceTree = "<group>"; };
+               FDEA6244152102FC00479DF0 /* JSPeriodicWave.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPeriodicWave.cpp; sourceTree = "<group>"; };
+               FDEA6245152102FC00479DF0 /* JSPeriodicWave.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPeriodicWave.h; sourceTree = "<group>"; };
                FDEAAAEF12B02EE400DCF33B /* JSAudioBufferSourceNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferSourceNodeCustom.cpp; sourceTree = "<group>"; };
                FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioContextCustom.cpp; sourceTree = "<group>"; };
                FDF09DC61399B62200688E5B /* JSBiquadFilterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBiquadFilterNode.cpp; sourceTree = "<group>"; };
                                FD7F298E13D4C0CB00AD9535 /* WaveShaperNode.idl */,
                                FD7F298F13D4C0CB00AD9535 /* WaveShaperProcessor.cpp */,
                                FD7F299013D4C0CB00AD9535 /* WaveShaperProcessor.h */,
-                               FD581FB11520F93B003A7A75 /* WaveTable.cpp */,
-                               FD581FB21520F93B003A7A75 /* WaveTable.h */,
-                               FD581FB31520F93B003A7A75 /* WaveTable.idl */,
+                               FD581FB11520F93B003A7A75 /* PeriodicWave.cpp */,
+                               FD581FB21520F93B003A7A75 /* PeriodicWave.h */,
+                               FD581FB31520F93B003A7A75 /* PeriodicWave.idl */,
                        );
                        name = webaudio;
                        path = Modules/webaudio;
                                FDA15ECC12B03F61003A583A /* JSScriptProcessorNode.h */,
                                FD82D7F513D4C8BD004E4372 /* JSWaveShaperNode.cpp */,
                                FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */,
-                               FDEA6244152102FC00479DF0 /* JSWaveTable.cpp */,
-                               FDEA6245152102FC00479DF0 /* JSWaveTable.h */,
+                               FDEA6244152102FC00479DF0 /* JSPeriodicWave.cpp */,
+                               FDEA6245152102FC00479DF0 /* JSPeriodicWave.h */,
                        );
                        name = WebAudio;
                        sourceTree = "<group>";
                                BE8EF04B171C9014009B48C3 /* JSVideoTrack.h in Headers */,
                                BE8EF04D171C9014009B48C3 /* JSVideoTrackList.h in Headers */,
                                FD82D7F813D4C8BD004E4372 /* JSWaveShaperNode.h in Headers */,
-                               FDEA6247152102FC00479DF0 /* JSWaveTable.h in Headers */,
+                               FDEA6247152102FC00479DF0 /* JSPeriodicWave.h in Headers */,
                                A7D20F63107F406900A80392 /* JSWebGLActiveInfo.h in Headers */,
                                49C7B9941042D2D30009D447 /* JSWebGLBuffer.h in Headers */,
                                7EA30F6A16DFFE7500257D0B /* JSWebGLCompressedTextureATC.h in Headers */,
                                FD7F299213D4C0CB00AD9535 /* WaveShaperDSPKernel.h in Headers */,
                                FD7F299413D4C0CB00AD9535 /* WaveShaperNode.h in Headers */,
                                FD7F299713D4C0CB00AD9535 /* WaveShaperProcessor.h in Headers */,
-                               FD581FB51520F93B003A7A75 /* WaveTable.h in Headers */,
+                               FD581FB51520F93B003A7A75 /* PeriodicWave.h in Headers */,
                                29A812490FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.h in Headers */,
                                AAA728F716D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.h in Headers */,
                                AA478A7F16CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.h in Headers */,
                                BE6DF70D171CA2C500DD52B8 /* JSVideoTrackListCustom.cpp in Sources */,
                                9703E1BF15DC4E37001F24C8 /* JSVoidCallback.cpp in Sources */,
                                FD82D7F713D4C8BD004E4372 /* JSWaveShaperNode.cpp in Sources */,
-                               FDEA6246152102FC00479DF0 /* JSWaveTable.cpp in Sources */,
+                               FDEA6246152102FC00479DF0 /* JSPeriodicWave.cpp in Sources */,
                                A7D20F62107F406900A80392 /* JSWebGLActiveInfo.cpp in Sources */,
                                49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */,
                                7EA30F6916DFFE7500257D0B /* JSWebGLCompressedTextureATC.cpp in Sources */,
                                FD7F299113D4C0CB00AD9535 /* WaveShaperDSPKernel.cpp in Sources */,
                                FD7F299313D4C0CB00AD9535 /* WaveShaperNode.cpp in Sources */,
                                FD7F299613D4C0CB00AD9535 /* WaveShaperProcessor.cpp in Sources */,
-                               FD581FB41520F93B003A7A75 /* WaveTable.cpp in Sources */,
+                               FD581FB41520F93B003A7A75 /* PeriodicWave.cpp in Sources */,
                                29A8124A0FBB9CA900510293 /* WebAccessibilityObjectWrapperBase.mm in Sources */,
                                AAA728F816D1D8BC00D3BBC6 /* WebAccessibilityObjectWrapperIOS.mm in Sources */,
                                AA478A8016CD70C3007D1BB4 /* WebAccessibilityObjectWrapperMac.mm in Sources */,
index a6dfb19..c87d6d6 100644 (file)
@@ -1,3 +1,12 @@
+2013-06-24  Chris Rogers  <crogers@google.com>
+
+        WaveTable name has changed to PeriodicWave
+        https://bugs.webkit.org/show_bug.cgi?id=117748
+
+        Reviewed by Jer Noble.
+
+        * Scripts/do-webcore-rename:
+
 2013-06-22  Santosh Mahto  <santosh.ma@samsung.com>
 
         [EFL] Add support for MHTML save/load feature to MiniBrowser
index cd3cdee..281f7ba 100755 (executable)
@@ -96,13 +96,7 @@ sub wanted
 my $isDOMTypeRename = 1;
 my %renames = (
     # Renames go here in the form of:
-    "JavaScriptAudioNode" => "ScriptProcessorNode",
-    "RealtimeAnalyserNode" => "AnalyserNode",
-    "AudioGainNode" => "GainNode",
-    "AudioPannerNode" => "PannerNode",
-    "AudioChannelSplitter" => "ChannelSplitterNode",
-    "AudioChannelMerger" => "ChannelMergerNode",
-    "Oscillator" => "OscillatorNode",
+    "WaveTable" => "PeriodicWave",
 );
 
 my %renamesContemplatedForTheFuture = (