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

Commit 67b5bb74 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "Fix for tone glitch produced in ToneGenerator" am: 46f1c24c am: 84183ba4

am: 09b0b40f

Change-Id: I0b2765bba69b2de8ec6a5d6cdc894c03e587ce2a
parents 149df9f0 09b0b40f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -313,7 +313,7 @@ private:

        short mA1_Q14;  // Q14 coefficient
        // delay line of full amplitude generator
        short mS1, mS2;  // delay line S2 oldest
        long mS1, mS2;  // delay line S2 oldest
        short mS2_0;  // saved value for reinitialisation
        short mAmplitude_Q15;  // Q15 amplitude
    };
+4 −4
Original line number Diff line number Diff line
@@ -1612,8 +1612,8 @@ void ToneGenerator::WaveGenerator::getSamples(short *outBuffer,
        lS1 = (long)0;
        lS2 = (long)mS2_0;
    } else {
        lS1 = (long)mS1;
        lS2 = (long)mS2;
        lS1 = mS1;
        lS2 = mS2;
    }
    lA1 = (long)mA1_Q14;
    lAmplitude = (long)mAmplitude_Q15;
@@ -1649,8 +1649,8 @@ void ToneGenerator::WaveGenerator::getSamples(short *outBuffer,
    }

    // save status
    mS1 = (short)lS1;
    mS2 = (short)lS2;
    mS1 = lS1;
    mS2 = lS2;
}

}  // end namespace android