Commit 32661eb5 authored by Ahmet Inan's avatar Ahmet Inan
Browse files

Merge branch 'master' into ddc

parents 4021631a ed55c26a
......@@ -157,6 +157,11 @@ int main(int argc, char **argv)
float cnt_freq = fclampf(1200.0 + cargf(cnt_q[out] * conjf(cnt_last)) / (2.0 * M_PI * dstep), 1100.0, 1300.0);
float dat_freq = fclampf(1900.0 + cargf(dat_q[out] * conjf(dat_last)) / (2.0 * M_PI * dstep), 1500.0, 2300.0);
if (cabsf(cnt_q[out]) > cabsf(dat_q[out]))
dat_freq = 1500.0;
else
cnt_freq = 1300.0;
cnt_last = cnt_q[out];
dat_last = dat_q[out];
......
......@@ -368,6 +368,11 @@ int demodulate(struct pcm *pcm, float *cnt_freq, float *dat_freq, float *drate)
*cnt_freq = fclampf(1200.0 + cargf(cnt_q[out] * conjf(cnt_last)) / (2.0 * M_PI * dstep), 1100.0, 1300.0);
*dat_freq = fclampf(1900.0 + cargf(dat_q[out] * conjf(dat_last)) / (2.0 * M_PI * dstep), 1500.0, 2300.0);
if (cabsf(cnt_q[out]) > cabsf(dat_q[out]))
*dat_freq = 1500.0;
else
*cnt_freq = 1300.0;
cnt_last = cnt_q[out];
dat_last = dat_q[out];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment