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

Commit 011618d2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix effect volume cache issue." into main

parents 6c48d384 4054df25
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1390,9 +1390,9 @@ status_t EffectModule::setVolumeInternal(
                                                &size,
                                                pVolume);
    if (controller && status == NO_ERROR && size == sizeof(volume)) {
        mVolume = {*left, *right}; // Cache the value that has been set
        *left = volume[0];
        *right = volume[1];
        mVolume = {*left, *right};
    }
    return status;
}
@@ -2630,6 +2630,7 @@ bool EffectChain::setVolume_l(uint32_t* left, uint32_t* right, bool force) {
        }
        return volumeControlIndex.has_value();
    }
    mVolumeControlEffect = volumeControlEffect;

    for (int i = 0; i < ctrlIdx; ++i) {
        // For all volume control effects before the effect that controls volume, set the volume