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

Commit d362a52b authored by rago's avatar rago
Browse files

Fix to usage of upper bound value in volume curve

Bug: 29627411
Change-Id: Iffe3bf69bf4b49cd76ffe00b16ebce1ab81c4631
parent b28d6117
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@ float VolumeCurve::volIndexToDb(int indexInUi, int volIndexMin, int volIndexMax)
    // 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) {