| Index: Source/modules/webaudio/ChannelMergerNode.cpp
|
| diff --git a/Source/modules/webaudio/ChannelMergerNode.cpp b/Source/modules/webaudio/ChannelMergerNode.cpp
|
| index b57c729cd7c39693e473b532d17f1fe4627ccadd..43b86b4d389853bc9fef2c31e99fcc21226bb31e 100644
|
| --- a/Source/modules/webaudio/ChannelMergerNode.cpp
|
| +++ b/Source/modules/webaudio/ChannelMergerNode.cpp
|
| @@ -44,8 +44,8 @@ PassRefPtr<ChannelMergerNode> ChannelMergerNode::create(AudioContext* context, f
|
| {
|
| if (!numberOfInputs || numberOfInputs > AudioContext::maxNumberOfChannels())
|
| return 0;
|
| -
|
| - return adoptRef(new ChannelMergerNode(context, sampleRate, numberOfInputs));
|
| +
|
| + return adoptRef(new ChannelMergerNode(context, sampleRate, numberOfInputs));
|
| }
|
|
|
| ChannelMergerNode::ChannelMergerNode(AudioContext* context, float sampleRate, unsigned numberOfInputs)
|
| @@ -73,25 +73,25 @@ void ChannelMergerNode::process(size_t framesToProcess)
|
| output->bus()->zero();
|
| return;
|
| }
|
| -
|
| +
|
| // Merge all the channels from all the inputs into one output.
|
| unsigned outputChannelIndex = 0;
|
| for (unsigned i = 0; i < numberOfInputs(); ++i) {
|
| AudioNodeInput* input = this->input(i);
|
| if (input->isConnected()) {
|
| unsigned numberOfInputChannels = input->bus()->numberOfChannels();
|
| -
|
| +
|
| // Merge channels from this particular input.
|
| for (unsigned j = 0; j < numberOfInputChannels; ++j) {
|
| AudioChannel* inputChannel = input->bus()->channel(j);
|
| AudioChannel* outputChannel = output->bus()->channel(outputChannelIndex);
|
| outputChannel->copyFrom(inputChannel);
|
| -
|
| +
|
| ++outputChannelIndex;
|
| }
|
| }
|
| }
|
| -
|
| +
|
| ASSERT(outputChannelIndex == output->numberOfChannels());
|
| }
|
|
|
|
|