Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd2e7a8e authored by Andy Hung's avatar Andy Hung
Browse files

Effects: Fix multichannel accumulate when disabled

Ensure all channels are accumulated.

Test: Use 4ch USB device, play MP3 with effects, see bug
Bug: 115693755
Change-Id: Ic1eb04dcff34284b3fff67266874eca41a43e523
parent fec151ed
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -309,8 +309,8 @@ void AudioFlinger::EffectModule::process()
    // input and output effect buffers without an intermediary effect process.
    // TODO: consider implementing channel conversion.
    const size_t safeInputOutputSampleCount =
            inChannelCount != outChannelCount ? 0
                    : outChannelCount * std::min(
            mInChannelCountRequested != mOutChannelCountRequested ? 0
                    : mOutChannelCountRequested * std::min(
                            mConfig.inputCfg.buffer.frameCount,
                            mConfig.outputCfg.buffer.frameCount);
    const auto accumulateInputToOutput = [this, safeInputOutputSampleCount]() {