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

Skip to content
Commit 1fd372e4 authored by Eric Laurent's avatar Eric Laurent
Browse files

audio policy: fix volume burst on user switch.

Fix two main problems in setStreamVolumeIndex():

1) the conventional initialization or user switch behavior consisting in first
applying volume for AUDIO_DEVICE_OUT_DEFAULT device which resets all volumes
and then apply device specific volumes is problematic: if this is done while
a stream is active, it will temporarily reset the volume to its default
(usually loud) and then back causing an audible glitch.

2) The logic consisting in applying the requested volume to all outputs with a
device selected by the routing strategy corresponding to the requested stream
is problematic: it will cause device specific volumes for other devices than
current one to be applied to active streams.
Restrict the logic to cases of multiple device selections including the
requested device.

Bug: 27557733

Change-Id: Ia14cd51766a7516c42221abff76843d47699105f
parent 7f688edc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment