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

Commit 47fac46e authored by Marco Nelissen's avatar Marco Nelissen Committed by Android Git Automerger
Browse files

am 4b440268: am c929677e: Merge "Increase the number of useful bits in the...

am 4b440268: am c929677e: Merge "Increase the number of useful bits in the spectrum." into gingerbread

* commit '4b44026879723d924ddc306ea1e330a9e87c3a1c':
  Increase the number of useful bits in the spectrum.
parents 90993438 958c063e
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -219,8 +219,13 @@ status_t Visualizer::doFft(uint8_t *fft, uint8_t *waveform)
    }
    }


    for (uint32_t i = 0; i < mCaptureSize; i += 2) {
    for (uint32_t i = 0; i < mCaptureSize; i += 2) {
        fft[i] = workspace[i >> 1] >> 24;
        short tmp = workspace[i >> 1] >> 21;
        fft[i + 1] = workspace[i >> 1] >> 8;
        while (tmp > 127 || tmp < -128) tmp >>= 1;
        fft[i] = tmp;
        tmp = workspace[i >> 1];
        tmp >>= 5;
        while (tmp > 127 || tmp < -128) tmp >>= 1;
        fft[i + 1] = tmp;
    }
    }


    return NO_ERROR;
    return NO_ERROR;