X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Flib%2Faudio%2FfftCorrelation.cpp;h=139ea203d0daaac1c3a62b3949e5628222cf223b;hb=f4462e7ecb75f64e524746e3bb7c62a5e973d965;hp=9c1a893a0310c2fc192b5d6ef38021e29f1b64dd;hpb=5f2ae774dfd6cc7870cb8de75fb38259a4f96dd1;p=kdenlive diff --git a/src/lib/audio/fftCorrelation.cpp b/src/lib/audio/fftCorrelation.cpp index 9c1a893a..139ea203 100644 --- a/src/lib/audio/fftCorrelation.cpp +++ b/src/lib/audio/fftCorrelation.cpp @@ -48,8 +48,8 @@ void FFTCorrelation::correlate(const int64_t *left, const int leftSize, // Dividing by the max value is maybe not the best solution, but the // maximum value after correlation should not be larger than the longest // vector since each value should be at most 1 - int64_t maxLeft = 0; - int64_t maxRight = 0; + int64_t maxLeft = 1; + int64_t maxRight = 1; for (int i = 0; i < leftSize; ++i) { if (labs(left[i]) > maxLeft) { maxLeft = labs(left[i]);