Set default channel count for AnalyserNode to 2

This was deliberately changed
(https://github.com/WebAudio/web-audio-api/pull/1397 ) but the tests
have not been updated
This commit is contained in:
Manish Goregaokar 2018-09-14 18:29:11 +05:30
parent f3efd14975
commit e9be179952
5 changed files with 8 additions and 27 deletions

View file

@ -38,7 +38,7 @@ impl AnalyserNode {
options: &AnalyserOptions, options: &AnalyserOptions,
) -> Fallible<(AnalyserNode, IpcReceiver<Block>)> { ) -> Fallible<(AnalyserNode, IpcReceiver<Block>)> {
let node_options = options.parent let node_options = options.parent
.unwrap_or(1, ChannelCountMode::Max, .unwrap_or(2, ChannelCountMode::Max,
ChannelInterpretation::Speakers); ChannelInterpretation::Speakers);
if options.fftSize > 32768 || options.fftSize < 32 || if options.fftSize > 32768 || options.fftSize < 32 ||

View file

@ -658118,7 +658118,7 @@
"support" "support"
], ],
"webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html": [ "webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html": [
"4e27f842ddeda3e2bdd78da7b8ee3f67062d1a9f", "a9aa4831516c6a5cefa7c8b4f67f3ef246d24777",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html": [ "webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html": [
@ -658150,7 +658150,7 @@
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [ "webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [
"52d3829cff3dfceef64a34669bc8e0d6e08883a9", "a8b5a7154e94479460c1085c6b5cb584e9b6976c",
"testharness" "testharness"
], ],
"webaudio/the-audio-api/the-audiobuffer-interface/.gitkeep": [ "webaudio/the-audio-api/the-audiobuffer-interface/.gitkeep": [

View file

@ -1,19 +0,0 @@
[ctor-analyser.html]
[X node0 = new AnalyserNode(context) incorrectly threw TypeError: "window[name\] is not a constructor".]
expected: FAIL
[X node0.channelCount is not equal to 1. Got 2.]
expected: FAIL
[# AUDIT TASK RUNNER FINISHED: 1 out of 7 tasks were failed.]
expected: FAIL
[< [default constructor\] 2 out of 12 assertions were failed.]
expected: FAIL
[X node0.smoothingTimeConstant is not equal to 0.8. Got 0.800000011920929.]
expected: FAIL
[< [default constructor\] 1 out of 12 assertions were failed.]
expected: FAIL

View file

@ -32,7 +32,7 @@
prefix: prefix, prefix: prefix,
numberOfInputs: 1, numberOfInputs: 1,
numberOfOutputs: 1, numberOfOutputs: 1,
channelCount: 1, channelCount: 2,
channelCountMode: 'max', channelCountMode: 'max',
channelInterpretation: 'speakers' channelInterpretation: 'speakers'
}); });

View file

@ -27,8 +27,8 @@
assert_equals( assert_equals(
analyser.channelCount, analyser.channelCount,
1, 2,
"analyser node has 1 input channels by default" "analyser node has 2 input channels by default"
); );
assert_equals( assert_equals(
analyser.channelCountMode, analyser.channelCountMode,
@ -131,8 +131,8 @@
var analyser = new AnalyserNode(context); var analyser = new AnalyserNode(context);
assert_equals( assert_equals(
analyser.channelCount, analyser.channelCount,
1, 2,
"analyser node has 1 input channels by default" "analyser node has 2 input channels by default"
); );
assert_equals( assert_equals(
analyser.channelCountMode, analyser.channelCountMode,