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

Commit 9bc88b37 authored by Eric Laurent's avatar Eric Laurent
Browse files

soundpool: fix muted channel

Muted state was not taken into account when starting
sound channel playback.

Bug: 77618929
Test: manual check that camera shutter sound is muted in DnD.
Change-Id: Ia123154d76b388ab6da19f3fe3b369e2ab65b020
parent b175d0db
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -809,7 +809,11 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV
            mAudioTrack = newTrack;
            ALOGV("using new track %p for sample %d", newTrack.get(), sample->sampleID());
        }
        if (mMuted) {
            newTrack->setVolume(0.0f, 0.0f);
        } else {
            newTrack->setVolume(leftVolume, rightVolume);
        }
        newTrack->setLoop(0, frameCount, loop);
        mPos = 0;
        mSample = sample;