Commit 6a69dd6c authored by Raymond Toy's avatar Raymond Toy Committed by Commit Bot

DynamicsCompressor.channelCountMode is 'clamped-max'

As mentioned in the spec (https://webaudio.github.io/web-audio-api/#dynamicscompressornode),
the channelCountMode defaults to "clamped-max", not "max".  Make it so.

Bug: 835946
Test: webaudio/constructor/dynamicscompressor.html
Change-Id: I8aee3336a89ff5662ecbe7afee1793cb94184169
Reviewed-on: https://chromium-review.googlesource.com/1024791
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553252}
parent b8f8abed
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
numberOfInputs: 1, numberOfInputs: 1,
numberOfOutputs: 1, numberOfOutputs: 1,
channelCount: 2, channelCount: 2,
channelCountMode: 'max', channelCountMode: 'clamped-max',
channelInterpretation: 'speakers' channelInterpretation: 'speakers'
}); });
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
should(node.channelCount, 'node1.channelCount').beEqualTo(2); should(node.channelCount, 'node1.channelCount').beEqualTo(2);
should(node.channelCountMode, 'node1.channelCountMode') should(node.channelCountMode, 'node1.channelCountMode')
.beEqualTo('max'); .beEqualTo('clamped-max');
should(node.channelInterpretation, 'node1.channelInterpretation') should(node.channelInterpretation, 'node1.channelInterpretation')
.beEqualTo('speakers'); .beEqualTo('speakers');
......
...@@ -54,6 +54,9 @@ DynamicsCompressorHandler::DynamicsCompressorHandler( ...@@ -54,6 +54,9 @@ DynamicsCompressorHandler::DynamicsCompressorHandler(
release_(&release) { release_(&release) {
AddInput(); AddInput();
AddOutput(defaultNumberOfOutputChannels); AddOutput(defaultNumberOfOutputChannels);
SetInternalChannelCountMode(kClampedMax);
Initialize(); Initialize();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment