diff --git a/sndlock.cpp b/sndlock.cpp index 4470ea3..8fb2ae1 100644 --- a/sndlock.cpp +++ b/sndlock.cpp @@ -108,7 +108,7 @@ static void dsp_thread() sample += (double)buf_in[SND_RCHAN*j+k]; std::complex rotated; rotated = sample*std::polar(scale, phase_in[i]*2.0*M_PI/(double)UINT32_MAX); - phase_in[i] += ftw[i]; // wraps on underflow + phase_in[i] -= ftw[i]; // wraps on underflow lpf_y[i] += (rotated - lpf_y[i])*lpf_k[i]; double mag = std::abs(lpf_y[i]);