Skip to content
Snippets Groups Projects
Commit f37b06b8 authored by Alec L Davis's avatar Alec L Davis
Browse files

dsp.c: in ast_mf_detect_init incorrectly sets goertzel samples to 160, should be MF_GSIZE

Related https://reviewboard.asterisk.org/r/2097/
........

Merged revisions 372339 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372341 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 7716846a
No related branches found
No related tags found
No related merge requests found
...@@ -312,7 +312,6 @@ static inline void goertzel_sample(goertzel_state_t *s, short sample) ...@@ -312,7 +312,6 @@ static inline void goertzel_sample(goertzel_state_t *s, short sample)
s->chunky++; s->chunky++;
s->v3 = s->v3 >> 1; s->v3 = s->v3 >> 1;
s->v2 = s->v2 >> 1; s->v2 = s->v2 >> 1;
v1 = v1 >> 1;
} }
} }
...@@ -503,7 +502,7 @@ static void ast_mf_detect_init (mf_detect_state_t *s, unsigned int sample_rate) ...@@ -503,7 +502,7 @@ static void ast_mf_detect_init (mf_detect_state_t *s, unsigned int sample_rate)
int i; int i;
s->hits[0] = s->hits[1] = s->hits[2] = s->hits[3] = s->hits[4] = 0; s->hits[0] = s->hits[1] = s->hits[2] = s->hits[3] = s->hits[4] = 0;
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
goertzel_init (&s->tone_out[i], mf_tones[i], 160, sample_rate); goertzel_init (&s->tone_out[i], mf_tones[i], MF_SIZE, sample_rate);
} }
s->current_sample = 0; s->current_sample = 0;
s->current_hit = 0; s->current_hit = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment