mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 890023 - Set the output channel count for ConvolverNode to 2 unconditionally; r=roc
This commit is contained in:
parent
75ac2d35d5
commit
3e21182565
@ -116,24 +116,21 @@ public:
|
||||
}
|
||||
|
||||
mSeenInput = true;
|
||||
uint32_t numChannels = 2;
|
||||
AudioChunk input = aInput;
|
||||
if (aInput.IsNull()) {
|
||||
AllocateAudioBlock(1, &input);
|
||||
WriteZeroesToAudioBlock(&input, 0, WEBAUDIO_BLOCK_SIZE);
|
||||
} else if (aInput.mVolume != 1.0f) {
|
||||
// Pre-multiply the input's volume
|
||||
numChannels = aInput.mChannelData.Length();
|
||||
uint32_t numChannels = aInput.mChannelData.Length();
|
||||
AllocateAudioBlock(numChannels, &input);
|
||||
for (uint32_t i = 0; i < numChannels; ++i) {
|
||||
const float* src = static_cast<const float*>(aInput.mChannelData[i]);
|
||||
float* dest = static_cast<float*>(const_cast<void*>(input.mChannelData[i]));
|
||||
AudioBlockAddChannelWithScale(src, aInput.mVolume, dest);
|
||||
}
|
||||
} else {
|
||||
numChannels = aInput.mChannelData.Length();
|
||||
}
|
||||
AllocateAudioBlock(numChannels, aOutput);
|
||||
AllocateAudioBlock(2, aOutput);
|
||||
|
||||
mReverb->process(&input, aOutput, WEBAUDIO_BLOCK_SIZE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user