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

Commit 220c45f1 authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

libeffects: Fix unused-but-set-variable warnings

Removed few variables that were set but not used.

Bug: 200739177
Test: builds
Change-Id: Ief37f725a887e57715f023850e73139d73f68dbb
parent 2b1669ad
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@ void LVEQNB_SetFilters(LVEQNB_Instance_t* pInstance, LVEQNB_Params_t* pParams) {
    LVM_UINT32 fs =
            (LVM_UINT32)LVEQNB_SampleRateTab[(LVM_UINT16)pParams->SampleRate]; /* Sample rate */
    LVM_UINT32 fc;     /* Filter centre frequency */
    LVM_INT16 QFactor; /* Filter Q factor */

    pInstance->NBands = pParams->NBands;

@@ -144,7 +143,6 @@ void LVEQNB_SetFilters(LVEQNB_Instance_t* pInstance, LVEQNB_Params_t* pParams) {
         * Get the filter settings
         */
        fc = (LVM_UINT32)pParams->pBandDefinition[i].Frequency; /* Get the band centre frequency */
        QFactor = (LVM_INT16)pParams->pBandDefinition[i].QFactor; /* Get the band Q factor */

        pInstance->pBiquadType[i] = LVEQNB_SinglePrecision_Float; /* Default to single precision */

+0 −8
Original line number Diff line number Diff line
@@ -421,7 +421,6 @@ LVPSA_RETURN LVPSA_BPSinglePrecCoefs(LVM_UINT16 Fs, LVPSA_FilterParam_t* pFilter
     * Intermediate variables and temporary values
     */
    LVM_FLOAT T0;
    LVM_FLOAT D;
    LVM_FLOAT A0;
    LVM_FLOAT B1;
    LVM_FLOAT B2;
@@ -444,9 +443,6 @@ LVPSA_RETURN LVPSA_BPSinglePrecCoefs(LVM_UINT16 Fs, LVPSA_FilterParam_t* pFilter
     * Calculating the intermediate values
     */
    T0 = Frequency * LVPSA_Float_TwoPiOnFsTable[Fs]; /* T0 = 2 * Pi * Fc / Fs */
    D = 3200;                                        /* Floating point value 1.000000 (1*100*2^5) */
    /* Force D = 1 : the function was originally used for a peaking filter.
       The D parameter do not exist for a BandPass filter coefficients */

    /*
     * Calculate the B2 coefficient
@@ -535,7 +531,6 @@ LVPSA_RETURN LVPSA_BPDoublePrecCoefs(LVM_UINT16 Fs, LVPSA_FilterParam_t* pFilter
     * Intermediate variables and temporary values
     */
    LVM_FLOAT T0;
    LVM_FLOAT D;
    LVM_FLOAT A0;
    LVM_FLOAT B1;
    LVM_FLOAT B2;
@@ -558,9 +553,6 @@ LVPSA_RETURN LVPSA_BPDoublePrecCoefs(LVM_UINT16 Fs, LVPSA_FilterParam_t* pFilter
     * Calculating the intermediate values
     */
    T0 = Frequency * LVPSA_Float_TwoPiOnFsTable[Fs]; /* T0 = 2 * Pi * Fc / Fs */
    D = 3200;                                        /* Floating point value 1.000000 (1*100*2^5) */
    /* Force D = 1 : the function was originally used for a peaking filter.
       The D parameter do not exist for a BandPass filter coefficients */

    /*
     * Calculate the B2 coefficient
+1 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ static std::pair<std::vector<int>, std::vector<float>> correlation(const int16_t
                                                                   const int16_t* sigY, int len,
                                                                   int16_t enableCrossCorr) {
    float maxCorrVal = 0.f, prevCorrVal = 0.f;
    int delay = 0, peakIndex = 0, flag = 0;
    int peakIndex = 0, flag = 0;
    int loopLim = (1 == enableCrossCorr) ? len : kMinLoopLimitValue;
    std::vector<int> peakIndexVect(kNumPeaks, 0);
    std::vector<float> peakValueVect(kNumPeaks, 0.f);
@@ -47,7 +47,6 @@ static std::pair<std::vector<int>, std::vector<float>> correlation(const int16_t
        }
        corrVal /= len - i;
        if (corrVal > maxCorrVal) {
            delay = i;
            maxCorrVal = corrVal;
        }
        // Correlation peaks are expected to be observed at equal intervals. The interval length is