diff options
Diffstat (limited to 'gst/dtmf/tone_detect.c')
-rw-r--r-- | gst/dtmf/tone_detect.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gst/dtmf/tone_detect.c b/gst/dtmf/tone_detect.c index d8f1df16e..8c1b5ad95 100644 --- a/gst/dtmf/tone_detect.c +++ b/gst/dtmf/tone_detect.c @@ -196,39 +196,39 @@ zap_dtmf_detect_init (dtmf_detect_state_t * s) int i; float theta; s->hit1 = s->hit2 = 0; for (i = 0; i < 4; i++) { - theta = 2.0 * M_PI * (dtmf_row[i] / SAMPLE_RATE); + theta = 2.0 * G_PI * (dtmf_row[i] / SAMPLE_RATE); dtmf_detect_row[i].fac = 2.0 * cos (theta); - theta = 2.0 * M_PI * (dtmf_col[i] / SAMPLE_RATE); + theta = 2.0 * G_PI * (dtmf_col[i] / SAMPLE_RATE); dtmf_detect_col[i].fac = 2.0 * cos (theta); - theta = 2.0 * M_PI * (dtmf_row[i] * 2.0 / SAMPLE_RATE); + theta = 2.0 * G_PI * (dtmf_row[i] * 2.0 / SAMPLE_RATE); dtmf_detect_row_2nd[i].fac = 2.0 * cos (theta); - theta = 2.0 * M_PI * (dtmf_col[i] * 2.0 / SAMPLE_RATE); + theta = 2.0 * G_PI * (dtmf_col[i] * 2.0 / SAMPLE_RATE); dtmf_detect_col_2nd[i].fac = 2.0 * cos (theta); goertzel_init (&s->row_out[i], &dtmf_detect_row[i]); goertzel_init (&s->col_out[i], &dtmf_detect_col[i]); goertzel_init (&s->row_out2nd[i], &dtmf_detect_row_2nd[i]); goertzel_init (&s->col_out2nd[i], &dtmf_detect_col_2nd[i]); s->energy = 0.0; } /* Same for the fax dector */ - theta = 2.0 * M_PI * (fax_freq / SAMPLE_RATE); + theta = 2.0 * G_PI * (fax_freq / SAMPLE_RATE); fax_detect.fac = 2.0 * cos (theta); goertzel_init (&s->fax_tone, &fax_detect); /* Same for the fax dector 2nd harmonic */ - theta = 2.0 * M_PI * (fax_freq * 2.0 / SAMPLE_RATE); + theta = 2.0 * G_PI * (fax_freq * 2.0 / SAMPLE_RATE); fax_detect_2nd.fac = 2.0 * cos (theta); goertzel_init (&s->fax_tone2nd, &fax_detect_2nd); s->current_sample = 0; s->detected_digits = 0; s->lost_digits = 0; |