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

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

Effects: Fix write mode for disabled effects

This case is generally not encountered; we are fixing this
to ensure correctness for future code.

Test: No regression with MP3 effects and solo tester
Bug:118775810
Change-Id: I016e23101d42ffeee1e66102b6f6276f17c47684
parent dd2e7a8e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -480,7 +480,12 @@ void AudioFlinger::EffectModule::process()
        // accumulate input onto output
        sp<EffectChain> chain = mChain.promote();
        if (chain.get() != nullptr && chain->activeTrackCnt() != 0) {
            // similar handling with data_bypass above.
            if (mConfig.outputCfg.accessMode == EFFECT_BUFFER_ACCESS_ACCUMULATE) {
                accumulateInputToOutput();
            } else { // EFFECT_BUFFER_ACCESS_WRITE
                copyInputToOutput();
            }
        }
    }
}