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

Commit 46f1c24c authored by Eric Laurent's avatar Eric Laurent Committed by Gerrit Code Review
Browse files

Merge "Fix for tone glitch produced in ToneGenerator"

parents b480ab93 f97b682f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -304,7 +304,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
@@ -1570,8 +1570,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;
@@ -1607,8 +1607,8 @@ void ToneGenerator::WaveGenerator::getSamples(short *outBuffer,
    }

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

}  // end namespace android