mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 875529 - Correctly reserve some extra junk at the end of the down-mixing buffer; r=roc
CUSTOM_CHANNEL_LAYOUTS is 6, and we use the index 6 to denote channels that must be ignored, therefore we need an array of 7 values here.
This commit is contained in:
parent
5102ce7d5f
commit
9cb95ec93a
@ -179,8 +179,8 @@ AudioChannelsDownMix(const nsTArray<const void*>& aChannelArray,
|
||||
for (uint32_t s = 0; s < aDuration; ++s) {
|
||||
// Reserve an extra junk channel at the end for the cases where we
|
||||
// want an input channel to contribute to nothing
|
||||
float outputChannels[CUSTOM_CHANNEL_LAYOUTS];
|
||||
memset(outputChannels, 0, sizeof(float)*(CUSTOM_CHANNEL_LAYOUTS - 1));
|
||||
float outputChannels[CUSTOM_CHANNEL_LAYOUTS + 1];
|
||||
memset(outputChannels, 0, sizeof(float)*(CUSTOM_CHANNEL_LAYOUTS));
|
||||
for (uint32_t c = 0; c < inputChannelCount; ++c) {
|
||||
outputChannels[m.mInputDestination[c]] +=
|
||||
m.mInputCoefficient[c]*(static_cast<const float*>(inputChannels[c]))[s];
|
||||
|
Loading…
Reference in New Issue
Block a user