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

Commit 4b176392 authored by Robert Wu's avatar Robert Wu
Browse files

AAudio: Remove use of -0x80000000

-0x80000000 causes a runtime error. Simply
use INT32_MIN instead.

Bug: 233403459
Test: atest test_flowgraph
Change-Id: I5e31b75a6ec6b140ef2734ca4d336420bf2d4cc5
parent 448ae113
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,9 +39,9 @@ static int32_t clamp32FromFloat(float f)
    static const float limneg = -1.;

    if (f <= limneg) {
        return -0x80000000; /* or 0x80000000 */
        return INT32_MIN;
    } else if (f >= limpos) {
        return 0x7fffffff;
        return INT32_MAX;
    }
    f *= scale;
    /* integer conversion is through truncation (though int to float is not).