diff options
author | Eric Laurent <elaurent@google.com> | 2015-03-18 18:30:19 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-08 18:08:24 -0700 |
commit | ffbc80f5908eaf67a033c6e93a343c39dd6894eb (patch) | |
tree | c97aa681b8c70d7429f7be93f851f04e9dee5900 /services/audiopolicy/enginedefault/src/Gains.h | |
parent | c75307b73d324d590d0dbc05b44bce9aa89b7145 (diff) | |
download | frameworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.zip frameworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.tar.gz frameworks_av-ffbc80f5908eaf67a033c6e93a343c39dd6894eb.tar.bz2 |
audio policy: volume in dBs
Volumes are now stored and exchanged in dBs to be
consistent with the volume tables.
They are converted if needed when applied to the target
gain controller.
Change-Id: I916cbb0bbe65c916444b8c65a2bdca9645c58399
Diffstat (limited to 'services/audiopolicy/enginedefault/src/Gains.h')
-rw-r--r-- | services/audiopolicy/enginedefault/src/Gains.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/audiopolicy/enginedefault/src/Gains.h b/services/audiopolicy/enginedefault/src/Gains.h index b5601ca..7620b7d 100644 --- a/services/audiopolicy/enginedefault/src/Gains.h +++ b/services/audiopolicy/enginedefault/src/Gains.h @@ -29,8 +29,13 @@ class StreamDescriptor; class Gains { public : - static float volIndexToAmpl(audio_devices_t device, const StreamDescriptor& streamDesc, - int indexInUi); + static float volIndexToAmpl(Volume::device_category deviceCategory, + const StreamDescriptor& streamDesc, + int indexInUi); + + static float volIndexToDb(Volume::device_category deviceCategory, + const StreamDescriptor& streamDesc, + int indexInUi); // default volume curve static const VolumeCurvePoint sDefaultVolumeCurve[Volume::VOLCNT]; |