use negative frequency for demod
This commit is contained in:
parent
36a2405f83
commit
3895b13662
@ -108,7 +108,7 @@ static void dsp_thread()
|
||||
sample += (double)buf_in[SND_RCHAN*j+k];
|
||||
std::complex<double> 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]);
|
||||
|
Loading…
Reference in New Issue
Block a user