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

Commit 84183ba4 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

Change-Id: If7da9dbfe106fdda640fc817a4fffe05b2ed5dff
parents c3fd10ac 46f1c24c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,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
@@ -1591,8 +1591,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;
@@ -1628,8 +1628,8 @@ void ToneGenerator::WaveGenerator::getSamples(short *outBuffer,
    }

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

}  // end namespace android