1
0
mirror of https://github.com/RPCS3/soundtouch.git synced 2024-11-09 12:22:51 +01:00

Bugfix in integer version of calcCrossCorrAccumulate()

Using "unsigned long" for "lnorm" variable that was yet made negative in very first step caused incorrect calculation result. Corrected the type to "long".

Signed-off-by: Olli Parviainen <oparviai@iki.fi>
This commit is contained in:
Olli Parviainen 2020-10-03 16:58:00 +03:00
parent 3e74d1d18f
commit a911a1e986

View File

@ -928,7 +928,7 @@ double TDStretch::calcCrossCorr(const short *mixingPos, const short *compare, do
double TDStretch::calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm)
{
long corr;
unsigned long lnorm;
long lnorm;
int i;
// cancel first normalizer tap from previous round