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

Commit c23aecc0 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

audioflinger: fix effect volume set on start.

am: e7449bf6

Change-Id: I2c2f98e2a4d0df1906dc0c3686727ccd36647f73
parents 3f4c98bd e7449bf6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1733,10 +1733,12 @@ bool AudioFlinger::EffectChain::setVolume_l(uint32_t *left, uint32_t *right, boo
// resetVolume_l() must be called with PlaybackThread::mLock or EffectChain::mLock held
void AudioFlinger::EffectChain::resetVolume_l()
{
    if ((mLeftVolume != UINT_MAX) && (mRightVolume != UINT_MAX)) {
        uint32_t left = mLeftVolume;
        uint32_t right = mRightVolume;
        (void)setVolume_l(&left, &right, true);
    }
}

void AudioFlinger::EffectChain::syncHalEffectsState()
{