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

Commit 3d084449 authored by rago's avatar rago Committed by android-build-merger
Browse files

Fix Auxiliary Effect Buffer Corruption

am: 02fd2797

Change-Id: Ifce8a8e309aee82d46e0003ee45b2c3ce711857b
parents 08568721 02fd2797
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -429,9 +429,7 @@ static void FloatToInt16_SAT(const LVM_FLOAT *src, LVM_INT16 *dst, size_t n) {
    size_t ii;
    LVM_INT32 temp;

    src += n-1;
    dst += n-1;
    for (ii = n; ii != 0; ii--) {
    for (ii = 0; ii < n; ii++) {
        temp = (LVM_INT32)((*src) * 32768.0f);
        if (temp >= 32767) {
            *dst = 32767;
@@ -440,8 +438,8 @@ static void FloatToInt16_SAT(const LVM_FLOAT *src, LVM_INT16 *dst, size_t n) {
        } else {
            *dst = (LVM_INT16)temp;
        }
        src--;
        dst--;
        src++;
        dst++;
    }
    return;
}