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

Commit 436c9177 authored by Vlad Popa's avatar Vlad Popa
Browse files

Report volume shaper mute events

This is now included as part of the playback mute notifications.

Test: run cts-dev -m CtsMediaAudioTestCases -t android.media.audio.cts.AudioPlaybackConfigurationTest
Bug: 235521198
Change-Id: Ide5e61464e5de6729ad9bfb861e930afb1719260
parent e2f5aef5
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -5393,7 +5393,8 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
                                   mStreamTypes[track->streamType()].volume == 0.f,
                                   mStreamTypes[track->streamType()].mute,
                                   track->isPlaybackRestricted(),
                                   vlf == 0.f && vrf == 0.f});
                                   vlf == 0.f && vrf == 0.f,
                                   vh == 0.f});

                vlf *= volume;
                vrf *= volume;
@@ -5575,7 +5576,8 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTrac
                                   mStreamTypes[track->streamType()].volume == 0.f,
                                   mStreamTypes[track->streamType()].mute,
                                   track->isPlaybackRestricted(),
                                   vlf == 0.f && vrf == 0.f});
                                   vlf == 0.f && vrf == 0.f,
                                   vh == 0.f});

                // now apply the master volume and stream type volume and shaper volume
                vlf *= v * vh;
@@ -6198,7 +6200,8 @@ void AudioFlinger::DirectOutputThread::processVolume_l(Track *track, bool lastTr
                       mStreamTypes[track->streamType()].volume == 0.f,
                       mStreamTypes[track->streamType()].mute,
                       track->isPlaybackRestricted(),
                       clientVolumeMute});
                       clientVolumeMute,
                       shaperVolume == 0.f});

    if (lastTrack) {
        track->setFinalVolume((left + right) / 2.f);