commit | d362a52b836ebc2a12620b6f1932ae042a81d2e7 | [log] [tgz] |
---|---|---|
author | rago <rago@google.com> | Tue Jul 12 14:56:41 2016 -0700 |
committer | rago <rago@google.com> | Tue Jul 12 15:49:00 2016 -0700 |
tree | f5ca60ed5d7f3bab8a42e9c0228d44d6a17300a7 | |
parent | b28d6117a5a63fd673a38be12e7e48bc65b05ad3 [diff] |
Fix to usage of upper bound value in volume curve Bug: 29627411 Change-Id: Iffe3bf69bf4b49cd76ffe00b16ebce1ab81c4631
diff --git a/services/audiopolicy/common/managerdefinitions/src/VolumeCurve.cpp b/services/audiopolicy/common/managerdefinitions/src/VolumeCurve.cpp index ab2b51f..14caf7c 100644 --- a/services/audiopolicy/common/managerdefinitions/src/VolumeCurve.cpp +++ b/services/audiopolicy/common/managerdefinitions/src/VolumeCurve.cpp
@@ -34,7 +34,8 @@ // Where would this volume index been inserted in the curve point size_t indexInUiPosition = mCurvePoints.orderOf(CurvePoint(volIdx, 0)); if (indexInUiPosition >= nbCurvePoints) { - return 0.0f; // out of bounds + //use last point of table + return mCurvePoints[nbCurvePoints - 1].mAttenuationInMb / 100.0f; } if (indexInUiPosition == 0) { if (indexInUiPosition != mCurvePoints[0].mIndex) {