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

Skip to content
Commit bbf48580 authored by Christian Hanner's avatar Christian Hanner Committed by Steve Kondik
Browse files

Use round() instead of ceil() in calculation of a2dp vol slider position

The avrcp MESSAGE_VOLUME_CHANGED requests volumes in the range 0-127. In
convertToAudioStreamVolume() this value is scaled to a (typically much
smaller, e.g. 0-15) integer value representing the volume slider step to
be presented in the UI. Depending on the resolution in the volume
requests from the a2dp device and the resolution of the UI volume
slider, some of the requested volumes might be mapped onto the same
UI slider positions. If ceil() is exchanged for round() in
convertToAudioStreamVolume() the problem with double mapped volumes
vanishes in most realistic cases.

Change-Id: I89d9ac4b8c330fd4fd2a02984bd628961f2cb035
parent fcd16d32
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment