Remove support for ENABLE_LEGACY_WEB_AUDIO
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Aug 2016 02:01:11 +0000 (02:01 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 Aug 2016 02:01:11 +0000 (02:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161262

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
Remove ENABLE_LEGACY_WEB_AUDIO

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
Remove ENABLE_LEGACY_WEB_AUDIO.

* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::noteGrainOn): Deleted.
* Modules/webaudio/AudioBufferSourceNode.h:
* Modules/webaudio/AudioBufferSourceNode.idl:
(WebCore::AudioScheduledSourceNode::noteOn): Deleted.
(WebCore::AudioScheduledSourceNode::noteOff): Deleted.
* Modules/webaudio/AudioScheduledSourceNode.h:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
Remove the looping attribute, as well as the noteOn, noteOff, and noteGrainOn functions.

* Modules/webaudio/AudioContext.idl:
Remove the createGainNode, createDelayNode and createJavaScriptNode functions.

* Modules/webaudio/AudioParam.idl:
Remove the setTargetValueAtTime function.

* Modules/webaudio/BiquadDSPKernel.cpp:
(WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
* Modules/webaudio/BiquadFilterNode.cpp:
(WebCore::BiquadFilterNode::type):
(WebCore::BiquadFilterNode::setType):
(WebCore::BiquadFilterNode::getFrequencyResponse):
* Modules/webaudio/BiquadFilterNode.h:
* Modules/webaudio/BiquadFilterNode.idl:
* Modules/webaudio/BiquadProcessor.cpp:
(WebCore::BiquadProcessor::BiquadProcessor):
(WebCore::BiquadProcessor::setType):
(WebCore::BiquadProcessor::getFrequencyResponse):
* Modules/webaudio/BiquadProcessor.h:
(WebCore::BiquadProcessor::type):
* bindings/js/JSBiquadFilterNodeCustom.cpp: Removed.
Rename BiquadProcessor::FilterType to BiquadFilterType and use it
directly from the IDL. Remove legacy filter constants from the IDL
and the need for a custom binding for the type attribute.

* Modules/webaudio/OscillatorNode.cpp:
(WebCore::OscillatorNode::OscillatorNode):
(WebCore::OscillatorNode::setType):
(WebCore::OscillatorNode::setPeriodicWave):
(WebCore::OscillatorNode::type): Deleted.
* Modules/webaudio/OscillatorNode.h:
(WebCore::OscillatorNode::type):
* Modules/webaudio/OscillatorNode.idl:
* Modules/webaudio/PeriodicWave.cpp:
(WebCore::PeriodicWave::createSine):
(WebCore::PeriodicWave::createSquare):
(WebCore::PeriodicWave::createSawtooth):
(WebCore::PeriodicWave::createTriangle):
(WebCore::PeriodicWave::generateBasicWaveform):
* Modules/webaudio/PeriodicWave.h:
* bindings/js/JSOscillatorNodeCustom.cpp: Removed.
Remove noteOn and noteOff functions and the type integer constants.
Remove the need for a custom binding for the type attribute by renaming
the type enum OscillatorNode::Type and putting the enum in the IDL.

* Modules/webaudio/PannerNode.cpp:
(WebCore::PannerNode::PannerNode):
(WebCore::PannerNode::process):
(WebCore::PannerNode::setPanningModel):
(WebCore::PannerNode::distanceModel):
(WebCore::PannerNode::setDistanceModel):
(WebCore::PannerNode::panningModel): Deleted.
* Modules/webaudio/PannerNode.h:
(WebCore::PannerNode::panningModel):
* Modules/webaudio/PannerNode.idl:
* bindings/js/JSPannerNodeCustom.cpp: Removed.
* platform/audio/Distance.cpp:
(WebCore::DistanceEffect::DistanceEffect):
(WebCore::DistanceEffect::gain):
* platform/audio/Distance.h:
(WebCore::DistanceEffect::model):
(WebCore::DistanceEffect::setModel):
* platform/audio/EqualPowerPanner.cpp:
(WebCore::EqualPowerPanner::EqualPowerPanner):
* platform/audio/HRTFPanner.cpp:
(WebCore::HRTFPanner::HRTFPanner):
* platform/audio/Panner.cpp:
(WebCore::Panner::create):
* platform/audio/Panner.h:
(WebCore::Panner::panningModel):
(WebCore::Panner::Panner):
Replace the panning model and distance model integer constants
with IDL enum support, removing the need for a custom binding.
Rename the supporting C++ enums to work with the bindings.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::constructJSAudioContext):
Remove deprecated way of creating an offline context.

* WebCore.xcodeproj/project.pbxproj:
Update files.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
Remove ENABLE_LEGACY_WEB_AUDIO

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
Remove ENABLE_LEGACY_WEB_AUDIO.

Tools:

* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

LayoutTests:

* webaudio/audiobuffersource-loop-points.html:
* webaudio/audiobuffersource-multi-channels.html:
* webaudio/audiobuffersource-playbackState-expected.txt:
* webaudio/audiobuffersource-playbackState.html:
* webaudio/audiobuffersource-playbackrate.html:
* webaudio/audiochannelmerger-stereo.html:
* webaudio/audiochannelsplitter.html:
* webaudio/audionode-connect-order.html:
* webaudio/audionode-expected.txt:
* webaudio/audionode.html:
* webaudio/audioparam-connect-audioratesignal.html:
* webaudio/audioparam-summingjunction.html:
* webaudio/audioprocessingevent.html:
* webaudio/automatic-pull-node.html:
* webaudio/biquad-allpass.html:
* webaudio/biquad-bandpass.html:
* webaudio/biquad-getFrequencyResponse.html:
* webaudio/biquad-highpass.html:
* webaudio/biquad-highshelf.html:
* webaudio/biquad-lowpass.html:
* webaudio/biquad-lowshelf.html:
* webaudio/biquad-notch.html:
* webaudio/biquad-peaking.html:
* webaudio/biquadfilternode-basic-expected.txt:
* webaudio/biquadfilternode-basic.html:
* webaudio/convolution-mono-mono.html:
* webaudio/delaynode-max-default-delay.html:
* webaudio/delaynode-max-nondefault-delay.html:
* webaudio/delaynode-maxdelay.html:
* webaudio/delaynode-scheduling.html:
* webaudio/delaynode.html:
* webaudio/distance-exponential-expected.txt:
* webaudio/distance-exponential.html:
* webaudio/distance-inverse-expected.txt:
* webaudio/distance-inverse.html:
* webaudio/distance-linear-expected.txt:
* webaudio/distance-linear.html:
* webaudio/gain-basic.html:
* webaudio/gain.html:
* webaudio/javascriptaudionode-zero-input-channels.html:
* webaudio/javascriptaudionode.html:
* webaudio/mixing.html:
* webaudio/note-grain-on-play-expected.txt: Removed.
* webaudio/note-grain-on-play.html: Removed.
* webaudio/note-grain-on-timing-expected.txt: Removed.
* webaudio/note-grain-on-timing.html: Removed.
* webaudio/oscillator-basic-expected.txt:
* webaudio/oscillator-basic.html:
* webaudio/oscillator-custom.html:
* webaudio/oscillator-sawtooth.html:
* webaudio/oscillator-sine.html:
* webaudio/oscillator-square.html:
* webaudio/oscillator-triangle.html:
* webaudio/pannernode-basic-expected.txt:
* webaudio/pannernode-basic.html:
* webaudio/resources/audio-testing.js:
* webaudio/resources/audioparam-testing.js:
* webaudio/resources/biquad-testing.js:
* webaudio/resources/distance-model-testing.js:
* webaudio/resources/javascriptaudionode-testing.js:
* webaudio/resources/oscillator-testing.js:
* webaudio/resources/panner-model-testing.js:
* webaudio/sample-accurate-scheduling.html:
* webaudio/stereo2mono-down-mixing.html:
* webaudio/up-mixing-mono-51.html:
* webaudio/up-mixing-mono-stereo.html:
* webaudio/up-mixing-stereo-51.html:
* webaudio/waveshaper.html:
Update tests for removal of ENABLE_LEGACY_WEB_AUDIO.

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

115 files changed:
LayoutTests/ChangeLog
LayoutTests/webaudio/audiobuffersource-loop-points.html
LayoutTests/webaudio/audiobuffersource-multi-channels.html
LayoutTests/webaudio/audiobuffersource-playbackState-expected.txt
LayoutTests/webaudio/audiobuffersource-playbackState.html
LayoutTests/webaudio/audiobuffersource-playbackrate.html
LayoutTests/webaudio/audiochannelmerger-stereo.html
LayoutTests/webaudio/audiochannelsplitter.html
LayoutTests/webaudio/audionode-connect-order.html
LayoutTests/webaudio/audionode-expected.txt
LayoutTests/webaudio/audionode.html
LayoutTests/webaudio/audioparam-connect-audioratesignal.html
LayoutTests/webaudio/audioparam-summingjunction.html
LayoutTests/webaudio/audioprocessingevent.html
LayoutTests/webaudio/automatic-pull-node.html
LayoutTests/webaudio/biquad-allpass.html
LayoutTests/webaudio/biquad-bandpass.html
LayoutTests/webaudio/biquad-getFrequencyResponse.html
LayoutTests/webaudio/biquad-highpass.html
LayoutTests/webaudio/biquad-highshelf.html
LayoutTests/webaudio/biquad-lowpass.html
LayoutTests/webaudio/biquad-lowshelf.html
LayoutTests/webaudio/biquad-notch.html
LayoutTests/webaudio/biquad-peaking.html
LayoutTests/webaudio/biquadfilternode-basic-expected.txt
LayoutTests/webaudio/biquadfilternode-basic.html
LayoutTests/webaudio/convolution-mono-mono.html
LayoutTests/webaudio/delaynode-max-default-delay.html
LayoutTests/webaudio/delaynode-max-nondefault-delay.html
LayoutTests/webaudio/delaynode-maxdelay.html
LayoutTests/webaudio/delaynode-scheduling.html
LayoutTests/webaudio/delaynode.html
LayoutTests/webaudio/distance-exponential-expected.txt
LayoutTests/webaudio/distance-exponential.html
LayoutTests/webaudio/distance-inverse-expected.txt
LayoutTests/webaudio/distance-inverse.html
LayoutTests/webaudio/distance-linear-expected.txt
LayoutTests/webaudio/distance-linear.html
LayoutTests/webaudio/gain-basic.html
LayoutTests/webaudio/gain.html
LayoutTests/webaudio/javascriptaudionode-zero-input-channels.html
LayoutTests/webaudio/javascriptaudionode.html
LayoutTests/webaudio/mixing.html
LayoutTests/webaudio/note-grain-on-play-expected.txt [deleted file]
LayoutTests/webaudio/note-grain-on-play.html [deleted file]
LayoutTests/webaudio/note-grain-on-timing-expected.txt [deleted file]
LayoutTests/webaudio/note-grain-on-timing.html [deleted file]
LayoutTests/webaudio/oscillator-basic-expected.txt
LayoutTests/webaudio/oscillator-basic.html
LayoutTests/webaudio/oscillator-custom.html
LayoutTests/webaudio/oscillator-sawtooth.html
LayoutTests/webaudio/oscillator-sine.html
LayoutTests/webaudio/oscillator-square.html
LayoutTests/webaudio/oscillator-triangle.html
LayoutTests/webaudio/pannernode-basic-expected.txt
LayoutTests/webaudio/pannernode-basic.html
LayoutTests/webaudio/resources/audio-testing.js
LayoutTests/webaudio/resources/audioparam-testing.js
LayoutTests/webaudio/resources/biquad-testing.js
LayoutTests/webaudio/resources/distance-model-testing.js
LayoutTests/webaudio/resources/javascriptaudionode-testing.js
LayoutTests/webaudio/resources/oscillator-testing.js
LayoutTests/webaudio/resources/panner-model-testing.js
LayoutTests/webaudio/sample-accurate-scheduling.html
LayoutTests/webaudio/stereo2mono-down-mixing.html
LayoutTests/webaudio/up-mixing-mono-51.html
LayoutTests/webaudio/up-mixing-mono-stereo.html
LayoutTests/webaudio/up-mixing-stereo-51.html
LayoutTests/webaudio/waveshaper.html
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.h
Source/WebCore/Modules/webaudio/AudioBufferSourceNode.idl
Source/WebCore/Modules/webaudio/AudioContext.idl
Source/WebCore/Modules/webaudio/AudioParam.idl
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp
Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.h
Source/WebCore/Modules/webaudio/BiquadDSPKernel.cpp
Source/WebCore/Modules/webaudio/BiquadFilterNode.cpp
Source/WebCore/Modules/webaudio/BiquadFilterNode.h
Source/WebCore/Modules/webaudio/BiquadFilterNode.idl
Source/WebCore/Modules/webaudio/BiquadProcessor.cpp
Source/WebCore/Modules/webaudio/BiquadProcessor.h
Source/WebCore/Modules/webaudio/OscillatorNode.cpp
Source/WebCore/Modules/webaudio/OscillatorNode.h
Source/WebCore/Modules/webaudio/OscillatorNode.idl
Source/WebCore/Modules/webaudio/PannerNode.cpp
Source/WebCore/Modules/webaudio/PannerNode.h
Source/WebCore/Modules/webaudio/PannerNode.idl
Source/WebCore/Modules/webaudio/PeriodicWave.cpp
Source/WebCore/Modules/webaudio/PeriodicWave.h
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSAudioContextCustom.cpp
Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp [deleted file]
Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp [deleted file]
Source/WebCore/bindings/js/JSPannerNodeCustom.cpp [deleted file]
Source/WebCore/platform/audio/Distance.cpp
Source/WebCore/platform/audio/Distance.h
Source/WebCore/platform/audio/EqualPowerPanner.cpp
Source/WebCore/platform/audio/HRTFPanner.cpp
Source/WebCore/platform/audio/Panner.cpp
Source/WebCore/platform/audio/Panner.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsMac.cmake
Source/cmake/WebKitFeatures.cmake
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig

index 6cad451..872478c 100644 (file)
@@ -1,3 +1,80 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * webaudio/audiobuffersource-loop-points.html:
+        * webaudio/audiobuffersource-multi-channels.html:
+        * webaudio/audiobuffersource-playbackState-expected.txt:
+        * webaudio/audiobuffersource-playbackState.html:
+        * webaudio/audiobuffersource-playbackrate.html:
+        * webaudio/audiochannelmerger-stereo.html:
+        * webaudio/audiochannelsplitter.html:
+        * webaudio/audionode-connect-order.html:
+        * webaudio/audionode-expected.txt:
+        * webaudio/audionode.html:
+        * webaudio/audioparam-connect-audioratesignal.html:
+        * webaudio/audioparam-summingjunction.html:
+        * webaudio/audioprocessingevent.html:
+        * webaudio/automatic-pull-node.html:
+        * webaudio/biquad-allpass.html:
+        * webaudio/biquad-bandpass.html:
+        * webaudio/biquad-getFrequencyResponse.html:
+        * webaudio/biquad-highpass.html:
+        * webaudio/biquad-highshelf.html:
+        * webaudio/biquad-lowpass.html:
+        * webaudio/biquad-lowshelf.html:
+        * webaudio/biquad-notch.html:
+        * webaudio/biquad-peaking.html:
+        * webaudio/biquadfilternode-basic-expected.txt:
+        * webaudio/biquadfilternode-basic.html:
+        * webaudio/convolution-mono-mono.html:
+        * webaudio/delaynode-max-default-delay.html:
+        * webaudio/delaynode-max-nondefault-delay.html:
+        * webaudio/delaynode-maxdelay.html:
+        * webaudio/delaynode-scheduling.html:
+        * webaudio/delaynode.html:
+        * webaudio/distance-exponential-expected.txt:
+        * webaudio/distance-exponential.html:
+        * webaudio/distance-inverse-expected.txt:
+        * webaudio/distance-inverse.html:
+        * webaudio/distance-linear-expected.txt:
+        * webaudio/distance-linear.html:
+        * webaudio/gain-basic.html:
+        * webaudio/gain.html:
+        * webaudio/javascriptaudionode-zero-input-channels.html:
+        * webaudio/javascriptaudionode.html:
+        * webaudio/mixing.html:
+        * webaudio/note-grain-on-play-expected.txt: Removed.
+        * webaudio/note-grain-on-play.html: Removed.
+        * webaudio/note-grain-on-timing-expected.txt: Removed.
+        * webaudio/note-grain-on-timing.html: Removed.
+        * webaudio/oscillator-basic-expected.txt:
+        * webaudio/oscillator-basic.html:
+        * webaudio/oscillator-custom.html:
+        * webaudio/oscillator-sawtooth.html:
+        * webaudio/oscillator-sine.html:
+        * webaudio/oscillator-square.html:
+        * webaudio/oscillator-triangle.html:
+        * webaudio/pannernode-basic-expected.txt:
+        * webaudio/pannernode-basic.html:
+        * webaudio/resources/audio-testing.js:
+        * webaudio/resources/audioparam-testing.js:
+        * webaudio/resources/biquad-testing.js:
+        * webaudio/resources/distance-model-testing.js:
+        * webaudio/resources/javascriptaudionode-testing.js:
+        * webaudio/resources/oscillator-testing.js:
+        * webaudio/resources/panner-model-testing.js:
+        * webaudio/sample-accurate-scheduling.html:
+        * webaudio/stereo2mono-down-mixing.html:
+        * webaudio/up-mixing-mono-51.html:
+        * webaudio/up-mixing-mono-stereo.html:
+        * webaudio/up-mixing-stereo-51.html:
+        * webaudio/waveshaper.html:
+        Update tests for removal of ENABLE_LEGACY_WEB_AUDIO.
+
 2016-08-23  Ryosuke Niwa  <rniwa@webkit.org>
 
         Adopted custom element's callbacks should continue to work
index 5601d02..197d5cf 100644 (file)
@@ -55,7 +55,7 @@ function playNote(time, duration, playbackRate) {
     source.buffer = buffer;
     source.playbackRate.value = playbackRate;
 
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
     source.connect(gainNode);
     gainNode.connect(context.destination);
 
index 7b853f7..4b66cff 100644 (file)
@@ -30,7 +30,7 @@ function runTest() {
     source.buffer = toneBuffer;
 
     source.connect(context.destination);
-    source.noteOn(0);
+    source.start(0);
 
     context.oncomplete = finishAudioTest;
     context.startRendering();
index 31ae376..95c964c 100644 (file)
@@ -7,12 +7,9 @@ PASS UNSCHEDULED_STATE Source has been created
 PASS SCHEDULED_STATE   3 second source scheduled to start at time 3
 PASS PLAYING_STATE     2 second source starting at time 1
 PASS FINISHED_STATE    1.25 second source starting at time 0
-PASS SCHEDULED_STATE   1 second grain scheduled to start at time 3
-PASS PLAYING_STATE     2 second grain starting at time 0.5
-PASS FINISHED_STATE    1 second grain starting at time 0.5
 PASS SCHEDULED_STATE   a looping 0.5 second source scheduled at time 3
 PASS PLAYING_STATE     a looping 0.5 second source starting at time 1.25
-PASS 3 are currently playing as expected.
+PASS 2 are currently playing as expected.
 PASS activeSourceCount and playbackState tests succeeded.
 PASS successfullyParsed is true
 
index d6e62c0..a8d5483 100644 (file)
@@ -121,49 +121,32 @@ function runTest()
                bufferSource.UNSCHEDULED_STATE,
                "Source has been created");
 
-    // Test noteOn.
+    // Test start.
 
     createTest(3,
-               function(s) { s.noteOn(renderTime + 1); },
+               function(s) { s.start(renderTime + 1); },
                bufferSource.SCHEDULED_STATE,
                "3 second source scheduled to start at time " + (renderTime + 1));
 
     createTest(2,
-               function(s) { s.noteOn(1); },
+               function(s) { s.start(1); },
                bufferSource.PLAYING_STATE,
                "2 second source starting at time 1");
       
     createTest(1.25,
-               function(s) { s.noteOn(0); },
+               function(s) { s.start(0); },
                bufferSource.FINISHED_STATE,
                "1.25 second source starting at time 0");
 
-    // Test noteGrainOn.
-
-    createTest(3,
-               function(s) { s.noteGrainOn(renderTime + 1, 0, 1); },
-               bufferSource.SCHEDULED_STATE,
-               "1 second grain scheduled to start at time " + (renderTime + 1));
-  
-    createTest(3,
-               function(s) { s.noteGrainOn(0.5, 0, 2); },
-               bufferSource.PLAYING_STATE,
-               "2 second grain starting at time 0.5");
-      
-    createTest(3,
-               function(s) { s.noteGrainOn(0.5, 0, 1); },
-               bufferSource.FINISHED_STATE,
-               "1 second grain starting at time 0.5");
-
     // Test looping source
 
     createTest(0.5,
-               function(s) { s.loop = true; s.noteOn(renderTime + 1); },
+               function(s) { s.loop = true; s.start(renderTime + 1); },
                bufferSource.SCHEDULED_STATE,
                "a looping 0.5 second source scheduled at time " + (renderTime + 1));
 
     createTest(0.5,
-               function(s) { s.loop = true; s.noteOn(1.25); },
+               function(s) { s.loop = true; s.start(1.25); },
                bufferSource.PLAYING_STATE,
                "a looping 0.5 second source starting at time 1.25");
 
index 2caa0fb..e9bb90d 100644 (file)
@@ -49,7 +49,7 @@ function playNote(time, duration, playbackRate) {
     source.buffer = sinWaveBuffer;
     source.playbackRate.value = playbackRate;
     
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
     source.connect(gainNode);
     gainNode.connect(context.destination);
 
index fb3ef4c..a7c184f 100644 (file)
@@ -99,8 +99,8 @@ function runTest() {
     channelMerger.connect(context.destination);
 
     // Trigger both sources to start at the beginning.
-    bufferSource1.noteOn(0);
-    bufferSource2.noteOn(0);
+    bufferSource1.start(0);
+    bufferSource2.start(0);
     
     context.oncomplete = checkResult;
     context.startRendering();
index 6b8d9b8..10f2793 100644 (file)
@@ -153,7 +153,7 @@ function runTest() {
     channelSplitter.connect(channelMerger, 0, 1);
     channelSplitter.connect(channelMerger, 1, 0);
 
-    sourceNode.noteOn(0);
+    sourceNode.start(0);
 
     context.oncomplete = checkResult;
     context.startRendering();
index a1ff9a3..1fb9be4 100644 (file)
@@ -47,18 +47,18 @@ function runTest() {
     bufferSource.buffer = toneBuffer;
     bufferSource.connect(context.destination);
 
-    var delay = context.createDelayNode();
+    var delay = context.createDelay();
     delay.delayTime.value = delayTimeSeconds;
 
     // We connect delay node to gain node before anything is connected to delay node itself.
     // We do this because we try to trigger the ASSERT which might be fired due to AudioNode connection order,
     // especially when gain node and delay node is involved e.g. https://bugs.webkit.org/show_bug.cgi?id=76685.
 
-    var gain = context.createGainNode();
+    var gain = context.createGain();
     gain.connect(context.destination);
     delay.connect(gain);
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
 
     context.oncomplete = finishJSTest;
     context.startRendering();
index fdcd4b8..6c3cd2d 100644 (file)
@@ -1,11 +1,7 @@
-CONSOLE MESSAGE: line 98: Deprecated AudioContext constructor: use OfflineAudioContext instead
 Basic tests for AudioNode API.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS audioNode.noteOn() threw exception TypeError: Not enough arguments.
-PASS audioNode.noteGrainOn() threw exception TypeError: Not enough arguments.
-PASS audioNode.noteOff() threw exception TypeError: Not enough arguments.
 PASS Source AudioNode has no inputs.
 PASS Source AudioNode has one output.
 PASS Destination AudioNode has one input.
@@ -15,7 +11,7 @@ PASS connect() exception thrown for illegal output index.
 PASS connect() exception thrown for illegal input index.
 PASS audioNode.connect(context.destination) succeeded.
 PASS exception thrown when connecting to other context's node.
-PASS exception thrown when creating audio context with not enough arguments.
+PASS exception thrown when creating audio context with too many arguments.
 PASS AudioNode is an EventTarget
 PASS successfullyParsed is true
 
index 157ec03..cefc11a 100644 (file)
@@ -27,10 +27,6 @@ function runTest() {
     context = new webkitAudioContext();
     window.audioNode = context.createBufferSource();
 
-    shouldThrow("audioNode.noteOn()");
-    shouldThrow("audioNode.noteGrainOn()");
-    shouldThrow("audioNode.noteOff()");
-
     // Check input and output numbers of AudioSourceNode.
     if (audioNode.numberOfInputs === 0)
         testPassed("Source AudioNode has no inputs.");
@@ -93,12 +89,12 @@ function runTest() {
         testPassed("exception thrown when connecting to other context's node.");
     }
 
-    // Create a new context with not enough arguments
+    // Create a new context with too many arguments
     try {
         context2 = new webkitAudioContext(0, 0);
-        testFailed("exception should be thrown when creating audio context with not enough arguments.");
+        testFailed("exception should be thrown when creating audio context with too many arguments.");
     } catch(e) {
-        testPassed("exception thrown when creating audio context with not enough arguments.");
+        testPassed("exception thrown when creating audio context with too many arguments.");
     }
 
     // Ensure it is an EventTarget
index 0592661..0c57afc 100644 (file)
@@ -85,7 +85,7 @@ function runTest() {
     gainChangingSource.buffer = linearRampBuffer;
 
     // Create a gain node controlling the gain of constantSource and make the connections.
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
 
     // Intrinsic baseline gain of zero.
     gainNode.gain.value = 0;
@@ -98,8 +98,8 @@ function runTest() {
     gainChangingSource.connect(gainNode.gain);
 
     // Start both sources at time 0.
-    constantSource.noteOn(0);
-    gainChangingSource.noteOn(0);
+    constantSource.start(0);
+    gainChangingSource.start(0);
 
     context.oncomplete = checkResult;
     context.startRendering();
index 5e2beaa..b8c053f 100644 (file)
@@ -99,7 +99,7 @@ function runTest() {
     gainSource2.buffer = toneBuffer;
 
     // Create a gain node controlling the gain of constantSource and make the connections.
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
 
     // Intrinsic baseline gain.
     // This gain value should be summed with gainSource1 and gainSource2.
@@ -113,9 +113,9 @@ function runTest() {
     gainSource2.connect(gainNode.gain);
 
     // Start all sources at time 0.
-    constantSource.noteOn(0);
-    gainSource1.noteOn(0);
-    gainSource2.noteOn(0);
+    constantSource.start(0);
+    gainSource1.start(0);
+    gainSource2.start(0);
 
     context.oncomplete = checkResult;
     context.startRendering();
index 98c3116..d4c1b09 100644 (file)
@@ -59,7 +59,7 @@ function runTest() {
     oscillator.connect(scriptProcessorNode);
     scriptProcessorNode.onaudioprocess = processAudioData;
 
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
 
     scriptProcessorNode.connect(gainNode);
     gainNode.connect(context.destination);
index db7a689..81f0502 100644 (file)
@@ -59,7 +59,7 @@ function test1Finished() {
 function test1() {
     constructCommonGraph();
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
 
     context.oncomplete = test1Finished;
     context.startRendering();
@@ -84,7 +84,7 @@ function test2() {
 
     analyser.connect(context.destination);
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
 
     context.oncomplete = test2Finished;
     context.startRendering();
@@ -108,10 +108,10 @@ function test3Finished() {
 function test3() {
     constructCommonGraph();
 
-    var gain = context.createGainNode();
+    var gain = context.createGain();
     analyser.connect(gain);
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
 
     context.oncomplete = test3Finished;
     context.startRendering();
index 6679c35..edca82c 100644 (file)
@@ -34,7 +34,7 @@ function runTest() {
                             {cutoff : .5,   q :  0, gain : 1 },
                             {cutoff : 0.25, q : 10, gain : 1 },
                            ];
-    createTestAndRun(context, f.ALLPASS, filterParameters);
+    createTestAndRun(context, "allpass", filterParameters);
 }
 
 runTest();
index 9a13e9d..cb6d9df 100644 (file)
@@ -36,7 +36,7 @@ function runTest() {
                             {cutoff : 0.25, q : 1, gain : 1 },
                            ];
 
-    createTestAndRun(context, f.BANDPASS, filterParameters);
+    createTestAndRun(context, "bandpass", filterParameters);
 }
 
 runTest();
index 5cf1a5f..1d9ede7 100644 (file)
@@ -107,7 +107,7 @@ function frequencyResponseReference(filter, frequencies)
 {
     var sampleRate = filter.context.sampleRate;
     var normalizedFreq = normalizedFrequency(filter.frequency.value, sampleRate);
-    var filterCoefficients = createFilter(filterTypeIndex[filter.type], normalizedFreq, filter.Q.value, filter.gain.value);
+    var filterCoefficients = createFilter(filter.type, normalizedFreq, filter.Q.value, filter.gain.value);
 
     var magnitudes = [];
     var phases = [];
index 1223062..48398b5 100644 (file)
@@ -35,7 +35,7 @@ function runTest() {
                             {cutoff : 0.25, q : 1, gain : 1 },
                            ];
 
-    createTestAndRun(context, f.HIGHPASS, filterParameters);
+    createTestAndRun(context, "highpass", filterParameters);
 }
 
 runTest();
index 62c1ea5..59e25d8 100644 (file)
@@ -35,7 +35,7 @@ function runTest() {
                             {cutoff : 0.25, q : 10, gain : 10 },
                            ];
 
-    createTestAndRun(context, f.HIGHSHELF, filterParameters);
+    createTestAndRun(context, "highshelf", filterParameters);
 }
 
 runTest();
index 41b50a0..1e3b285 100644 (file)
@@ -36,7 +36,7 @@ function runTest() {
                             {cutoff : 0.25, q : 1, gain : 1, detune : 100 },
                             {cutoff : 0.01, q : 1, gain : 1, detune : -200 },
                            ];
-    createTestAndRun(context, f.LOWPASS, filterParameters);
+    createTestAndRun(context, "lowpass", filterParameters);
 }
 
 runTest();
index cdb10f9..9aeaa55 100644 (file)
@@ -35,7 +35,7 @@ function runTest() {
                             {cutoff : 0.25, q : 10, gain : 10 },
                            ];
 
-    createTestAndRun(context, f.LOWSHELF, filterParameters);
+    createTestAndRun(context, "lowshelf", filterParameters);
 }
 
 runTest();
index 8defa48..e05661d 100644 (file)
@@ -35,7 +35,7 @@ function runTest() {
                             {cutoff : 0.25, q : 10, gain : 1 },
                            ];
 
-    createTestAndRun(context, f.NOTCH, filterParameters);
+    createTestAndRun(context, "notch", filterParameters);
 }
 
 runTest();
index 1f7a361..4b9d2f9 100644 (file)
@@ -36,7 +36,7 @@ function runTest() {
                             {cutoff : 0.25, q : 10, gain : 10 },
                            ];
 
-    createTestAndRun(context, f.PEAKING, filterParameters);
+    createTestAndRun(context, "peaking", filterParameters);
 }
 
 runTest();
index a3e1cae..49ded7b 100644 (file)
@@ -16,17 +16,8 @@ PASS Biquad filter type 'highshelf' is settable.
 PASS Biquad filter type 'peaking' is settable.
 PASS Biquad filter type 'notch' is settable.
 PASS Biquad filter type 'allpass' is settable.
-PASS Biquad filter type 0 is settable using legacy integer value.
-PASS Biquad filter type 1 is settable using legacy integer value.
-PASS Biquad filter type 2 is settable using legacy integer value.
-PASS Biquad filter type 3 is settable using legacy integer value.
-PASS Biquad filter type 4 is settable using legacy integer value.
-PASS Biquad filter type 5 is settable using legacy integer value.
-PASS Biquad filter type 6 is settable using legacy integer value.
-PASS Biquad filter type 7 is settable using legacy integer value.
-PASS Illegal filter type correctly throws exception.
-PASS Setting .type to illegal string value threw TypeError.
-PASS Setting .type to illegal type of Float32Array threw TypeError.
+PASS Setting .type to illegal string value did not throw an exception.
+PASS Setting .type to illegal type did not throw an exception.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 804ad25..6a35539 100644 (file)
@@ -56,14 +56,14 @@ function runTest() {
         testFailed("The default value of gain should be 0.");
 
     // Check that all legal filter types can be set.
-    var filterTypeArray = [{type: "lowpass", integerType: filter.LOWPASS},
-                           {type: "highpass", integerType: filter.HIGHPASS},
-                           {type: "bandpass", integerType: filter.BANDPASS},
-                           {type: "lowshelf", integerType: filter.LOWSHELF},
-                           {type: "highshelf", integerType: filter.HIGHSHELF},
-                           {type: "peaking", integerType: filter.PEAKING},
-                           {type: "notch", integerType: filter.NOTCH},
-                           {type: "allpass", integerType: filter.ALLPASS}];
+    var filterTypeArray = [{type: "lowpass"},
+                           {type: "highpass"},
+                           {type: "bandpass"},
+                           {type: "lowshelf"},
+                           {type: "highshelf"},
+                           {type: "peaking"},
+                           {type: "notch"},
+                           {type: "allpass"}];
 
     for (var i = 0; i < filterTypeArray.length; ++i) {
         try {
@@ -81,35 +81,9 @@ function runTest() {
         }
     }
 
-    // For legacy support, verify that we can set the type attribute as an integer value and
-    // verify that this translates correctly to the WebIDL enum value.
-    for (var i = 0; i < filterTypeArray.length; ++i) {
-        try {
-            filter.type = filterTypeArray[i].integerType;
-            if (filter.type === filterTypeArray[i].type && filterTypeArray[i].integerType === i) {
-                var message = "Biquad filter type " + i + " is settable using legacy integer value.";
-                testPassed(message);
-            } else {
-                var message = "Biquad filter type " + i + " was not correctly set using legacy integer value.";
-                testFailed(message);
-            }
-        } catch(e) {
-            var message = "Biquad filter type " + i + " should not throw exception using legacy integer value.";
-            testFailed(message);
-        }
-    }
-
-    // Check that illegal filter type throws.
-    try {
-        filter.type = filter.ALLPASS + 1;
-        testFailed("Illegal filter type should throw exception.");
-    } catch(e) {
-        testPassed("Illegal filter type correctly throws exception.");
-    }
-
-    // Check specifically that we throw a TypeError.
-    shouldThrowTypeError(function() { filter.type = "xyz12349jfksd"; }, "Setting .type to illegal string value");
-    shouldThrowTypeError(function() { filter.type = new Float32Array(1); }, "Setting .type to illegal type of Float32Array");
+    // Check that we don't throw an exception for illegal .type values as per WebIDL.
+    shouldNotThrowException(function() { filter.type = "xyz12349jfksd"; }, "Setting .type to illegal string value");
+    shouldNotThrowException(function() { filter.type = new Float32Array(1); }, "Setting .type to illegal type");
 
     finishJSTest();
 }
index 95a1213..d88d777 100644 (file)
@@ -49,7 +49,7 @@ function runTest() {
     bufferSource.connect(convolver);
     convolver.connect(context.destination);
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkConvolvedResult(trianglePulse);
     context.startRendering();
index a34e8ac..093aa5a 100644 (file)
@@ -30,13 +30,13 @@ function runTest() {
     var bufferSource = context.createBufferSource();
     bufferSource.buffer = toneBuffer;
 
-    var delay = context.createDelayNode();
+    var delay = context.createDelay();
     delayTimeSeconds = 1;
     delay.delayTime.value = delayTimeSeconds;
 
     bufferSource.connect(delay);
     delay.connect(context.destination);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkDelayedResult(toneBuffer);
     context.startRendering();
index 81518b2..6af25bb 100644 (file)
@@ -31,13 +31,13 @@ function runTest() {
     bufferSource.buffer = toneBuffer;
 
     var maxDelay = 1.5;
-    var delay = context.createDelayNode(maxDelay);
+    var delay = context.createDelay(maxDelay);
     delayTimeSeconds = maxDelay;
     delay.delayTime.value = delayTimeSeconds;
 
     bufferSource.connect(delay);
     delay.connect(context.destination);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkDelayedResult(toneBuffer);
     context.startRendering();
index 688335c..7e8ecd9 100644 (file)
@@ -31,7 +31,7 @@ function runTest() {
     bufferSource.buffer = toneBuffer;
 
     // Create a delay node with an explicit max delay time (greater than the default of 1 second).
-    var delay = context.createDelayNode(2);
+    var delay = context.createDelay(2);
     // Set the delay time to a value greater than the default max delay so we can verify the delay
     // is working for this case.
     delayTimeSeconds = 1.5;
@@ -39,7 +39,7 @@ function runTest() {
 
     bufferSource.connect(delay);
     delay.connect(context.destination);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkDelayedResult(toneBuffer);
     context.startRendering();
index 75029b6..7f4b6aa 100644 (file)
@@ -30,14 +30,14 @@ function runTest() {
     var bufferSource = context.createBufferSource();
     bufferSource.buffer = toneBuffer;
 
-    var delay = context.createDelayNode();
+    var delay = context.createDelay();
     
     // Schedule delay time at time zero.
     delay.delayTime.setValueAtTime(delayTimeSeconds, 0);
 
     bufferSource.connect(delay);
     delay.connect(context.destination);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkDelayedResult(toneBuffer);
     context.startRendering();
index e0a9937..9b37933 100644 (file)
@@ -45,7 +45,7 @@ function runTest() {
 
     bufferSource.connect(delay);
     delay.connect(context.destination);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     
     context.oncomplete = checkDelayedResult(toneBuffer);
     context.startRendering();
index 4902e38..34420e2 100644 (file)
@@ -2,10 +2,9 @@ Test exponential distance model of AudioPannerNode.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS Distance model value matched expected value.
 PASS Number of impulses found matches number of panner nodes.
 PASS Distance gains are correct.
-PASS Distance test passed for distance model 2
+PASS Distance test passed for distance model exponential
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 37b62dc..1e1b055 100644 (file)
@@ -24,9 +24,9 @@
           // Create offline audio context.
           context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
 
-          // Temp panner node so we can get the EXPONENTIAL_DISTANCE value.
+          // Temp panner node so we can get the exponential value.
           var tempPanner = context.createPanner();
-          createTestAndRun(context, tempPanner.EXPONENTIAL_DISTANCE, 2);
+          createTestAndRun(context, "exponential");
       }
 
       runTest();
index 65a9492..5f35cdf 100644 (file)
@@ -2,10 +2,9 @@ Test inverse distance model of AudioPannerNode.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS Distance model value matched expected value.
 PASS Number of impulses found matches number of panner nodes.
 PASS Distance gains are correct.
-PASS Distance test passed for distance model 1
+PASS Distance test passed for distance model inverse
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 980b4b7..a1a7dea 100644 (file)
@@ -24,9 +24,9 @@
           // Create offline audio context.
           context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
 
-          // Temp panner node so we can get the INVERSE_DISTANCE value.
+          // Temp panner node so we can get the inverse value.
           var tempPanner = context.createPanner();
-          createTestAndRun(context, tempPanner.INVERSE_DISTANCE, 1);
+          createTestAndRun(context, "inverse");
       }
 
       runTest();
index c9d28a9..adbde13 100644 (file)
@@ -2,10 +2,9 @@ Test linear distance model of AudioPannerNode.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS Distance model value matched expected value.
 PASS Number of impulses found matches number of panner nodes.
 PASS Distance gains are correct.
-PASS Distance test passed for distance model 0
+PASS Distance test passed for distance model linear
 PASS successfullyParsed is true
 
 TEST COMPLETE
index e4b633f..d9d5394 100644 (file)
@@ -24,9 +24,9 @@
           // Create offline audio context.
           context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
 
-          // Create temp panner to get LINEAR_DISTANCE value for testing.
+          // Create temp panner to get linear value for testing.
           var pannerModel = context.createPanner();
-          createTestAndRun(context, pannerModel.LINEAR_DISTANCE, 0);
+          createTestAndRun(context, "linear");
       }
 
       runTest();
index 495ea96..8a4d68b 100644 (file)
@@ -24,7 +24,7 @@ function runTest() {
     var context = new webkitAudioContext();
 
     // Create gain node.
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
 
     if (gainNode.gain.toString().indexOf("AudioParam") > -1)
         testPassed("gain is of AudioParam type.");
index 386b3e0..2fa24db 100644 (file)
@@ -51,7 +51,7 @@ function playNote(time, gain) {
     source.connect(gainNode);
     gainNode.connect(context.destination);
 
-    source.noteOn(time);
+    source.start(time);
 }
 
 function init() {
index edfa771..6eb8c88 100644 (file)
@@ -37,7 +37,7 @@ function runTest()
     var node;
 
     try {  
-        node = context.createJavaScriptNode(bufferSize, 0, 1);
+        node = context.createScriptProcessor(bufferSize, 0, 1);
         testPassed("Successfully created JavaScriptAudioNode.");
     } catch (e) {
         testFailed("Failed to create JavaScriptAudioNode.");
@@ -53,7 +53,7 @@ function runTest()
     node.onaudioprocess = function(e) { };
     source.connect(node);
     node.connect(context.destination);
-    source.noteOn(0);
+    source.start(0);
 
     context.oncomplete = checkResult;
     context.startRendering();
index c8accf9..00e02a3 100644 (file)
@@ -147,7 +147,7 @@ function runTest() {
     jsnode.connect(context.destination);
     jsnode.onaudioprocess = processAudioData;
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     context.oncomplete = finishJSTest;
     context.startRendering();
 }
index 10b763e..94bd4bc 100644 (file)
@@ -52,8 +52,8 @@ function finishedLoading(bufferList) {
     
     source1.connect(context.destination);
     source2.connect(context.destination);
-    source1.noteOn(0);
-    source2.noteOn(0);
+    source1.start(0);
+    source2.start(0);
     
     context.oncomplete = finishAudioTest;
     context.startRendering();    
diff --git a/LayoutTests/webaudio/note-grain-on-play-expected.txt b/LayoutTests/webaudio/note-grain-on-play-expected.txt
deleted file mode 100644 (file)
index ae7b191..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Test noteGrainOn offset rendering.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS Found all 100 grains.
-PASS All 100 grains started at the correct time.
-PASS All 100 grains ended at the correct time.
-PASS All 100 grains contained the correct data.
-PASS noteGrainOn offset rendering tests passed.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/webaudio/note-grain-on-play.html b/LayoutTests/webaudio/note-grain-on-play.html
deleted file mode 100644 (file)
index e839c59..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <script src="resources/audio-testing.js"></script>
-    <script src="resources/note-grain-on-testing.js"></script>
-    <script src="../resources/js-test-pre.js"></script>
-  </head>
-
-  <body>
-    <div id="description"></div>
-    <div id="console"></div>
-
-    <script>
-      description("Test noteGrainOn offset rendering.");
-
-      // To test noteGrainOn, a single ramp signal is created.
-      // Various sections of the ramp are rendered by noteGrainOn() at
-      // different times, and we verify that the actual output
-      // consists of the correct section of the ramp at the correct
-      // time.
-      
-      var linearRampBuffer;
-
-      // Array of the grain offset used for each ramp played.
-      var grainOffsetTime = [];
-
-      // Verify the received signal is a ramp from the correct section
-      // of our ramp signal.
-      function verifyGrain(renderedData, startFrame, endFrame, grainIndex) {
-          var grainOffsetFrame = timeToSampleFrame(grainOffsetTime[grainIndex], sampleRate);
-          var grainFrameLength = endFrame - startFrame;
-          var ramp = linearRampBuffer.getChannelData(0);
-          var isCorrect = true;
-
-          var expected;
-          var actual;
-          var frame;
-      
-          for (var k = 0; k < grainFrameLength; ++k) {
-              if (renderedData[startFrame + k] != ramp[grainOffsetFrame + k]) {
-                  expected = ramp[grainOffsetFrame + k];
-                  actual = renderedData[startFrame + k];
-                  frame = startFrame + k;
-                  isCorrect = false;
-                  break;
-              }
-          }
-          return { verified: isCorrect,
-                   expected : expected ,
-                   actual : actual,
-                   frame : frame };
-      }
-      
-      function checkResult(event) {
-          var buffer = event.renderedBuffer;
-          renderedData = buffer.getChannelData(0);
-          var nSamples = renderedData.length;
-
-          var success = true;
-
-          // Number of grains that we found that have incorrect data.
-          var invalidGrainDataCount = 0;
-      
-          var startEndFrames = findStartAndEndSamples(renderedData);
-
-          // Verify the start and stop times.  Not strictly needed for
-          // this test, but it's useful to know that if the ramp data
-          // appears to be incorrect.
-          success = success && verifyStartAndEndFrames(startEndFrames);
-
-          // Loop through each of the rendered grains and check that
-          // each grain contains our expected ramp.
-          for (var k = 0; k < startEndFrames.start.length; ++k) {
-              // Verify that the rendered data matches the expected
-              // section of our ramp signal.
-              var result = verifyGrain(renderedData, startEndFrames.start[k], startEndFrames.end[k], k);
-
-              if (!result.verified) {
-                  testFailed("Grain " + k + " incorrect.  Expected " + result.expected + " but received " + result.actual + " at sample frame " + result.frame);
-                  ++invalidGrainDataCount;
-                  success = false;
-              }
-          }
-          
-          if (!invalidGrainDataCount) {
-              testPassed("All " + numberOfTests + " grains contained the correct data.");
-          } else {
-              testFailed(invalidGrainDataCount + " grains out of " + numberOfTests + " did not contain the expected data.");
-              success = false;
-          }
-      
-          if (success) {
-              testPassed("noteGrainOn offset rendering tests passed.");
-          } else {
-              testFailed("noteGrainOn offset rendering tests failed.");
-          }
-
-          finishJSTest();
-      }
-
-      function runTest() {
-          if (window.testRunner) {
-              testRunner.dumpAsText();
-              testRunner.waitUntilDone();
-          }
-
-          window.jsTestIsAsync = true;
-
-          // Create offline audio context.
-          context = new webkitOfflineAudioContext(2, sampleRate * renderTime, sampleRate);
-
-          // Create a linear ramp for testing noteGrainOn.
-          linearRampBuffer = createSignalBuffer(context,
-                                                function(k) {
-                                                    // Want the ramp to start
-                                                    // with 1, not 0.
-                                                    return k + 1;
-                                                });    
-
-          var grainInfo = playAllGrains(context, linearRampBuffer, numberOfTests);
-
-          grainOffsetTime = grainInfo.grainOffsetTimes;
-
-          context.oncomplete = checkResult;
-          context.startRendering();
-      }
-      
-      runTest();
-      successfullyParsed = true;
-
-    </script>
-
-    <script src="../resources/js-test-post.js"></script>
-  </body>
-</html>
diff --git a/LayoutTests/webaudio/note-grain-on-timing-expected.txt b/LayoutTests/webaudio/note-grain-on-timing-expected.txt
deleted file mode 100644 (file)
index 9e21b34..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Test timing of noteGrainOn.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-PASS Found all 100 grains.
-PASS All 100 grains started at the correct time.
-PASS All 100 grains ended at the correct time.
-PASS noteGrainOn timing tests passed.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/webaudio/note-grain-on-timing.html b/LayoutTests/webaudio/note-grain-on-timing.html
deleted file mode 100644 (file)
index ce0f208..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-  <head>
-    <script src="resources/audio-testing.js"></script>
-    <script src="resources/note-grain-on-testing.js"></script>
-    <script src="../resources/js-test-pre.js"></script>
-  </head>
-
-  <body>
-    <div id="description"></div>
-    <div id="console"></div>
-
-    <script>
-      description("Test timing of noteGrainOn.");
-
-      var squarePulseBuffer;
-
-      function checkResult(event) {
-          var buffer = event.renderedBuffer;
-          renderedData = buffer.getChannelData(0);
-          var nSamples = renderedData.length;
-
-          var success = true;
-      
-          var startEndFrames = findStartAndEndSamples(renderedData);
-
-          success = success && verifyStartAndEndFrames(startEndFrames);
-
-          if (success) {
-              testPassed("noteGrainOn timing tests passed.");
-          } else {
-              testFailed("noteGrainOn timing tests failed.");
-          }
-
-          finishJSTest();
-      }
-
-      function runTest() {
-          if (window.testRunner) {
-              testRunner.dumpAsText();
-              testRunner.waitUntilDone();
-          }
-
-          window.jsTestIsAsync = true;
-
-          // Create offline audio context.
-          context = new webkitOfflineAudioContext(2, sampleRate * renderTime, sampleRate);
-
-          squarePulseBuffer = createSignalBuffer(context, function (k) { return 1 });    
-
-          playAllGrains(context, squarePulseBuffer, numberOfTests);
-
-          context.oncomplete = checkResult;
-          context.startRendering();
-      }
-      
-      runTest();
-      successfullyParsed = true;
-
-    </script>
-
-    <script src="../resources/js-test-post.js"></script>
-  </body>
-</html>
index 6e5b07c..aded330 100644 (file)
@@ -6,15 +6,10 @@ PASS Oscillator correctly set to SINE type.
 PASS Oscillator correctly set to SQUARE type.
 PASS Oscillator correctly set to SAWTOOTH type.
 PASS Oscillator correctly set to TRIANGLE type.
-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 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.
-PASS Setting .type to illegal type of Float32Array threw TypeError.
+PASS Directly setting oscillator type to custom correctly throws exception.
+PASS Setting .type to illegal string value did not throw an exception.
+PASS Setting .type to illegal type did not throw an exception.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index fb0c79f..d25bcd3 100644 (file)
@@ -19,11 +19,11 @@ description("Basic test of setting Oscillator node types.");
 var sampleRate = 44100;
 var renderLengthSeconds = 0.25;
 
-var oscTypes = [{type: "sine", integerType: 0, name: "SINE"},
-                {type: "square", integerType: 1, name: "SQUARE"},
-                {type: "sawtooth", integerType: 2, name: "SAWTOOTH"},
-                {type: "triangle", integerType: 3, name: "TRIANGLE"},
-                {type: "custom", integerType: 4, name: "CUSTOM"}];
+var oscTypes = [{type: "sine", name: "SINE"},
+                {type: "square", name: "SQUARE"},
+                {type: "sawtooth", name: "SAWTOOTH"},
+                {type: "triangle", name: "TRIANGLE"},
+                {type: "custom", name: "CUSTOM"}];
 
 function runTest() 
 {
@@ -38,7 +38,7 @@ function runTest()
     var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeconds, sampleRate);
     var osc = context.createOscillator();
 
-    // Set each possible oscillator type (except CUSTOM) and verify that the type is correct.
+    // Set each possible oscillator type (except custom) and verify that the type is correct.
     // Here we're setting the type using WebIDL enum values which are strings.
     for (var k = 0; k < oscTypes.length - 1; ++k) {
         osc.type = oscTypes[k].type;
@@ -48,16 +48,6 @@ function runTest()
             testFailed("Oscillator set to " + oscTypes[k].name + " type, but returns " + oscTypes[osc.type].name + " type.");
     }
 
-    // For legacy support, verify that we can set the type attribute as an integer value and
-    // verify that this translates correctly to the WebIDL enum value.
-    for (var k = 0; k < oscTypes.length - 1; ++k) {
-        osc.type = oscTypes[k].integerType;
-        if (osc.type == oscTypes[k].type)
-            testPassed("Oscillator correctly set to " + oscTypes[k].name + " type using legacy integer value.");
-        else
-            testFailed("Oscillator set to " + oscTypes[k].name + " type, but returns " + oscTypes[osc.type].name + " type using legacy integer value.");
-    }
-
     // Now set a custom oscillator
     var coeffA = new Float32Array([0, 1, 0.5]);
     var coeffB = new Float32Array([0, 0, 0]);        
@@ -70,23 +60,16 @@ function runTest()
 
     // Try setting some invalid types
     try {
+        osc.type = "sine";
         osc.type = "custom";
-        testFailed("Directly setting oscillator type to CUSTOM did not throw exception.");
-    } catch (e) {
-        testPassed("Directly setting oscillator type to CUSTOM correctly throws exception.");
-    }
-
-    var oscType = osc.CUSTOM + 1;
-    try {
-        osc.type = oscType;
-        testFailed("Setting oscillator to invalid type " + oscType + " did not throw exception.");
+        testFailed("Directly setting oscillator type to custom did not throw exception.");
     } catch (e) {
-        testPassed("Setting oscillator to invalid type " + oscType + " correctly throws exception.");
+        testPassed("Directly setting oscillator type to custom correctly throws exception.");
     }
 
-    // Check specifically that we throw a TypeError.
-    shouldThrowTypeError(function() { osc.type = "xyz12349jfksd"; }, "Setting .type to illegal string value");
-    shouldThrowTypeError(function() { osc.type = new Float32Array(1); }, "Setting .type to illegal type of Float32Array");
+    // Check that we don't throw an exception for illegal .type values as per WebIDL.
+    shouldNotThrowException(function() { osc.type = "xyz12349jfksd"; }, "Setting .type to illegal string value");
+    shouldNotThrowException(function() { osc.type = new Float32Array(1); }, "Setting .type to illegal type");
 
     finishJSTest();
 }
index 89c75a1..a87e003 100644 (file)
@@ -21,7 +21,7 @@ function init() {
     if (!window.testRunner)
         return;
 
-    generateExponentialOscillatorSweep(OSC.CUSTOM);
+    generateExponentialOscillatorSweep("custom");
 }
 
 </script>
index cf5fc25..f845f02 100644 (file)
@@ -21,7 +21,7 @@ function init() {
     if (!window.testRunner)
         return;
 
-    generateExponentialOscillatorSweep(OSC.SAWTOOTH);
+    generateExponentialOscillatorSweep("sawtooth");
 }
 
 </script>
index 3034239..4d716ed 100644 (file)
@@ -21,7 +21,7 @@ function init() {
     if (!window.testRunner)
         return;
 
-    generateExponentialOscillatorSweep(OSC.SINE);
+    generateExponentialOscillatorSweep("sine");
 }
 
 </script>
index adc3d6a..ceb7664 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 
 <!--
-Create an oscillator of type SQUARE and generate a slow exponential tone sweep.
+Create an oscillator of type square 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.
 -->
@@ -21,7 +21,7 @@ function init() {
     if (!window.testRunner)
         return;
 
-    generateExponentialOscillatorSweep(OSC.SQUARE);
+    generateExponentialOscillatorSweep("square");
 }
 
 </script>
index eb7e724..bee5cfe 100644 (file)
@@ -21,7 +21,7 @@ function init() {
     if (!window.testRunner)
         return;
 
-    generateExponentialOscillatorSweep(OSC.TRIANGLE);
+    generateExponentialOscillatorSweep("triangle");
 }
 
 </script>
index ceef78b..cf82acb 100644 (file)
@@ -20,16 +20,11 @@ PASS PannerNode defaults to 'HRTF' panningModel.
 PASS PannerNode defaults to 'inverse' distanceModel.
 PASS panningModel: 'equalpower' is settable.
 PASS panningModel: 'HRTF' is settable.
-PASS panningModel: 0 is settable using legacy integer value.
-PASS panningModel: 1 is settable using legacy integer value.
 PASS distanceModel: 'linear' is settable.
 PASS distanceModel: 'inverse' is settable.
 PASS distanceModel: 'exponential' is settable.
-PASS distanceModel: 0 is settable using legacy integer value.
-PASS distanceModel: 1 is settable using legacy integer value.
-PASS distanceModel: 2 is settable using legacy integer value.
-PASS Setting .type to illegal string value threw TypeError.
-PASS Setting .type to illegal type of Float32Array threw TypeError.
+PASS Setting .distanceModel to illegal string value did not throw an exception.
+PASS Setting .distanceModel to illegal type did not throw an exception.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index a4f9b0a..fb86347 100644 (file)
@@ -112,10 +112,8 @@ function runTest() {
         testFailed("PannerNode should default to 'inverse' distanceModel.");
 
     // Check that the .panningModel attribute can be set to all legal values.
-    var panningModels = [{value: "equalpower", integerValue: panner.EQUALPOWER},
-                         {value: "HRTF", integerValue: panner.HRTF},
-                         // FIXME: enable "soundfield" once feature is implemented: https://bugs.webkit.org/show_bug.cgi?id=77367
-                         // {value: "soundfield", integerValue: panner.SOUNDFIELD}
+    var panningModels = [{value: "equalpower"},
+                         {value: "HRTF"},
                         ];
 
     for (var i = 0; i < panningModels.length; ++i) {
@@ -134,29 +132,10 @@ function runTest() {
         }
     }
 
-    // For legacy support, verify that we can set the .panningModel attribute as an integer value and
-    // verify that this translates correctly to the WebIDL enum value.
-    for (var i = 0; i < panningModels.length; ++i) {
-        try {
-            panner.panningModel = panningModels[i].integerValue;
-            if (panner.panningModel === panningModels[i].value && panningModels[i].integerValue === i) {
-                var message = "panningModel: " + panningModels[i].integerValue + " is settable using legacy integer value.";
-                testPassed(message);
-            } else {
-                var message = "panningModel: " + panningModels[i].integerValue + " was not correctly set using legacy integer value.";
-                testFailed(message);
-            }
-        } catch(e) {
-            var message = "Setting panningModel to " + panningModels[i].integerValue + " should not throw exception using legacy integer value.";
-            testFailed(message);
-        }
-    }
-
     // Check that the .distanceModel attribute can be set to all legal values.
-    var distanceModels = [{value: "linear", integerValue: panner.LINEAR_DISTANCE},
-                          {value: "inverse", integerValue: panner.INVERSE_DISTANCE},
-                          {value: "exponential", integerValue: panner.EXPONENTIAL_DISTANCE}
-                        ];
+    var distanceModels = [{value: "linear"},
+                          {value: "inverse"},
+                          {value: "exponential"}];
 
     for (var i = 0; i < distanceModels.length; ++i) {
         try {
@@ -174,27 +153,9 @@ function runTest() {
         }
     }
 
-    // For legacy support, verify that we can set the .distanceModel attribute as an integer value and
-    // verify that this translates correctly to the WebIDL enum value.
-    for (var i = 0; i < distanceModels.length; ++i) {
-        try {
-            panner.distanceModel = distanceModels[i].integerValue;
-            if (panner.distanceModel === distanceModels[i].value && distanceModels[i].integerValue === i) {
-                var message = "distanceModel: " + distanceModels[i].integerValue + " is settable using legacy integer value.";
-                testPassed(message);
-            } else {
-                var message = "distanceModel: " + distanceModels[i].integerValue + " was not correctly set using legacy integer value.";
-                testFailed(message);
-            }
-        } catch(e) {
-            var message = "Setting distanceModel to " + distanceModels[i].integerValue + " should not throw exception using legacy integer value.";
-            testFailed(message);
-        }
-    }
-
-    // Check that we throw a TypeError for illegal .distanceModel values.
-    shouldThrowTypeError(function() { panner.distanceModel = "xyz12349jfksd"; }, "Setting .type to illegal string value");
-    shouldThrowTypeError(function() { panner.distanceModel = new Float32Array(1); }, "Setting .type to illegal type of Float32Array");
+    // Check that we don't throw an exception for illegal .distanceModel values as per WebIDL.
+    shouldNotThrowException(function() { panner.distanceModel = "xyz12349jfksd"; }, "Setting .distanceModel to illegal string value");
+    shouldNotThrowException(function() { panner.distanceModel = new Float32Array(1); }, "Setting .distanceModel to illegal type");
 
     finishJSTest();
 }
index 3488279..28eecb6 100644 (file)
@@ -161,7 +161,7 @@ function timeToSampleFrame(time, sampleRate) {
     return Math.floor(0.5 + time * sampleRate);
 }
 
-// Compute the number of sample frames consumed by noteGrainOn with
+// Compute the number of sample frames consumed by start with
 // the specified |grainOffset|, |duration|, and |sampleRate|.
 function grainLengthInSampleFrames(grainOffset, duration, sampleRate) {
     var startFrame = timeToSampleFrame(grainOffset, sampleRate);
@@ -175,6 +175,20 @@ function isValidNumber(x) {
     return !isNaN(x) && (x != Infinity) && (x != -Infinity);
 }
 
+function shouldNotThrowException(func, text) {
+    var ok = true;
+    try {
+        func();
+    } catch (e) {
+        ok = false;
+    }
+    if (ok) {
+        testPassed(text + " did not throw an exception.");
+    } else {
+        testFailed(text + " did throw an exception.");
+    }
+}
+
 function shouldThrowTypeError(func, text) {
     var ok = false;
     try {
index 34cd0d0..6807a1e 100644 (file)
@@ -412,7 +412,7 @@ function createAudioGraphAndTest(numberOfTests, initialValue, setValueFunction,
     // automation, since it's easy to pass a constant value through the node, automate the
     // .gain attribute and observe the resulting values.
 
-    gainNode = context.createGainNode();
+    gainNode = context.createGain();
 
     var bufferSource = context.createBufferSource();
     bufferSource.buffer = constantBuffer;
@@ -430,7 +430,7 @@ function createAudioGraphAndTest(numberOfTests, initialValue, setValueFunction,
                                  initialValue,
                                  setValueFunction,
                                  automationFunction);
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
       
     context.oncomplete = checkResultFunction(testName,
                                              maxError,
index 027af11..a66e4bb 100644 (file)
@@ -349,32 +349,23 @@ function createAllpassFilter(freq, q, gain) {
 
 // Array of functions to compute the filter coefficients.  This must
 // be arraned in the same order as the filter types in the idl file.
-var filterCreatorFunction = [createLowpassFilter,
-                             createHighpassFilter,
-                             createBandpassFilter,
-                             createLowShelfFilter,
-                             createHighShelfFilter,
-                             createPeakingFilter,
-                             createNotchFilter,
-                             createAllpassFilter];
-
-var filterTypeName = ["Lowpass filter",
-                      "Highpass filter",
-                      "Bandpass filter",
-                      "Lowshelf filter",
-                      "Highshelf filter",
-                      "Peaking filter",
-                      "Notch filter",
-                      "Allpass filter"];
-
-var filterTypeIndex = {"lowpass": 0,
-                       "highpass": 1,
-                       "bandpass": 2,
-                       "lowshelf": 3,
-                       "highshelf": 4,
-                       "peaking": 5,
-                       "notch": 6,
-                       "allpass": 7};
+var filterCreatorFunction = {"lowpass": createLowpassFilter,
+                             "highpass": createHighpassFilter,
+                             "bandpass": createBandpassFilter,
+                             "lowshelf": createLowShelfFilter,
+                             "highshelf": createHighShelfFilter,
+                             "peaking": createPeakingFilter,
+                             "notch": createNotchFilter,
+                             "allpass": createAllpassFilter};
+
+var filterTypeName = {"lowpass": "Lowpass filter",
+                      "highpass": "Highpass filter",
+                      "bandpass": "Bandpass filter",
+                      "lowshelf": "Lowshelf filter",
+                      "highshelf": "Highshelf filter",
+                      "peaking": "Peaking filter",
+                      "notch": "Notch filter",
+                      "allpass": "Allpass filter"};
 
 function createFilter(filterType, freq, q, gain) {
     return filterCreatorFunction[filterType](freq, q, gain);
@@ -450,7 +441,7 @@ function createTestAndRun(context, filterType, filterParameters) {
         signal[k].connect(filter[k]);
         filter[k].connect(context.destination);
 
-        signal[k].noteOn(timeStep * k);
+        signal[k].start(timeStep * k);
     }
 
     context.oncomplete = checkFilterResponse(filterType, filterParameters);
index 97f2eba..b8a1240 100644 (file)
@@ -95,14 +95,13 @@ function createGraph(context, distanceModel, nodeCount) {
         panner[k].connect(context.destination);
 
         time[k] = k * timeStep;
-        bufferSource[k].noteOn(time[k]);
+        bufferSource[k].start(time[k]);
     }
 }
 
 // distanceModel should be the distance model constant like
-// LINEAR_DISTANCE, INVERSE_DISTANCE, and EXPONENTIAL_DISTANCE.  The
-// expectedModel is the expected actual numeric value of the constant.
-function createTestAndRun(context, distanceModel, expectedModel) {
+// linear, inverse, and exponential.
+function createTestAndRun(context, distanceModel) {
     // To test the distance models, we create a number of panners at
     // uniformly spaced intervals on the z-axis.  Each of these are
     // started at equally spaced time intervals.  After rendering the
@@ -112,7 +111,7 @@ function createTestAndRun(context, distanceModel, expectedModel) {
 
     createGraph(context, distanceModel, nodesToCreate);
 
-    context.oncomplete = checkDistanceResult(distanceModel, expectedModel);
+    context.oncomplete = checkDistanceResult(distanceModel);
     context.startRendering();
 }
 
@@ -122,7 +121,7 @@ function equalPowerGain() {
     return Math.SQRT1_2;
 }
 
-function checkDistanceResult(model, expectedModel) {
+function checkDistanceResult(model) {
     return function(event) {
         renderedBuffer = event.renderedBuffer;
         renderedData = renderedBuffer.getChannelData(0);
@@ -174,13 +173,6 @@ function checkDistanceResult(model, expectedModel) {
             }
         }
 
-        if (model == expectedModel) {
-            testPassed("Distance model value matched expected value.");
-        } else {
-            testFailed("Distance model value does not match expected value.");
-            success = false;
-        }    
-
         if (impulseCount == nodesToCreate) {
             testPassed("Number of impulses found matches number of panner nodes.");
         } else {
index 0454211..787e0d1 100644 (file)
@@ -72,13 +72,13 @@ function runJSNodeTest()
     var bufferSource = context.createBufferSource();
     bufferSource.buffer = sourceBuffer;
 
-    var jsnode = context.createJavaScriptNode(bufferSize, inputChannels, outputChannels);
+    var jsnode = context.createScriptProcessor(bufferSize, inputChannels, outputChannels);
 
     bufferSource.connect(jsnode);
     jsnode.connect(context.destination);
     jsnode.onaudioprocess = processAudioData;
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
     context.oncomplete = finishJSTest;
     context.startRendering();
 }
index f39fbe9..c27fda1 100644 (file)
@@ -17,20 +17,12 @@ var lowFrequency = 10;
 var highFrequency = nyquist + 2000; // go slightly higher than nyquist to make sure we generate silence there
 var context = 0;
 
-var OSC = {
-    SINE: 0,
-    SQUARE: 1,
-    SAWTOOTH: 2,
-    TRIANGLE: 3,
-    CUSTOM: 4,
-};
-
 function generateExponentialOscillatorSweep(oscillatorType) {
     // Create offline audio context.
     context = new webkitOfflineAudioContext(1, sampleRate * lengthInSeconds, sampleRate);
 
     var osc = context.createOscillator();
-    if (oscillatorType == OSC.CUSTOM) {
+    if (oscillatorType == "custom") {
         // Create a simple waveform with three Fourier coefficients.
         // Note the first values are expected to be zero (DC for coeffA and Nyquist for coeffB).
         var coeffA = new Float32Array([0, 1, 0.5]);
@@ -42,7 +34,7 @@ function generateExponentialOscillatorSweep(oscillatorType) {
     }
 
     // Scale by 1/2 to better visualize the waveform and to avoid clipping past full scale.
-    var gainNode = context.createGainNode();
+    var gainNode = context.createGain();
     gainNode.gain.value = 0.5;
     osc.connect(gainNode);
     gainNode.connect(context.destination);
index 598549e..f96857f 100644 (file)
@@ -58,7 +58,7 @@ function createGraph(context, nodeCount) {
 
         // Start the source
         time[k] = k * timeStep;
-        bufferSource[k].noteOn(time[k]);
+        bufferSource[k].start(time[k]);
     }
 }
 
index 4b921e7..1eeac07 100644 (file)
@@ -43,7 +43,7 @@ function playNote(time) {
     var bufferSource = context.createBufferSource();
     bufferSource.buffer = impulse;
     bufferSource.connect(context.destination);
-    bufferSource.noteOn(time);
+    bufferSource.start(time);
 }
 
 function checkSampleAccuracy(event) {
index eb25012..754c811 100644 (file)
@@ -59,7 +59,7 @@ function runTest() {
 
     bufferSource.connect(context.destination);
 
-    bufferSource.noteOn(0);
+    bufferSource.start(0);
 
     context.oncomplete = testFinished;
     context.startRendering();
index eb55087..254102c 100644 (file)
@@ -30,7 +30,7 @@ function runTest() {
     source.buffer = toneBuffer;
     
     source.connect(context.destination);
-    source.noteOn(0);
+    source.start(0);
     
     context.oncomplete = finishAudioTest;
     context.startRendering();    
index 2fc07be..177030f 100644 (file)
@@ -30,7 +30,7 @@ function runTest() {
     source.buffer = toneBuffer;
     
     source.connect(context.destination);
-    source.noteOn(0);
+    source.start(0);
     
     context.oncomplete = finishAudioTest;
     context.startRendering();    
index 9323403..415aea1 100644 (file)
@@ -30,7 +30,7 @@ function runTest() {
     source.buffer = toneBuffer;
     
     source.connect(context.destination);
-    source.noteOn(0);
+    source.start(0);
     
     context.oncomplete = finishAudioTest;
     context.startRendering();    
index 44a7902..34deb59 100644 (file)
@@ -123,7 +123,7 @@ function runTest() {
     waveShapingCurve = generateWaveShapingCurve();
     waveshaper.curve = waveShapingCurve;
     
-    source.noteOn(0);
+    source.start(0);
     
     context.oncomplete = checkShapedCurve;
     context.startRendering();
index 4dade8e..ffdd6de 100644 (file)
@@ -1,3 +1,13 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/FeatureDefines.xcconfig:
+        Remove ENABLE_LEGACY_WEB_AUDIO
+
 2016-08-26  Benjamin Poulain  <benjamin@webkit.org>
 
         [JSC] Implement CompareStrictEq(String, Untyped) in FTL
index 5f64334..a673951 100644 (file)
@@ -125,7 +125,6 @@ ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
 ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
 ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
-ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO;
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 ENABLE_LINK_PREFETCH = ;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -201,4 +200,4 @@ ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
 
 ENABLE_CUSTOM_ELEMENTS = ENABLE_CUSTOM_ELEMENTS;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index bf8b0bb..4ae69fc 100644 (file)
@@ -1115,7 +1115,6 @@ set(WebCore_SOURCES
     bindings/js/JSAudioContextCustom.cpp
     bindings/js/JSAudioTrackCustom.cpp
     bindings/js/JSAudioTrackListCustom.cpp
-    bindings/js/JSBiquadFilterNodeCustom.cpp
     bindings/js/JSBlobCustom.cpp
     bindings/js/JSCSSRuleCustom.cpp
     bindings/js/JSCSSRuleListCustom.cpp
@@ -1220,8 +1219,6 @@ set(WebCore_SOURCES
     bindings/js/JSNodeIteratorCustom.cpp
     bindings/js/JSNodeOrString.cpp
     bindings/js/JSNodeListCustom.cpp
-    bindings/js/JSOscillatorNodeCustom.cpp
-    bindings/js/JSPannerNodeCustom.cpp
     bindings/js/JSPerformanceEntryCustom.cpp
     bindings/js/JSPluginElementFunctions.cpp
     bindings/js/JSPopStateEventCustom.cpp
index fd899a4..995fb48 100644 (file)
@@ -1,3 +1,105 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/FeatureDefines.xcconfig:
+        Remove ENABLE_LEGACY_WEB_AUDIO.
+
+        * Modules/webaudio/AudioBufferSourceNode.cpp:
+        (WebCore::AudioBufferSourceNode::noteGrainOn): Deleted.
+        * Modules/webaudio/AudioBufferSourceNode.h:
+        * Modules/webaudio/AudioBufferSourceNode.idl:
+        (WebCore::AudioScheduledSourceNode::noteOn): Deleted.
+        (WebCore::AudioScheduledSourceNode::noteOff): Deleted.
+        * Modules/webaudio/AudioScheduledSourceNode.h:
+        * Modules/webaudio/AudioScheduledSourceNode.cpp:
+        Remove the looping attribute, as well as the noteOn, noteOff, and noteGrainOn functions.
+
+        * Modules/webaudio/AudioContext.idl:
+        Remove the createGainNode, createDelayNode and createJavaScriptNode functions.
+
+        * Modules/webaudio/AudioParam.idl:
+        Remove the setTargetValueAtTime function.
+
+        * Modules/webaudio/BiquadDSPKernel.cpp:
+        (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
+        * Modules/webaudio/BiquadFilterNode.cpp:
+        (WebCore::BiquadFilterNode::type):
+        (WebCore::BiquadFilterNode::setType):
+        (WebCore::BiquadFilterNode::getFrequencyResponse):
+        * Modules/webaudio/BiquadFilterNode.h:
+        * Modules/webaudio/BiquadFilterNode.idl:
+        * Modules/webaudio/BiquadProcessor.cpp:
+        (WebCore::BiquadProcessor::BiquadProcessor):
+        (WebCore::BiquadProcessor::setType):
+        (WebCore::BiquadProcessor::getFrequencyResponse):
+        * Modules/webaudio/BiquadProcessor.h:
+        (WebCore::BiquadProcessor::type):
+        * bindings/js/JSBiquadFilterNodeCustom.cpp: Removed.
+        Rename BiquadProcessor::FilterType to BiquadFilterType and use it
+        directly from the IDL. Remove legacy filter constants from the IDL
+        and the need for a custom binding for the type attribute.
+
+        * Modules/webaudio/OscillatorNode.cpp:
+        (WebCore::OscillatorNode::OscillatorNode):
+        (WebCore::OscillatorNode::setType):
+        (WebCore::OscillatorNode::setPeriodicWave):
+        (WebCore::OscillatorNode::type): Deleted.
+        * Modules/webaudio/OscillatorNode.h:
+        (WebCore::OscillatorNode::type):
+        * Modules/webaudio/OscillatorNode.idl:
+        * Modules/webaudio/PeriodicWave.cpp:
+        (WebCore::PeriodicWave::createSine):
+        (WebCore::PeriodicWave::createSquare):
+        (WebCore::PeriodicWave::createSawtooth):
+        (WebCore::PeriodicWave::createTriangle):
+        (WebCore::PeriodicWave::generateBasicWaveform):
+        * Modules/webaudio/PeriodicWave.h:
+        * bindings/js/JSOscillatorNodeCustom.cpp: Removed.
+        Remove noteOn and noteOff functions and the type integer constants.
+        Remove the need for a custom binding for the type attribute by renaming
+        the type enum OscillatorNode::Type and putting the enum in the IDL.
+
+        * Modules/webaudio/PannerNode.cpp:
+        (WebCore::PannerNode::PannerNode):
+        (WebCore::PannerNode::process):
+        (WebCore::PannerNode::setPanningModel):
+        (WebCore::PannerNode::distanceModel):
+        (WebCore::PannerNode::setDistanceModel):
+        (WebCore::PannerNode::panningModel): Deleted.
+        * Modules/webaudio/PannerNode.h:
+        (WebCore::PannerNode::panningModel):
+        * Modules/webaudio/PannerNode.idl:
+        * bindings/js/JSPannerNodeCustom.cpp: Removed.
+        * platform/audio/Distance.cpp:
+        (WebCore::DistanceEffect::DistanceEffect):
+        (WebCore::DistanceEffect::gain):
+        * platform/audio/Distance.h:
+        (WebCore::DistanceEffect::model):
+        (WebCore::DistanceEffect::setModel):
+        * platform/audio/EqualPowerPanner.cpp:
+        (WebCore::EqualPowerPanner::EqualPowerPanner):
+        * platform/audio/HRTFPanner.cpp:
+        (WebCore::HRTFPanner::HRTFPanner):
+        * platform/audio/Panner.cpp:
+        (WebCore::Panner::create):
+        * platform/audio/Panner.h:
+        (WebCore::Panner::panningModel):
+        (WebCore::Panner::Panner):
+        Replace the panning model and distance model integer constants
+        with IDL enum support, removing the need for a custom binding.
+        Rename the supporting C++ enums to work with the bindings.
+
+        * bindings/js/JSAudioContextCustom.cpp:
+        (WebCore::constructJSAudioContext):
+        Remove deprecated way of creating an offline context.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Update files.
+
 2016-08-26  Johan K. Jensen  <johan_jensen@apple.com>
 
         Web Inspector: Frontend should have access to Resource Timing information
index 5f64334..a673951 100644 (file)
@@ -125,7 +125,6 @@ ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
 ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
 ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
-ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO;
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 ENABLE_LINK_PREFETCH = ;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -201,4 +200,4 @@ ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
 
 ENABLE_CUSTOM_ELEMENTS = ENABLE_CUSTOM_ELEMENTS;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 0b5003e..8393d76 100644 (file)
@@ -509,16 +509,6 @@ void AudioBufferSourceNode::startPlaying(BufferPlaybackMode playbackMode, double
     m_playbackState = SCHEDULED_STATE;
 }
 
-#if ENABLE(LEGACY_WEB_AUDIO)
-void AudioBufferSourceNode::noteGrainOn(double when, double grainOffset, double grainDuration, ExceptionCode& ec)
-{
-    // Handle unspecified duration where 0 means the rest of the buffer.
-    if (!grainDuration)
-        grainDuration = buffer()->duration();
-    startPlaying(Partial, when, grainOffset, grainDuration, ec);
-}
-#endif
-
 double AudioBufferSourceNode::totalPitchRate()
 {
     double dopplerRate = 1.0;
index 227e23a..bf3f7cf 100644 (file)
@@ -64,10 +64,6 @@ public:
     // Play-state
     void start(double when, double grainOffset, Optional<double> grainDuration, ExceptionCode&);
 
-#if ENABLE(LEGACY_WEB_AUDIO)
-    void noteGrainOn(double when, double grainOffset, double grainDuration, ExceptionCode&);
-#endif
-
     // Note: the attribute was originally exposed as .looping, but to be more consistent in naming with <audio>
     // and with how it's described in the specification, the proper attribute name is .loop
     // The old attribute is kept for backwards compatibility.
index b96c322..5ec9d54 100644 (file)
@@ -39,7 +39,7 @@
     readonly attribute AudioParam gain;
     readonly attribute AudioParam playbackRate;
 
-    attribute boolean loop; // This is the proper attribute name from the specification.
+    attribute boolean loop;
 
     attribute unrestricted double loopStart;
     attribute unrestricted double loopEnd;
     [RaisesException] void start(optional unrestricted double when = 0, optional unrestricted double grainOffset = 0, optional unrestricted double grainDuration);
     [RaisesException] void stop(optional unrestricted double when = 0);
 
-    [Conditional=LEGACY_WEB_AUDIO] attribute boolean looping; // This is an alias for the .loop attribute for backwards compatibility.
-
-    [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOn(unrestricted double when);
-    [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteGrainOn(unrestricted double when, unrestricted double grainOffset, unrestricted double grainDuration);
-    [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOff(unrestricted double when);
-    
     attribute EventHandler onended;
 };
index 7d9bd09..d7d7e50 100644 (file)
@@ -96,10 +96,4 @@ enum AudioContextState {
     // void prepareOfflineBufferRendering(unsigned long numberOfChannels, unsigned long numberOfFrames, unrestricted float sampleRate);
     attribute EventHandler oncomplete;
     void startRendering();
-
-    [Conditional=LEGACY_WEB_AUDIO, ImplementedAs=createGain] GainNode createGainNode();
-    [Conditional=LEGACY_WEB_AUDIO, ImplementedAs=createDelay, RaisesException] DelayNode createDelayNode(optional unrestricted double maxDelayTime = 1);
-
-    [Conditional=LEGACY_WEB_AUDIO, ImplementedAs=createScriptProcessor, RaisesException] ScriptProcessorNode createJavaScriptNode(unsigned long bufferSize, optional unsigned long numberOfInputChannels = 2, optional unsigned long numberOfOutputChannels = 2);
-
 };
index 12d4c89..cda2777 100644 (file)
@@ -53,7 +53,4 @@
 
     // Cancels all scheduled parameter changes with times greater than or equal to startTime.
     void cancelScheduledValues(unrestricted float startTime);
-
-    [Conditional=LEGACY_WEB_AUDIO, ImplementedAs=setTargetAtTime] void setTargetValueAtTime(unrestricted float targetValue, unrestricted float time, unrestricted float timeConstant);
-
 };
index e929e8c..0d4ade5 100644 (file)
@@ -174,18 +174,6 @@ void AudioScheduledSourceNode::stop(double when, ExceptionCode& ec)
     m_endTime = when;
 }
 
-#if ENABLE(LEGACY_WEB_AUDIO)
-void AudioScheduledSourceNode::noteOn(double when, ExceptionCode& ec)
-{
-    start(when, ec);
-}
-
-void AudioScheduledSourceNode::noteOff(double when, ExceptionCode& ec)
-{
-    stop(when, ec);
-}
-#endif
-
 void AudioScheduledSourceNode::finish()
 {
     if (m_playbackState != FINISHED_STATE) {
index d5bc696..7b72136 100644 (file)
@@ -41,7 +41,7 @@ public:
     // These are the possible states an AudioScheduledSourceNode can be in:
     //
     // UNSCHEDULED_STATE - Initial playback state. Created, but not yet scheduled.
-    // SCHEDULED_STATE - Scheduled to play (via noteOn() or noteGrainOn()), but not yet playing.
+    // SCHEDULED_STATE - Scheduled to play but not yet playing.
     // PLAYING_STATE - Generating sound.
     // FINISHED_STATE - Finished generating sound.
     //
@@ -61,11 +61,6 @@ public:
     void start(double when, ExceptionCode&);
     void stop(double when, ExceptionCode&);
 
-#if ENABLE(LEGACY_WEB_AUDIO)
-    void noteOn(double when, ExceptionCode&);
-    void noteOff(double when, ExceptionCode&);
-#endif
-
     unsigned short playbackState() const { return static_cast<unsigned short>(m_playbackState); }
     bool isPlayingOrScheduled() const { return m_playbackState == PLAYING_STATE || m_playbackState == SCHEDULED_STATE; }
     bool hasFinished() const { return m_playbackState == FINISHED_STATE; }
index 37ef51e..5561dfd 100644 (file)
@@ -76,35 +76,35 @@ void BiquadDSPKernel::updateCoefficientsIfNecessary(bool useSmoothing, bool forc
 
         // Configure the biquad with the new filter parameters for the appropriate type of filter.
         switch (biquadProcessor()->type()) {
-        case BiquadProcessor::LowPass:
+        case BiquadFilterType::Lowpass:
             m_biquad.setLowpassParams(normalizedFrequency, value2);
             break;
 
-        case BiquadProcessor::HighPass:
+        case BiquadFilterType::Highpass:
             m_biquad.setHighpassParams(normalizedFrequency, value2);
             break;
 
-        case BiquadProcessor::BandPass:
+        case BiquadFilterType::Bandpass:
             m_biquad.setBandpassParams(normalizedFrequency, value2);
             break;
 
-        case BiquadProcessor::LowShelf:
+        case BiquadFilterType::Lowshelf:
             m_biquad.setLowShelfParams(normalizedFrequency, gain);
             break;
 
-        case BiquadProcessor::HighShelf:
+        case BiquadFilterType::Highshelf:
             m_biquad.setHighShelfParams(normalizedFrequency, gain);
             break;
 
-        case BiquadProcessor::Peaking:
+        case BiquadFilterType::Peaking:
             m_biquad.setPeakingParams(normalizedFrequency, value2, gain);
             break;
 
-        case BiquadProcessor::Notch:
+        case BiquadFilterType::Notch:
             m_biquad.setNotchParams(normalizedFrequency, value2);
             break;
 
-        case BiquadProcessor::Allpass:
+        case BiquadFilterType::Allpass:
             m_biquad.setAllpassParams(normalizedFrequency, value2);
             break;
         }
index 793064d..8395342 100644 (file)
@@ -40,60 +40,14 @@ BiquadFilterNode::BiquadFilterNode(AudioContext& context, float sampleRate)
     setNodeType(NodeTypeBiquadFilter);
 }
 
-String BiquadFilterNode::type() const
+BiquadFilterType BiquadFilterNode::type() const
 {
-    switch (const_cast<BiquadFilterNode*>(this)->biquadProcessor()->type()) {
-    case BiquadProcessor::LowPass:
-        return "lowpass";
-    case BiquadProcessor::HighPass:
-        return "highpass";
-    case BiquadProcessor::BandPass:
-        return "bandpass";
-    case BiquadProcessor::LowShelf:
-        return "lowshelf";
-    case BiquadProcessor::HighShelf:
-        return "highshelf";
-    case BiquadProcessor::Peaking:
-        return "peaking";
-    case BiquadProcessor::Notch:
-        return "notch";
-    case BiquadProcessor::Allpass:
-        return "allpass";
-    default:
-        ASSERT_NOT_REACHED();
-        return "lowpass";
-    }
+    return const_cast<BiquadFilterNode*>(this)->biquadProcessor()->type();
 }
 
-void BiquadFilterNode::setType(const String& type)
+void BiquadFilterNode::setType(BiquadFilterType type)
 {
-    if (type == "lowpass")
-        setType(BiquadProcessor::LowPass);
-    else if (type == "highpass")
-        setType(BiquadProcessor::HighPass);
-    else if (type == "bandpass")
-        setType(BiquadProcessor::BandPass);
-    else if (type == "lowshelf")
-        setType(BiquadProcessor::LowShelf);
-    else if (type == "highshelf")
-        setType(BiquadProcessor::HighShelf);
-    else if (type == "peaking")
-        setType(BiquadProcessor::Peaking);
-    else if (type == "notch")
-        setType(BiquadProcessor::Notch);
-    else if (type == "allpass")
-        setType(BiquadProcessor::Allpass);
-    else
-        ASSERT_NOT_REACHED();
-}
-
-bool BiquadFilterNode::setType(unsigned type)
-{
-    if (type > BiquadProcessor::Allpass)
-        return false;
-    
-    biquadProcessor()->setType(static_cast<BiquadProcessor::FilterType>(type));
-    return true;
+    biquadProcessor()->setType(type);
 }
 
 void BiquadFilterNode::getFrequencyResponse(const RefPtr<Float32Array>& frequencyHz, const RefPtr<Float32Array>& magResponse, const RefPtr<Float32Array>& phaseResponse)
@@ -101,15 +55,10 @@ void BiquadFilterNode::getFrequencyResponse(const RefPtr<Float32Array>& frequenc
     if (!frequencyHz || !magResponse || !phaseResponse)
         return;
     
-    int n = std::min(frequencyHz->length(),
-                     std::min(magResponse->length(), phaseResponse->length()));
+    int n = std::min(frequencyHz->length(), std::min(magResponse->length(), phaseResponse->length()));
 
-    if (n) {
-        biquadProcessor()->getFrequencyResponse(n,
-                                                frequencyHz->data(),
-                                                magResponse->data(),
-                                                phaseResponse->data());
-    }
+    if (n)
+        biquadProcessor()->getFrequencyResponse(n, frequencyHz->data(), magResponse->data(), phaseResponse->data());
 }
 
 } // namespace WebCore
index b37534b..0173a41 100644 (file)
 namespace WebCore {
 
 class AudioParam;
-    
+
 class BiquadFilterNode : public AudioBasicProcessorNode {
 public:
-    // These must be defined as in the .idl file and must match those in the BiquadProcessor class.
-    enum {
-        LOWPASS = 0,
-        HIGHPASS = 1,
-        BANDPASS = 2,
-        LOWSHELF = 3,
-        HIGHSHELF = 4,
-        PEAKING = 5,
-        NOTCH = 6,
-        ALLPASS = 7
-    };
-
     static Ref<BiquadFilterNode> create(AudioContext& context, float sampleRate)
     {
         return adoptRef(*new BiquadFilterNode(context, sampleRate));
     }
 
-    String type() const;
-    bool setType(unsigned); // Returns true on success.
-    void setType(const String&);
+    BiquadFilterType type() const;
+    void setType(BiquadFilterType);
 
     AudioParam* frequency() { return biquadProcessor()->parameter1(); }
     AudioParam* q() { return biquadProcessor()->parameter2(); }
index 21323c9..0ababa0 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011, Google Inc. All rights reserved.
+ * Copyright (C) 2016, Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 [
+    ImplementedAs=BiquadFilterType
+] enum BiquadFilterType {
+    "lowpass",
+    "highpass",
+    "bandpass",
+    "lowshelf",
+    "highshelf",
+    "peaking",
+    "notch",
+    "allpass"
+};
+
+[
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
 ] interface BiquadFilterNode : AudioNode {
-    // Filter type.
-    const unsigned short LOWPASS = 0;
-    const unsigned short HIGHPASS = 1;
-    const unsigned short BANDPASS = 2;
-    const unsigned short LOWSHELF = 3;
-    const unsigned short HIGHSHELF = 4;
-    const unsigned short PEAKING = 5;
-    const unsigned short NOTCH = 6;
-    const unsigned short ALLPASS = 7;
-
-    [CustomSetter] attribute DOMString type;
+    attribute BiquadFilterType type;
     
     readonly attribute AudioParam frequency; // in Hertz
     readonly attribute AudioParam detune; // in Cents
index e9dd46a..0e4e368 100644 (file)
@@ -34,7 +34,7 @@ namespace WebCore {
     
 BiquadProcessor::BiquadProcessor(AudioContext& context, float sampleRate, size_t numberOfChannels, bool autoInitialize)
     : AudioDSPKernelProcessor(sampleRate, numberOfChannels)
-    , m_type(LowPass)
+    , m_type(BiquadFilterType::Lowpass)
     , m_parameter1(0)
     , m_parameter2(0)
     , m_parameter3(0)
@@ -111,7 +111,7 @@ void BiquadProcessor::process(const AudioBus* source, AudioBus* destination, siz
         m_kernels[i]->process(source->channel(i)->data(), destination->channel(i)->mutableData(), framesToProcess);
 }
 
-void BiquadProcessor::setType(FilterType type)
+void BiquadProcessor::setType(BiquadFilterType type)
 {
     if (type != m_type) {
         m_type = type;
@@ -119,10 +119,7 @@ void BiquadProcessor::setType(FilterType type)
     }
 }
 
-void BiquadProcessor::getFrequencyResponse(int nFrequencies,
-                                           const float* frequencyHz,
-                                           float* magResponse,
-                                           float* phaseResponse)
+void BiquadProcessor::getFrequencyResponse(int nFrequencies, const float* frequencyHz, float* magResponse, float* phaseResponse)
 {
     // Compute the frequency response on a separate temporary kernel
     // to avoid interfering with the processing running in the audio
index 3520b14..f904f76 100644 (file)
@@ -37,19 +37,19 @@ namespace WebCore {
 
 // BiquadProcessor is an AudioDSPKernelProcessor which uses Biquad objects to implement several common filters.
 
+enum class BiquadFilterType {
+    Lowpass,
+    Highpass,
+    Bandpass,
+    Lowshelf,
+    Highshelf,
+    Peaking,
+    Notch,
+    Allpass
+};
+
 class BiquadProcessor : public AudioDSPKernelProcessor {
 public:
-    enum FilterType {
-        LowPass = 0,
-        HighPass = 1,
-        BandPass = 2,
-        LowShelf = 3,
-        HighShelf = 4,
-        Peaking = 5,
-        Notch = 6,
-        Allpass = 7
-    };
-
     BiquadProcessor(AudioContext&, float sampleRate, size_t numberOfChannels, bool autoInitialize);
 
     virtual ~BiquadProcessor();
@@ -75,11 +75,11 @@ public:
     AudioParam* parameter3() { return m_parameter3.get(); }
     AudioParam* parameter4() { return m_parameter4.get(); }
 
-    FilterType type() const { return m_type; }
-    void setType(FilterType);
+    BiquadFilterType type() const { return m_type; }
+    void setType(BiquadFilterType);
 
 private:
-    FilterType m_type;
+    BiquadFilterType m_type;
 
     RefPtr<AudioParam> m_parameter1;
     RefPtr<AudioParam> m_parameter2;
index 3204e10..4635f75 100644 (file)
@@ -32,6 +32,7 @@
 #include "AudioNodeOutput.h"
 #include "AudioUtilities.h"
 #include "ExceptionCode.h"
+#include "ExceptionCodePlaceholder.h"
 #include "PeriodicWave.h"
 #include "VectorMath.h"
 #include <algorithm>
@@ -53,7 +54,6 @@ Ref<OscillatorNode> OscillatorNode::create(AudioContext& context, float sampleRa
 
 OscillatorNode::OscillatorNode(AudioContext& context, float sampleRate)
     : AudioScheduledSourceNode(context, sampleRate)
-    , m_type(SINE)
     , m_firstRender(true)
     , m_virtualReadIndex(0)
     , m_phaseIncrements(AudioNode::ProcessingSizeInFrames)
@@ -67,7 +67,7 @@ OscillatorNode::OscillatorNode(AudioContext& context, float sampleRate)
     m_detune = AudioParam::create(context, "detune", 0, -4800, 4800);
 
     // Sets up default wave.
-    setType(m_type);
+    setType(m_type, ASSERT_NO_EXCEPTION);
 
     // An oscillator is always mono.
     addOutput(std::make_unique<AudioNodeOutput>(this, 1));
@@ -80,75 +80,40 @@ OscillatorNode::~OscillatorNode()
     uninitialize();
 }
 
-String OscillatorNode::type() const
-{
-    switch (m_type) {
-    case SINE:
-        return "sine";
-    case SQUARE:
-        return "square";
-    case SAWTOOTH:
-        return "sawtooth";
-    case TRIANGLE:
-        return "triangle";
-    case CUSTOM:
-        return "custom";
-    default:
-        ASSERT_NOT_REACHED();
-        return "custom";
-    }
-}
-
-void OscillatorNode::setType(const String& type)
-{
-    if (type == "sine")
-        setType(SINE);
-    else if (type == "square")
-        setType(SQUARE);
-    else if (type == "sawtooth")
-        setType(SAWTOOTH);
-    else if (type == "triangle")
-        setType(TRIANGLE);
-    else
-        ASSERT_NOT_REACHED();
-}
-
-bool OscillatorNode::setType(unsigned type)
+void OscillatorNode::setType(Type type, ExceptionCode& ec)
 {
     PeriodicWave* periodicWave = nullptr;
     float sampleRate = this->sampleRate();
 
     switch (type) {
-    case SINE:
+    case Type::Sine:
         if (!s_periodicWaveSine)
             s_periodicWaveSine = &PeriodicWave::createSine(sampleRate).leakRef();
         periodicWave = s_periodicWaveSine;
         break;
-    case SQUARE:
+    case Type::Square:
         if (!s_periodicWaveSquare)
             s_periodicWaveSquare = &PeriodicWave::createSquare(sampleRate).leakRef();
         periodicWave = s_periodicWaveSquare;
         break;
-    case SAWTOOTH:
+    case Type::Sawtooth:
         if (!s_periodicWaveSawtooth)
             s_periodicWaveSawtooth = &PeriodicWave::createSawtooth(sampleRate).leakRef();
         periodicWave = s_periodicWaveSawtooth;
         break;
-    case TRIANGLE:
+    case Type::Triangle:
         if (!s_periodicWaveTriangle)
             s_periodicWaveTriangle = &PeriodicWave::createTriangle(sampleRate).leakRef();
         periodicWave = s_periodicWaveTriangle;
         break;
-    case CUSTOM:
-    default:
-        // Return error for invalid types, including CUSTOM since setPeriodicWave() method must be
-        // called explicitly.
-        return false;
+    case Type::Custom:
+        if (m_type != Type::Custom)
+            ec = INVALID_STATE_ERR;
+        return;
     }
 
     setPeriodicWave(periodicWave);
     m_type = type;
-    return true;
 }
 
 bool OscillatorNode::calculateSampleAccuratePhaseIncrements(size_t framesToProcess)
@@ -342,7 +307,7 @@ void OscillatorNode::setPeriodicWave(PeriodicWave* periodicWave)
     // This synchronizes with process().
     std::lock_guard<Lock> lock(m_processMutex);
     m_periodicWave = periodicWave;
-    m_type = CUSTOM;
+    m_type = Type::Custom;
 }
 
 bool OscillatorNode::propagatesSilence() const
index b9dbe38..90e1a38 100644 (file)
@@ -41,13 +41,12 @@ class PeriodicWave;
 class OscillatorNode : public AudioScheduledSourceNode {
 public:
     // The waveform type.
-    // These must be defined as in the .idl file.
-    enum {
-        SINE = 0,
-        SQUARE = 1,
-        SAWTOOTH = 2,
-        TRIANGLE = 3,
-        CUSTOM = 4
+    enum class Type {
+        Sine,
+        Square,
+        Sawtooth,
+        Triangle,
+        Custom
     };
 
     static Ref<OscillatorNode> create(AudioContext&, float sampleRate);
@@ -58,10 +57,8 @@ public:
     void process(size_t framesToProcess) override;
     void reset() override;
 
-    String type() const;
-
-    bool setType(unsigned); // Returns true on success.
-    void setType(const String&);
+    Type type() const { return m_type; }
+    void setType(Type, ExceptionCode&);
 
     AudioParam* frequency() { return m_frequency.get(); }
     AudioParam* detune() { return m_detune.get(); }
@@ -80,7 +77,7 @@ private:
     bool propagatesSilence() const override;
 
     // One of the waveform types defined in the enum.
-    unsigned short m_type;
+    Type m_type { Type::Sine };
     
     // Frequency value in Hertz.
     RefPtr<AudioParam> m_frequency;
index 65841d8..33f7342 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2012, Google Inc. All rights reserved.
+ * Copyright (C) 2016, Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// OscillatorNode is an audio generator of periodic waveforms.
+enum OscillatorType {
+    "sine",
+    "square",
+    "sawtooth",
+    "triangle",
+    "custom"
+};
+
 [
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
 ] interface OscillatorNode : AudioNode {
-
-    // Type constants.
-    const unsigned short SINE = 0;
-    const unsigned short SQUARE = 1;
-    const unsigned short SAWTOOTH = 2;
-    const unsigned short TRIANGLE = 3;
-    const unsigned short CUSTOM = 4;
-
-    [CustomSetter] attribute DOMString type;
+    [SetterRaisesException] attribute OscillatorType type;
 
     // Playback state constants.
     const unsigned short UNSCHEDULED_STATE = 0;
@@ -51,9 +51,6 @@
     [RaisesException] void start(optional unrestricted double when = 0);
     [RaisesException] void stop(optional unrestricted double when = 0);
 
-    [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOn(unrestricted double when);
-    [Conditional=LEGACY_WEB_AUDIO, RaisesException] void noteOff(unrestricted double when);
-
     void setPeriodicWave(PeriodicWave? wave); // FIXME: The parameter should not be nullable.
 
     attribute EventHandler onended;
index 3a46b2d..247d5cf 100644 (file)
@@ -48,7 +48,7 @@ static void fixNANs(double &x)
 
 PannerNode::PannerNode(AudioContext& context, float sampleRate)
     : AudioNode(context, sampleRate)
-    , m_panningModel(Panner::PanningModelHRTF)
+    , m_panningModel(PanningModelType::HRTF)
     , m_lastGain(-1.0)
     , m_connectionCount(0)
 {
@@ -111,7 +111,7 @@ void PannerNode::process(size_t framesToProcess)
     }
 
     // HRTFDatabase should be loaded before proceeding for offline audio context when panningModel() is "HRTF".
-    if (panningModel() == "HRTF" && !m_hrtfDatabaseLoader->isLoaded()) {
+    if (panningModel() == PanningModelType::HRTF && !m_hrtfDatabaseLoader->isLoaded()) {
         if (context().isOfflineContext())
             m_hrtfDatabaseLoader->waitForLoaderThreadCompletion();
         else {
@@ -176,97 +176,25 @@ AudioListener* PannerNode::listener()
     return context().listener();
 }
 
-String PannerNode::panningModel() const
+void PannerNode::setPanningModel(PanningModelType model)
 {
-    switch (m_panningModel) {
-    case EQUALPOWER:
-        return "equalpower";
-    case HRTF:
-        return "HRTF";
-    case SOUNDFIELD:
-        return "soundfield";
-    default:
-        ASSERT_NOT_REACHED();
-        return "HRTF";
-    }
-}
-
-void PannerNode::setPanningModel(const String& model)
-{
-    if (model == "equalpower")
-        setPanningModel(EQUALPOWER);
-    else if (model == "HRTF")
-        setPanningModel(HRTF);
-    else if (model == "soundfield")
-        setPanningModel(SOUNDFIELD);
-    else
-        ASSERT_NOT_REACHED();
-}
-
-bool PannerNode::setPanningModel(unsigned model)
-{
-    switch (model) {
-    case EQUALPOWER:
-    case HRTF:
-        if (!m_panner.get() || model != m_panningModel) {
-            // This synchronizes with process().
-            std::lock_guard<Lock> lock(m_pannerMutex);
-
-            m_panner = Panner::create(model, sampleRate(), m_hrtfDatabaseLoader.get());
-            m_panningModel = model;
-        }
-        break;
-    case SOUNDFIELD:
-        // FIXME: Implement sound field model. See // https://bugs.webkit.org/show_bug.cgi?id=77367.
-        context().scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("'soundfield' panning model not implemented."));
-        break;
-    default:
-        return false;
-    }
-    
-    return true;
-}
+    if (!m_panner.get() || model != m_panningModel) {
+        // This synchronizes with process().
+        std::lock_guard<Lock> lock(m_pannerMutex);
 
-String PannerNode::distanceModel() const
-{
-    switch (const_cast<PannerNode*>(this)->m_distanceEffect.model()) {
-    case DistanceEffect::ModelLinear:
-        return "linear";
-    case DistanceEffect::ModelInverse:
-        return "inverse";
-    case DistanceEffect::ModelExponential:
-        return "exponential";
-    default:
-        ASSERT_NOT_REACHED();
-        return "inverse";
+        m_panner = Panner::create(model, sampleRate(), m_hrtfDatabaseLoader.get());
+        m_panningModel = model;
     }
 }
 
-void PannerNode::setDistanceModel(const String& model)
+DistanceModelType PannerNode::distanceModel() const
 {
-    if (model == "linear")
-        setDistanceModel(DistanceEffect::ModelLinear);
-    else if (model == "inverse")
-        setDistanceModel(DistanceEffect::ModelInverse);
-    else if (model == "exponential")
-        setDistanceModel(DistanceEffect::ModelExponential);
-    else
-        ASSERT_NOT_REACHED();
+    return const_cast<PannerNode*>(this)->m_distanceEffect.model();
 }
 
-bool PannerNode::setDistanceModel(unsigned model)
+void PannerNode::setDistanceModel(DistanceModelType model)
 {
-    switch (model) {
-    case DistanceEffect::ModelLinear:
-    case DistanceEffect::ModelInverse:
-    case DistanceEffect::ModelExponential:
-        m_distanceEffect.setModel(static_cast<DistanceEffect::ModelType>(model), true);
-        break;
-    default:
-        return false;
-    }
-
-    return true;
+    m_distanceEffect.setModel(model, true);
 }
 
 void PannerNode::getAzimuthElevation(double* outAzimuth, double* outElevation)
index a7782a3..0e647a4 100644 (file)
@@ -49,21 +49,6 @@ namespace WebCore {
 
 class PannerNode : public AudioNode {
 public:
-    // These must be defined as in the .idl file and must match those in the Panner class.
-    enum {
-        EQUALPOWER = 0,
-        HRTF = 1,
-        SOUNDFIELD = 2,
-    };
-
-    // These must be defined as in the .idl file and must match those
-    // in the DistanceEffect class.
-    enum {
-        LINEAR_DISTANCE = 0,
-        INVERSE_DISTANCE = 1,
-        EXPONENTIAL_DISTANCE = 2,
-    };
-
     static Ref<PannerNode> create(AudioContext& context, float sampleRate)
     {
         return adoptRef(*new PannerNode(context, sampleRate));
@@ -82,9 +67,8 @@ public:
     AudioListener* listener();
 
     // Panning model
-    String panningModel() const;
-    bool setPanningModel(unsigned); // Returns true on success.
-    void setPanningModel(const String&);
+    PanningModelType panningModel() const { return m_panningModel; }
+    void setPanningModel(PanningModelType);
 
     // Position
     FloatPoint3D position() const { return m_position; }
@@ -99,9 +83,8 @@ public:
     void setVelocity(float x, float y, float z) { m_velocity = FloatPoint3D(x, y, z); }
 
     // Distance parameters
-    String distanceModel() const;
-    bool setDistanceModel(unsigned); // Returns true on success.
-    void setDistanceModel(const String&);
+    DistanceModelType distanceModel() const;
+    void setDistanceModel(DistanceModelType);
 
     double refDistance() { return m_distanceEffect.refDistance(); }
     void setRefDistance(double refDistance) { m_distanceEffect.setRefDistance(refDistance); }
@@ -143,7 +126,7 @@ private:
     void notifyAudioSourcesConnectedToNode(AudioNode*, HashSet<AudioNode*>& visitedNodes);
 
     std::unique_ptr<Panner> m_panner;
-    unsigned m_panningModel;
+    PanningModelType m_panningModel;
 
     FloatPoint3D m_position;
     FloatPoint3D m_orientation;
index 33b97d6..38b2312 100644 (file)
  */
 
 [
+    ImplementedAs=PanningModelType
+] enum PanningModelType {
+    "equalpower",
+    "HRTF"
+};
+
+[
+    ImplementedAs=DistanceModelType
+] enum DistanceModelType {
+    "linear",
+    "inverse",
+    "exponential"
+};
+
+[
     Conditional=WEB_AUDIO,
     JSGenerateToJSObject,
     InterfaceName=webkitAudioPannerNode,
 ] interface PannerNode : AudioNode {
-    // Panning model
-    const unsigned short EQUALPOWER = 0;
-    const unsigned short HRTF = 1;
-    const unsigned short SOUNDFIELD = 2;
-
-    // Distance model
-    const unsigned short LINEAR_DISTANCE = 0;
-    const unsigned short INVERSE_DISTANCE = 1;
-    const unsigned short EXPONENTIAL_DISTANCE = 2;
-
     // Default model for stereo is HRTF 
-    [CustomSetter] attribute DOMString panningModel;
+    attribute PanningModelType panningModel;
 
     // Uses a 3D cartesian coordinate system 
     void setPosition(unrestricted float x, unrestricted float y, unrestricted float z);
@@ -46,7 +51,7 @@
     void setVelocity(unrestricted float x, unrestricted float y, unrestricted float z);
 
     // Distance model
-    [CustomSetter] attribute DOMString distanceModel;
+    attribute DistanceModelType distanceModel;
 
     attribute unrestricted double refDistance;
     attribute unrestricted double maxDistance;
index a2335c8..bb2a07d 100644 (file)
@@ -33,7 +33,6 @@
 #include "PeriodicWave.h"
 
 #include "FFTFrame.h"
-#include "OscillatorNode.h"
 #include "VectorMath.h"
 #include <algorithm>
 
@@ -57,28 +56,28 @@ Ref<PeriodicWave> PeriodicWave::create(float sampleRate, Float32Array& real, Flo
 Ref<PeriodicWave> PeriodicWave::createSine(float sampleRate)
 {
     Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
-    waveTable->generateBasicWaveform(OscillatorNode::SINE);
+    waveTable->generateBasicWaveform(Type::Sine);
     return waveTable;
 }
 
 Ref<PeriodicWave> PeriodicWave::createSquare(float sampleRate)
 {
     Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
-    waveTable->generateBasicWaveform(OscillatorNode::SQUARE);
+    waveTable->generateBasicWaveform(Type::Square);
     return waveTable;
 }
 
 Ref<PeriodicWave> PeriodicWave::createSawtooth(float sampleRate)
 {
     Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
-    waveTable->generateBasicWaveform(OscillatorNode::SAWTOOTH);
+    waveTable->generateBasicWaveform(Type::Sawtooth);
     return waveTable;
 }
 
 Ref<PeriodicWave> PeriodicWave::createTriangle(float sampleRate)
 {
     Ref<PeriodicWave> waveTable = adoptRef(*new PeriodicWave(sampleRate));
-    waveTable->generateBasicWaveform(OscillatorNode::TRIANGLE);
+    waveTable->generateBasicWaveform(Type::Triangle);
     return waveTable;
 }
 
@@ -213,7 +212,7 @@ void PeriodicWave::createBandLimitedTables(const float* realData, const float* i
     }
 }
 
-void PeriodicWave::generateBasicWaveform(int shape)
+void PeriodicWave::generateBasicWaveform(Type shape)
 {
     unsigned fftSize = periodicWaveSize();
     unsigned halfSize = fftSize / 2;
@@ -238,31 +237,26 @@ void PeriodicWave::generateBasicWaveform(int shape)
         // Calculate Fourier coefficients depending on the shape.
         // Note that the overall scaling (magnitude) of the waveforms is normalized in createBandLimitedTables().
         switch (shape) {
-        case OscillatorNode::SINE:
+        case Type::Sine:
             // Standard sine wave function.
             a = 0;
             b = (n == 1) ? 1 : 0;
             break;
-        case OscillatorNode::SQUARE:
+        case Type::Square:
             // Square-shaped waveform with the first half its maximum value and the second half its minimum value.
             a = 0;
             b = invOmega * ((n & 1) ? 2 : 0);
             break;
-        case OscillatorNode::SAWTOOTH:
+        case Type::Sawtooth:
             // Sawtooth-shaped waveform with the first half ramping from zero to maximum and the second half from minimum to zero.
             a = 0;
             b = -invOmega * cos(0.5 * omega);
             break;
-        case OscillatorNode::TRIANGLE:
+        case Type::Triangle:
             // Triangle-shaped waveform going from its maximum value to its minimum value then back to the maximum value.
             a = (4 - 4 * cos(0.5 * omega)) / (n * n * piFloat * piFloat);
             b = 0;
             break;
-        default:
-            ASSERT_NOT_REACHED();
-            a = 0;
-            b = 0;
-            break;
         }
 
         realP[n] = a;
index a50c435..9054b23 100644 (file)
@@ -63,9 +63,16 @@ public:
     float sampleRate() const { return m_sampleRate; }
 
 private:
+    enum class Type {
+        Sine,
+        Square,
+        Sawtooth,
+        Triangle,
+    };
+
     explicit PeriodicWave(float sampleRate);
 
-    void generateBasicWaveform(int);
+    void generateBasicWaveform(Type);
 
     float m_sampleRate;
     unsigned m_periodicWaveSize;
index a67ad56..474dcd5 100644 (file)
                FD7F299713D4C0CB00AD9535 /* WaveShaperProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = FD7F299013D4C0CB00AD9535 /* WaveShaperProcessor.h */; };
                FD82D7F713D4C8BD004E4372 /* JSWaveShaperNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD82D7F513D4C8BD004E4372 /* JSWaveShaperNode.cpp */; };
                FD82D7F813D4C8BD004E4372 /* JSWaveShaperNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */; };
-               FD8AA63C1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */; };
-               FD8AA63E169514A700D2EA68 /* JSPannerNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */; };
                FD8C46EB154608E700A5910C /* AudioScheduledSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */; };
                FD8C46EC154608E700A5910C /* AudioScheduledSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */; };
                FDA15E9D12B03EE1003A583A /* JSAudioBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */; };
                FDB052E01561A42C00B500D6 /* AudioSummingJunction.h in Headers */ = {isa = PBXBuildFile; fileRef = FDB052DE1561A42C00B500D6 /* AudioSummingJunction.h */; };
                FDB1700514A2BAB200A2B5D9 /* MultiChannelResampler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDB1700314A2BAB200A2B5D9 /* MultiChannelResampler.cpp */; };
                FDB1700614A2BAB200A2B5D9 /* MultiChannelResampler.h in Headers */ = {isa = PBXBuildFile; fileRef = FDB1700414A2BAB200A2B5D9 /* MultiChannelResampler.h */; };
-               FDBD1DFC167FE27D0051A11E /* JSOscillatorNodeCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDBD1DFB167FE27D0051A11E /* JSOscillatorNodeCustom.cpp */; };
                FDBD480C159BC6870093EB4F /* JSMediaStreamAudioSourceNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDBD480A159BC6870093EB4F /* JSMediaStreamAudioSourceNode.cpp */; };
                FDBD480D159BC6870093EB4F /* JSMediaStreamAudioSourceNode.h in Headers */ = {isa = PBXBuildFile; fileRef = FDBD480B159BC6870093EB4F /* JSMediaStreamAudioSourceNode.h */; };
                FDC54F041399B0DA008D9117 /* BiquadFilterNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDC54F011399B0DA008D9117 /* BiquadFilterNode.cpp */; };
                FD7F299013D4C0CB00AD9535 /* WaveShaperProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WaveShaperProcessor.h; sourceTree = "<group>"; };
                FD82D7F513D4C8BD004E4372 /* JSWaveShaperNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWaveShaperNode.cpp; sourceTree = "<group>"; };
                FD82D7F613D4C8BD004E4372 /* JSWaveShaperNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWaveShaperNode.h; sourceTree = "<group>"; };
-               FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBiquadFilterNodeCustom.cpp; sourceTree = "<group>"; };
-               FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPannerNodeCustom.cpp; sourceTree = "<group>"; };
                FD8C46E9154608E700A5910C /* AudioScheduledSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioScheduledSourceNode.cpp; sourceTree = "<group>"; };
                FD8C46EA154608E700A5910C /* AudioScheduledSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioScheduledSourceNode.h; sourceTree = "<group>"; };
                FDA15E8112B03EE1003A583A /* JSAudioBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBuffer.cpp; sourceTree = "<group>"; };
                FDB052DE1561A42C00B500D6 /* AudioSummingJunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AudioSummingJunction.h; sourceTree = "<group>"; };
                FDB1700314A2BAB200A2B5D9 /* MultiChannelResampler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MultiChannelResampler.cpp; sourceTree = "<group>"; };
                FDB1700414A2BAB200A2B5D9 /* MultiChannelResampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultiChannelResampler.h; sourceTree = "<group>"; };
-               FDBD1DFB167FE27D0051A11E /* JSOscillatorNodeCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOscillatorNodeCustom.cpp; sourceTree = "<group>"; };
                FDBD480A159BC6870093EB4F /* JSMediaStreamAudioSourceNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaStreamAudioSourceNode.cpp; sourceTree = "<group>"; };
                FDBD480B159BC6870093EB4F /* JSMediaStreamAudioSourceNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaStreamAudioSourceNode.h; sourceTree = "<group>"; };
                FDC54F011399B0DA008D9117 /* BiquadFilterNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BiquadFilterNode.cpp; sourceTree = "<group>"; };
                                FDEAAAF012B02EE400DCF33B /* JSAudioContextCustom.cpp */,
                                BE6DF70E171CA2DA00DD52B8 /* JSAudioTrackCustom.cpp */,
                                BE6DF710171CA2DA00DD52B8 /* JSAudioTrackListCustom.cpp */,
-                               FD8AA63B1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp */,
                                8931DE5A14C44C44000DC9D2 /* JSBlobCustom.cpp */,
                                49EED14B1051971900099FAB /* JSCanvasRenderingContext2DCustom.cpp */,
                                4659D2701D6B909F0096FD86 /* JSCanvasRenderingContext.h */,
                                1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */,
                                BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */,
                                AD20B18C18E9D216005A8083 /* JSNodeListCustom.h */,
-                               FDBD1DFB167FE27D0051A11E /* JSOscillatorNodeCustom.cpp */,
-                               FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */,
                                A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
                                418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */,
                                07DC5FD317D3EEE90099F890 /* JSRTCStatsResponseCustom.cpp */,
                                BC946346107A934B00857193 /* JSBeforeLoadEvent.cpp in Sources */,
                                70F546E8B8B5D7DC54EE144E /* JSBeforeUnloadEvent.cpp in Sources */,
                                FDF09DC81399B62200688E5B /* JSBiquadFilterNode.cpp in Sources */,
-                               FD8AA63C1695148E00D2EA68 /* JSBiquadFilterNodeCustom.cpp in Sources */,
                                2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */,
                                8931DE5B14C44C44000DC9D2 /* JSBlobCustom.cpp in Sources */,
                                14DCF3B21B6BE2080062D4C3 /* JSByteLengthQueuingStrategy.cpp in Sources */,
                                FDF6BAF8134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp in Sources */,
                                FDA9326616703BA9008982DC /* JSOfflineAudioContext.cpp in Sources */,
                                FDEA6242152102E200479DF0 /* JSOscillatorNode.cpp in Sources */,
-                               FDBD1DFC167FE27D0051A11E /* JSOscillatorNodeCustom.cpp in Sources */,
                                0704A40B1D6DFC690086DCDB /* JSOverconstrainedError.cpp in Sources */,
                                0704A4151D6F39FB0086DCDB /* JSOverconstrainedErrorEvent.cpp in Sources */,
                                1A0D57400A5C7867007EDD4C /* JSOverflowEvent.cpp in Sources */,
                                E1284BB210449FFA00EAEB52 /* JSPageTransitionEvent.cpp in Sources */,
                                FDA15EB112B03EE1003A583A /* JSPannerNode.cpp in Sources */,
-                               FD8AA63E169514A700D2EA68 /* JSPannerNodeCustom.cpp in Sources */,
                                E51A81DF17298D7700BFCA61 /* JSPerformance.cpp in Sources */,
                                CB38FD511CCF938900592A3F /* JSPerformanceEntry.cpp in Sources */,
                                CB38FD571CD21E2A00592A3F /* JSPerformanceEntryCustom.cpp in Sources */,
index 9b0e5a7..61a4be9 100644 (file)
@@ -68,41 +68,9 @@ EncodedJSValue JSC_HOST_CALL constructJSAudioContext(ExecState& exec)
         }
         if (!audioContext)
             return throwVMError(&exec, createSyntaxError(&exec, "audio resources unavailable for AudioContext construction"));
-    } else {
-#if ENABLE(LEGACY_WEB_AUDIO)
-        // Constructor for offline (render-target) AudioContext which renders into an AudioBuffer.
-        // new AudioContext(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate);
-        document.addConsoleMessage(MessageSource::JS, MessageLevel::Warning, ASCIILiteral("Deprecated AudioContext constructor: use OfflineAudioContext instead"));
-
-        if (exec.argumentCount() < 3)
-            return throwVMError(&exec, createNotEnoughArgumentsError(&exec));
-
-        int32_t numberOfChannels = exec.uncheckedArgument(0).toInt32(&exec);
-        int32_t numberOfFrames = exec.uncheckedArgument(1).toInt32(&exec);
-        float sampleRate = exec.uncheckedArgument(2).toFloat(&exec);
-
-        if (numberOfChannels <= 0 || numberOfChannels > 10)
-            return throwVMError(&exec, createSyntaxError(&exec, "Invalid number of channels"));
-
-        if (numberOfFrames <= 0)
-            return throwVMError(&exec, createSyntaxError(&exec, "Invalid number of frames"));
-
-        if (sampleRate <= 0)
-            return throwVMError(&exec, createSyntaxError(&exec, "Invalid sample rate"));
-
-
-        ExceptionCode ec = 0;
-        audioContext = OfflineAudioContext::create(document, numberOfChannels, numberOfFrames, sampleRate, ec);
-        if (ec) {
-            setDOMException(&exec, ec);
-            return throwVMError(&exec, createSyntaxError(&exec, "Error creating OfflineAudioContext"));
-        }
-#else
+    } else
         return throwVMError(&exec, createSyntaxError(&exec, "Illegal AudioContext constructor"));
-#endif
-        if (!audioContext)
-            return throwVMError(&exec, createReferenceError(&exec, "Error creating AudioContext"));
-    }
+
     return JSValue::encode(CREATE_DOM_WRAPPER(jsConstructor->globalObject(), AudioContext, audioContext.releaseNonNull()));
 }
 
diff --git a/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp b/Source/WebCore/bindings/js/JSBiquadFilterNodeCustom.cpp
deleted file mode 100644 (file)
index 0d5d939..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2012, 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
- */
-
-#include "config.h"
-
-#if ENABLE(WEB_AUDIO)
-
-#include "JSBiquadFilterNode.h"
-
-#include "BiquadFilterNode.h"
-#include "ExceptionCode.h"
-#include <runtime/Error.h>
-#include <runtime/JSCJSValueInlines.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSBiquadFilterNode::setType(ExecState& state, JSValue value)
-{
-#if ENABLE(LEGACY_WEB_AUDIO)
-    if (value.isNumber()) {
-        uint32_t type = value.toUInt32(&state);
-        if (!wrapped().setType(type))
-            throwTypeError(&state, "Illegal BiquadFilterNode type");
-        return;
-    }
-#endif
-
-    if (value.isString()) {
-        String type = value.toString(&state)->value(&state);
-        if (type == "lowpass" || type == "highpass" || type == "bandpass" || type == "lowshelf" || type == "highshelf" || type == "peaking" || type == "notch" || type == "allpass") {
-            wrapped().setType(type);
-            return;
-        }
-    }
-    
-    throwTypeError(&state, "Illegal BiquadFilterNode type");
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEB_AUDIO)
diff --git a/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp b/Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp
deleted file mode 100644 (file)
index 7c9c676..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2012, 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
- */
-
-#include "config.h"
-
-#if ENABLE(WEB_AUDIO)
-
-#include "JSOscillatorNode.h"
-
-#include "ExceptionCode.h"
-#include "OscillatorNode.h"
-#include <runtime/Error.h>
-#include <runtime/JSCJSValueInlines.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSOscillatorNode::setType(ExecState& state, JSValue value)
-{
-    OscillatorNode& imp = wrapped();
-
-#if ENABLE(LEGACY_WEB_AUDIO)
-    if (value.isNumber()) {
-        uint32_t type = value.toUInt32(&state);
-        if (!imp.setType(type))
-            throwTypeError(&state, ASCIILiteral("Illegal OscillatorNode type"));
-        return;
-    }
-#endif
-
-    if (value.isString()) {
-        String type = value.toString(&state)->value(&state);
-        if (type == "sine" || type == "square" || type == "sawtooth" || type == "triangle") {
-            imp.setType(type);
-            return;
-        }
-    }
-    
-    throwTypeError(&state, ASCIILiteral("Illegal OscillatorNode type"));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEB_AUDIO)
diff --git a/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp b/Source/WebCore/bindings/js/JSPannerNodeCustom.cpp
deleted file mode 100644 (file)
index d60845b..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2012, 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. 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 INC. 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.
- */
-
-#include "config.h"
-
-#if ENABLE(WEB_AUDIO)
-
-#include "JSPannerNode.h"
-
-#include "ExceptionCode.h"
-#include "PannerNode.h"
-#include <runtime/Error.h>
-#include <runtime/JSCJSValueInlines.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-void JSPannerNode::setPanningModel(ExecState& state, JSValue value)
-{
-    PannerNode& imp = wrapped();
-
-#if ENABLE(LEGACY_WEB_AUDIO)
-    if (value.isNumber()) {
-        uint32_t model = value.toUInt32(&state);
-        if (!imp.setPanningModel(model))
-            throwTypeError(&state, ASCIILiteral("Illegal panningModel"));
-        return;
-    }
-#endif
-
-    if (value.isString()) {
-        String model = value.toString(&state)->value(&state);
-        if (model == "equalpower" || model == "HRTF" || model == "soundfield") {
-            imp.setPanningModel(model);
-            return;
-        }
-    }
-    
-    throwTypeError(&state, ASCIILiteral("Illegal panningModel"));
-}
-
-void JSPannerNode::setDistanceModel(ExecState& state, JSValue value)
-{
-    PannerNode& imp = wrapped();
-
-#if ENABLE(LEGACY_WEB_AUDIO)
-    if (value.isNumber()) {
-        uint32_t model = value.toUInt32(&state);
-        if (!imp.setDistanceModel(model))
-            throwTypeError(&state, ASCIILiteral("Illegal distanceModel"));
-        return;
-    }
-#endif
-
-    if (value.isString()) {
-        String model = value.toString(&state)->value(&state);
-        if (model == "linear" || model == "inverse" || model == "exponential") {
-            imp.setDistanceModel(model);
-            return;
-        }
-    }
-    
-    throwTypeError(&state, ASCIILiteral("Illegal distanceModel"));
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(WEB_AUDIO)
index f7e6d79..fae212c 100644 (file)
@@ -38,7 +38,7 @@
 namespace WebCore {
 
 DistanceEffect::DistanceEffect()
-    : m_model(ModelInverse)
+    : m_model(DistanceModelType::Inverse)
     , m_isClamped(true)
     , m_refDistance(1.0)
     , m_maxDistance(10000.0)
@@ -56,11 +56,11 @@ double DistanceEffect::gain(double distance)
         distance = std::max(distance, m_refDistance);
 
     switch (m_model) {
-    case ModelLinear:
+    case DistanceModelType::Linear:
         return linearGain(distance);
-    case ModelInverse:
+    case DistanceModelType::Inverse:
         return inverseGain(distance);
-    case ModelExponential:
+    case DistanceModelType::Exponential:
         return exponentialGain(distance);
     }
     ASSERT_NOT_REACHED();
index 5f5e818..91d349b 100644 (file)
@@ -34,22 +34,22 @@ namespace WebCore {
 // Distance models are defined according to the OpenAL specification:
 // http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm.
 
+enum class DistanceModelType {
+    Linear,
+    Inverse,
+    Exponential
+};
+
 class DistanceEffect {
 public:
-    enum ModelType {
-        ModelLinear = 0,
-        ModelInverse = 1,
-        ModelExponential = 2
-    };
-
     DistanceEffect();
 
     // Returns scalar gain for the given distance the current distance model is used
     double gain(double distance);
 
-    ModelType model() { return m_model; }
+    DistanceModelType model() { return m_model; }
 
-    void setModel(ModelType model, bool clamped)
+    void setModel(DistanceModelType model, bool clamped)
     {
         m_model = model;
         m_isClamped = clamped;
@@ -69,7 +69,7 @@ protected:
     double inverseGain(double distance);
     double exponentialGain(double distance);
 
-    ModelType m_model;
+    DistanceModelType m_model;
     bool m_isClamped;
     double m_refDistance;
     double m_maxDistance;
index 986a9bd..5640282 100644 (file)
@@ -39,7 +39,7 @@ const float SmoothingTimeConstant = 0.050f;
 namespace WebCore {
 
 EqualPowerPanner::EqualPowerPanner(float sampleRate)
-    : Panner(PanningModelEqualPower)
+    : Panner(PanningModelType::Equalpower)
     , m_isFirstRender(true)
     , m_gainL(0.0)
     , m_gainR(0.0)
index a4a2666..cd304c6 100644 (file)
@@ -45,7 +45,7 @@ const int UninitializedAzimuth = -1;
 const unsigned RenderingQuantum = 128;
 
 HRTFPanner::HRTFPanner(float sampleRate, HRTFDatabaseLoader* databaseLoader)
-    : Panner(PanningModelHRTF)
+    : Panner(PanningModelType::HRTF)
     , m_databaseLoader(databaseLoader)
     , m_sampleRate(sampleRate)
     , m_crossfadeSelection(CrossfadeSelection1)
index df36fc7..ac7286a 100644 (file)
 
 namespace WebCore {
 
-std::unique_ptr<Panner> Panner::create(PanningModel model, float sampleRate, HRTFDatabaseLoader* databaseLoader)
+std::unique_ptr<Panner> Panner::create(PanningModelType model, float sampleRate, HRTFDatabaseLoader* databaseLoader)
 {
     std::unique_ptr<Panner> panner;
 
     switch (model) {
-    case PanningModelEqualPower:
+    case PanningModelType::Equalpower:
         panner = std::make_unique<EqualPowerPanner>(sampleRate);
         break;
 
-    case PanningModelHRTF:
+    case PanningModelType::HRTF:
         panner = std::make_unique<HRTFPanner>(sampleRate, databaseLoader);
         break;
-
-    // FIXME: sound field panning is not yet implemented...
-    case PanningModelSoundField:
-    default:
-        ASSERT_NOT_REACHED();
-        return nullptr;
     }
 
     return panner;
index 4a82f0c..2700c4c 100644 (file)
@@ -36,23 +36,20 @@ namespace WebCore {
 class AudioBus;
 class HRTFDatabaseLoader;
 
+enum class PanningModelType {
+    Equalpower,
+    HRTF
+};
+
 // Abstract base class for panning a mono or stereo source.
 
 class Panner {
 public:
-    enum {
-        PanningModelEqualPower = 0,
-        PanningModelHRTF = 1,
-        PanningModelSoundField = 2
-    };
-    
-    typedef unsigned PanningModel;
-
-    static std::unique_ptr<Panner> create(PanningModel, float sampleRate, HRTFDatabaseLoader*);
+    static std::unique_ptr<Panner> create(PanningModelType, float sampleRate, HRTFDatabaseLoader*);
 
     virtual ~Panner() { };
 
-    PanningModel panningModel() const { return m_panningModel; }
+    PanningModelType panningModel() const { return m_panningModel; }
 
     virtual void pan(double azimuth, double elevation, const AudioBus* inputBus, AudioBus* outputBus, size_t framesToProcess) = 0;
 
@@ -62,9 +59,12 @@ public:
     virtual double latencyTime() const = 0;
 
 protected:
-    Panner(PanningModel model) : m_panningModel(model) { }
+    Panner(PanningModelType model)
+        : m_panningModel(model)
+    {
+    }
 
-    PanningModel m_panningModel;
+    PanningModelType m_panningModel;
 };
 
 } // namespace WebCore
index 4005695..b3aa942 100644 (file)
@@ -1,3 +1,13 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/FeatureDefines.xcconfig:
+        Remove ENABLE_LEGACY_WEB_AUDIO
+
 2016-08-25  Anders Carlsson  <andersca@apple.com>
 
         Re-export DOMException NSStrings after r204717
index 5f64334..a673951 100644 (file)
@@ -125,7 +125,6 @@ ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
 ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
 ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
-ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO;
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 ENABLE_LINK_PREFETCH = ;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -201,4 +200,4 @@ ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
 
 ENABLE_CUSTOM_ELEMENTS = ENABLE_CUSTOM_ELEMENTS;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index 50fbba0..b6d7e04 100644 (file)
@@ -1,3 +1,13 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * Configurations/FeatureDefines.xcconfig:
+        Remove ENABLE_LEGACY_WEB_AUDIO.
+
 2016-08-26  Anders Carlsson  <andersca@apple.com>
 
         Get rid of NetworkResourceLoader::sendAbortingOnFailure
index 5f64334..a673951 100644 (file)
@@ -125,7 +125,6 @@ ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
 ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
 ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
-ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO;
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 ENABLE_LINK_PREFETCH = ;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -201,4 +200,4 @@ ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
 
 ENABLE_CUSTOM_ELEMENTS = ENABLE_CUSTOM_ELEMENTS;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
index cd8293a..3114a39 100644 (file)
@@ -162,7 +162,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FULLSCREEN_API PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INDEXED_DATABASE_IN_WORKERS PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEB_AUDIO PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CONTROLS_SCRIPT PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NOTIFICATIONS PRIVATE ON)
index 0d78741..eb94d36 100644 (file)
@@ -57,7 +57,6 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_IOS_TEXT_AUTOSIZING PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CSS_VENDOR_PREFIXES PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_NOTIFICATIONS PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_VENDOR_PREFIXES PRIVATE ON)
-WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_WEB_AUDIO PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LETTERPRESS PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LINK_PREFETCH PRIVATE OFF)
 
index 56827e4..7be2160 100644 (file)
@@ -142,7 +142,6 @@ macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_CSS_VENDOR_PREFIXES "Toggle legacy css vendor prefix support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_NOTIFICATIONS "Toggle Legacy Desktop Notifications Support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_VENDOR_PREFIXES "Toggle Legacy Vendor Prefix Support" PRIVATE ON)
-    WEBKIT_OPTION_DEFINE(ENABLE_LEGACY_WEB_AUDIO "Toggle Legacy Web Audio support" PRIVATE ON)
     WEBKIT_OPTION_DEFINE(ENABLE_LETTERPRESS "Toggle letterpress support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_LINK_PREFETCH "Toggle pre fetching support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_MAC_LONG_PRESS "Toggle mac long press support" PRIVATE OFF)
@@ -212,7 +211,6 @@ macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEPEND(ENABLE_DFG_JIT ENABLE_JIT)
     WEBKIT_OPTION_DEPEND(ENABLE_FTL_JIT ENABLE_DFG_JIT)
     WEBKIT_OPTION_DEPEND(ENABLE_SAMPLING_PROFILER ENABLE_JIT)
-    WEBKIT_OPTION_DEPEND(ENABLE_LEGACY_WEB_AUDIO ENABLE_WEB_AUDIO)
     WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_CONTROLS_SCRIPT ENABLE_VIDEO)
     WEBKIT_OPTION_DEPEND(ENABLE_MEDIA_SOURCE ENABLE_VIDEO)
     WEBKIT_OPTION_DEPEND(ENABLE_VIDEO_TRACK ENABLE_VIDEO)
index 69a49a6..e2748d3 100644 (file)
@@ -1,3 +1,12 @@
+2016-08-26  Sam Weinig  <sam@webkit.org>
+
+        Remove support for ENABLE_LEGACY_WEB_AUDIO
+        https://bugs.webkit.org/show_bug.cgi?id=161262
+
+        Reviewed by Anders Carlsson.
+
+        * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
+
 2016-08-26  Jer Noble  <jer.noble@apple.com>
 
         Add a test harness for running UI tests on the iOS Simulator
index 5f64334..a673951 100644 (file)
@@ -125,7 +125,6 @@ ENABLE_IOS_TOUCH_EVENTS_ios_WITH_INTERNAL_SDK_YES = ENABLE_IOS_TOUCH_EVENTS;
 ENABLE_LEGACY_CSS_VENDOR_PREFIXES = ENABLE_LEGACY_CSS_VENDOR_PREFIXES;
 ENABLE_LEGACY_NOTIFICATIONS[sdk=macosx*] = ENABLE_LEGACY_NOTIFICATIONS;
 ENABLE_LEGACY_VENDOR_PREFIXES = ENABLE_LEGACY_VENDOR_PREFIXES;
-ENABLE_LEGACY_WEB_AUDIO = ENABLE_LEGACY_WEB_AUDIO;
 ENABLE_LETTERPRESS[sdk=iphone*] = ENABLE_LETTERPRESS;
 ENABLE_LINK_PREFETCH = ;
 ENABLE_MATHML = ENABLE_MATHML;
@@ -201,4 +200,4 @@ ENABLE_FTL_JIT[sdk=iphoneos*] = ENABLE_FTL_JIT;
 
 ENABLE_CUSTOM_ELEMENTS = ENABLE_CUSTOM_ELEMENTS;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_APPLE_PAY) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_AVF_CAPTIONS) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_CSS3_TEXT) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_ELEMENTS) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DATACUE_VALUE) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ES6_MODULES) $(ENABLE_FETCH_API) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FTL_JIT) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_JIT) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CAPTURE) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RESOURCE_USAGE) $(ENABLE_RUBBER_BANDING) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO_PRESENTATION_MODE) $(ENABLE_VIDEO_TRACK) $(ENABLE_VIDEO) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEB_ANIMATIONS) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_XSLT);