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

Commit 4d2cb59a authored by Nie Wei Feng's avatar Nie Wei Feng Committed by Andy Hung
Browse files

EffectChain: fix removeEffect_l for global aux effects

Causes output stuttering with global aux effects such as environmental reverb.

Test: see bug
Bug: 284258913
Change-Id: I32132f3b52c655ab350715df7097d63adc0ce9c3
parent 792f4484
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2447,7 +2447,8 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect,

            // make sure the input buffer configuration for the new first effect in the chain
            // is updated if needed (can switch from HAL channel mask to mixer channel mask)
            if (i == 0 && size > 1) {
            if (type != EFFECT_FLAG_TYPE_AUXILIARY // TODO(b/284522658) breaks for aux FX, why?
                    && i == 0 && size > 1) {
                mEffects[0]->configure();
                mEffects[0]->setInBuffer(mInBuffer);
                mEffects[0]->updateAccessMode();      // reconfig if neeeded.