Skip to content

Commit

Permalink
Set default channel count for AnalyserNode to 2
Browse files Browse the repository at this point in the history
This was deliberately changed
(WebAudio/web-audio-api#1397 ) but the tests
have not been updated
  • Loading branch information
Manishearth committed Sep 18, 2018
1 parent f3efd14 commit e9be179
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 27 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/analysernode.rs
Expand Up @@ -38,7 +38,7 @@ impl AnalyserNode {
options: &AnalyserOptions,
) -> Fallible<(AnalyserNode, IpcReceiver<Block>)> {
let node_options = options.parent
.unwrap_or(1, ChannelCountMode::Max,
.unwrap_or(2, ChannelCountMode::Max,
ChannelInterpretation::Speakers);

if options.fftSize > 32768 || options.fftSize < 32 ||
Expand Down
4 changes: 2 additions & 2 deletions tests/wpt/metadata/MANIFEST.json
Expand Up @@ -658118,7 +658118,7 @@
"support"
],
"webaudio/the-audio-api/the-analysernode-interface/ctor-analyser.html": [
"4e27f842ddeda3e2bdd78da7b8ee3f67062d1a9f",
"a9aa4831516c6a5cefa7c8b4f67f3ef246d24777",
"testharness"
],
"webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-basic.html": [
Expand Down Expand Up @@ -658150,7 +658150,7 @@
"testharness"
],
"webaudio/the-audio-api/the-analysernode-interface/test-analysernode.html": [
"52d3829cff3dfceef64a34669bc8e0d6e08883a9",
"a8b5a7154e94479460c1085c6b5cb584e9b6976c",
"testharness"
],
"webaudio/the-audio-api/the-audiobuffer-interface/.gitkeep": [
Expand Down

This file was deleted.

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

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

0 comments on commit e9be179

Please sign in to comment.