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

Commit a2340b30 authored by Jean-Michel Trivi's avatar Jean-Michel Trivi Committed by Android (Google) Code Review
Browse files

Merge "Don't call audio effect process on offloaded playback threads" into klp-dev

parents 0adc67df fed6292a
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1279,9 +1279,10 @@ void AudioFlinger::EffectChain::process_l()
    }
    bool isGlobalSession = (mSessionId == AUDIO_SESSION_OUTPUT_MIX) ||
            (mSessionId == AUDIO_SESSION_OUTPUT_STAGE);
    // always process effects unless no more tracks are on the session and the effect tail
    // has been rendered
    bool doProcess = true;
    // never process effects when:
    // - on an OFFLOAD thread
    // - no more tracks are on the session and the effect tail has been rendered
    bool doProcess = (thread->type() != ThreadBase::OFFLOAD);
    if (!isGlobalSession) {
        bool tracksOnSession = (trackCnt() != 0);