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

Commit 06d41d0d authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

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

Merge "Merge "Fix for tone glitch produced in ToneGenerator" am: 46f1c24c am: 84183ba4 am: 09b0b40f am: 67b5bb74" into nyc-mr1-dev
parents cc444349 b2938511
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