Skip to content

Commit 0cfb87a

Browse files
author
Sam Weinig
committed
Remove support for ENABLE_LEGACY_WEB_AUDIO
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. Canonical link: https://commits.webkit.org/179440@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 5023ca9 commit 0cfb87a

115 files changed

Lines changed: 551 additions & 1215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LayoutTests/ChangeLog

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,80 @@
1+
2016-08-26 Sam Weinig <sam@webkit.org>
2+
3+
Remove support for ENABLE_LEGACY_WEB_AUDIO
4+
https://bugs.webkit.org/show_bug.cgi?id=161262
5+
6+
Reviewed by Anders Carlsson.
7+
8+
* webaudio/audiobuffersource-loop-points.html:
9+
* webaudio/audiobuffersource-multi-channels.html:
10+
* webaudio/audiobuffersource-playbackState-expected.txt:
11+
* webaudio/audiobuffersource-playbackState.html:
12+
* webaudio/audiobuffersource-playbackrate.html:
13+
* webaudio/audiochannelmerger-stereo.html:
14+
* webaudio/audiochannelsplitter.html:
15+
* webaudio/audionode-connect-order.html:
16+
* webaudio/audionode-expected.txt:
17+
* webaudio/audionode.html:
18+
* webaudio/audioparam-connect-audioratesignal.html:
19+
* webaudio/audioparam-summingjunction.html:
20+
* webaudio/audioprocessingevent.html:
21+
* webaudio/automatic-pull-node.html:
22+
* webaudio/biquad-allpass.html:
23+
* webaudio/biquad-bandpass.html:
24+
* webaudio/biquad-getFrequencyResponse.html:
25+
* webaudio/biquad-highpass.html:
26+
* webaudio/biquad-highshelf.html:
27+
* webaudio/biquad-lowpass.html:
28+
* webaudio/biquad-lowshelf.html:
29+
* webaudio/biquad-notch.html:
30+
* webaudio/biquad-peaking.html:
31+
* webaudio/biquadfilternode-basic-expected.txt:
32+
* webaudio/biquadfilternode-basic.html:
33+
* webaudio/convolution-mono-mono.html:
34+
* webaudio/delaynode-max-default-delay.html:
35+
* webaudio/delaynode-max-nondefault-delay.html:
36+
* webaudio/delaynode-maxdelay.html:
37+
* webaudio/delaynode-scheduling.html:
38+
* webaudio/delaynode.html:
39+
* webaudio/distance-exponential-expected.txt:
40+
* webaudio/distance-exponential.html:
41+
* webaudio/distance-inverse-expected.txt:
42+
* webaudio/distance-inverse.html:
43+
* webaudio/distance-linear-expected.txt:
44+
* webaudio/distance-linear.html:
45+
* webaudio/gain-basic.html:
46+
* webaudio/gain.html:
47+
* webaudio/javascriptaudionode-zero-input-channels.html:
48+
* webaudio/javascriptaudionode.html:
49+
* webaudio/mixing.html:
50+
* webaudio/note-grain-on-play-expected.txt: Removed.
51+
* webaudio/note-grain-on-play.html: Removed.
52+
* webaudio/note-grain-on-timing-expected.txt: Removed.
53+
* webaudio/note-grain-on-timing.html: Removed.
54+
* webaudio/oscillator-basic-expected.txt:
55+
* webaudio/oscillator-basic.html:
56+
* webaudio/oscillator-custom.html:
57+
* webaudio/oscillator-sawtooth.html:
58+
* webaudio/oscillator-sine.html:
59+
* webaudio/oscillator-square.html:
60+
* webaudio/oscillator-triangle.html:
61+
* webaudio/pannernode-basic-expected.txt:
62+
* webaudio/pannernode-basic.html:
63+
* webaudio/resources/audio-testing.js:
64+
* webaudio/resources/audioparam-testing.js:
65+
* webaudio/resources/biquad-testing.js:
66+
* webaudio/resources/distance-model-testing.js:
67+
* webaudio/resources/javascriptaudionode-testing.js:
68+
* webaudio/resources/oscillator-testing.js:
69+
* webaudio/resources/panner-model-testing.js:
70+
* webaudio/sample-accurate-scheduling.html:
71+
* webaudio/stereo2mono-down-mixing.html:
72+
* webaudio/up-mixing-mono-51.html:
73+
* webaudio/up-mixing-mono-stereo.html:
74+
* webaudio/up-mixing-stereo-51.html:
75+
* webaudio/waveshaper.html:
76+
Update tests for removal of ENABLE_LEGACY_WEB_AUDIO.
77+
178
2016-08-23 Ryosuke Niwa <rniwa@webkit.org>
279

380
Adopted custom element's callbacks should continue to work

LayoutTests/webaudio/audiobuffersource-loop-points.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
source.buffer = buffer;
5656
source.playbackRate.value = playbackRate;
5757

58-
var gainNode = context.createGainNode();
58+
var gainNode = context.createGain();
5959
source.connect(gainNode);
6060
gainNode.connect(context.destination);
6161

LayoutTests/webaudio/audiobuffersource-multi-channels.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
source.buffer = toneBuffer;
3131

3232
source.connect(context.destination);
33-
source.noteOn(0);
33+
source.start(0);
3434

3535
context.oncomplete = finishAudioTest;
3636
context.startRendering();

LayoutTests/webaudio/audiobuffersource-playbackState-expected.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ PASS UNSCHEDULED_STATE Source has been created
77
PASS SCHEDULED_STATE 3 second source scheduled to start at time 3
88
PASS PLAYING_STATE 2 second source starting at time 1
99
PASS FINISHED_STATE 1.25 second source starting at time 0
10-
PASS SCHEDULED_STATE 1 second grain scheduled to start at time 3
11-
PASS PLAYING_STATE 2 second grain starting at time 0.5
12-
PASS FINISHED_STATE 1 second grain starting at time 0.5
1310
PASS SCHEDULED_STATE a looping 0.5 second source scheduled at time 3
1411
PASS PLAYING_STATE a looping 0.5 second source starting at time 1.25
15-
PASS 3 are currently playing as expected.
12+
PASS 2 are currently playing as expected.
1613
PASS activeSourceCount and playbackState tests succeeded.
1714
PASS successfullyParsed is true
1815

LayoutTests/webaudio/audiobuffersource-playbackState.html

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -121,49 +121,32 @@
121121
bufferSource.UNSCHEDULED_STATE,
122122
"Source has been created");
123123

124-
// Test noteOn.
124+
// Test start.
125125

126126
createTest(3,
127-
function(s) { s.noteOn(renderTime + 1); },
127+
function(s) { s.start(renderTime + 1); },
128128
bufferSource.SCHEDULED_STATE,
129129
"3 second source scheduled to start at time " + (renderTime + 1));
130130

131131
createTest(2,
132-
function(s) { s.noteOn(1); },
132+
function(s) { s.start(1); },
133133
bufferSource.PLAYING_STATE,
134134
"2 second source starting at time 1");
135135

136136
createTest(1.25,
137-
function(s) { s.noteOn(0); },
137+
function(s) { s.start(0); },
138138
bufferSource.FINISHED_STATE,
139139
"1.25 second source starting at time 0");
140140

141-
// Test noteGrainOn.
142-
143-
createTest(3,
144-
function(s) { s.noteGrainOn(renderTime + 1, 0, 1); },
145-
bufferSource.SCHEDULED_STATE,
146-
"1 second grain scheduled to start at time " + (renderTime + 1));
147-
148-
createTest(3,
149-
function(s) { s.noteGrainOn(0.5, 0, 2); },
150-
bufferSource.PLAYING_STATE,
151-
"2 second grain starting at time 0.5");
152-
153-
createTest(3,
154-
function(s) { s.noteGrainOn(0.5, 0, 1); },
155-
bufferSource.FINISHED_STATE,
156-
"1 second grain starting at time 0.5");
157-
158141
// Test looping source
159142

160143
createTest(0.5,
161-
function(s) { s.loop = true; s.noteOn(renderTime + 1); },
144+
function(s) { s.loop = true; s.start(renderTime + 1); },
162145
bufferSource.SCHEDULED_STATE,
163146
"a looping 0.5 second source scheduled at time " + (renderTime + 1));
164147

165148
createTest(0.5,
166-
function(s) { s.loop = true; s.noteOn(1.25); },
149+
function(s) { s.loop = true; s.start(1.25); },
167150
bufferSource.PLAYING_STATE,
168151
"a looping 0.5 second source starting at time 1.25");
169152

LayoutTests/webaudio/audiobuffersource-playbackrate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
source.buffer = sinWaveBuffer;
5050
source.playbackRate.value = playbackRate;
5151

52-
var gainNode = context.createGainNode();
52+
var gainNode = context.createGain();
5353
source.connect(gainNode);
5454
gainNode.connect(context.destination);
5555

LayoutTests/webaudio/audiochannelmerger-stereo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
channelMerger.connect(context.destination);
100100

101101
// Trigger both sources to start at the beginning.
102-
bufferSource1.noteOn(0);
103-
bufferSource2.noteOn(0);
102+
bufferSource1.start(0);
103+
bufferSource2.start(0);
104104

105105
context.oncomplete = checkResult;
106106
context.startRendering();

LayoutTests/webaudio/audiochannelsplitter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
channelSplitter.connect(channelMerger, 0, 1);
154154
channelSplitter.connect(channelMerger, 1, 0);
155155

156-
sourceNode.noteOn(0);
156+
sourceNode.start(0);
157157

158158
context.oncomplete = checkResult;
159159
context.startRendering();

LayoutTests/webaudio/audionode-connect-order.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747
bufferSource.buffer = toneBuffer;
4848
bufferSource.connect(context.destination);
4949

50-
var delay = context.createDelayNode();
50+
var delay = context.createDelay();
5151
delay.delayTime.value = delayTimeSeconds;
5252

5353
// We connect delay node to gain node before anything is connected to delay node itself.
5454
// We do this because we try to trigger the ASSERT which might be fired due to AudioNode connection order,
5555
// especially when gain node and delay node is involved e.g. https://bugs.webkit.org/show_bug.cgi?id=76685.
5656

57-
var gain = context.createGainNode();
57+
var gain = context.createGain();
5858
gain.connect(context.destination);
5959
delay.connect(gain);
6060

61-
bufferSource.noteOn(0);
61+
bufferSource.start(0);
6262

6363
context.oncomplete = finishJSTest;
6464
context.startRendering();

LayoutTests/webaudio/audionode-expected.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
CONSOLE MESSAGE: line 98: Deprecated AudioContext constructor: use OfflineAudioContext instead
21
Basic tests for AudioNode API.
32

43
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
54

6-
PASS audioNode.noteOn() threw exception TypeError: Not enough arguments.
7-
PASS audioNode.noteGrainOn() threw exception TypeError: Not enough arguments.
8-
PASS audioNode.noteOff() threw exception TypeError: Not enough arguments.
95
PASS Source AudioNode has no inputs.
106
PASS Source AudioNode has one output.
117
PASS Destination AudioNode has one input.
@@ -15,7 +11,7 @@ PASS connect() exception thrown for illegal output index.
1511
PASS connect() exception thrown for illegal input index.
1612
PASS audioNode.connect(context.destination) succeeded.
1713
PASS exception thrown when connecting to other context's node.
18-
PASS exception thrown when creating audio context with not enough arguments.
14+
PASS exception thrown when creating audio context with too many arguments.
1915
PASS AudioNode is an EventTarget
2016
PASS successfullyParsed is true
2117

0 commit comments

Comments
 (0)