summaryrefslogtreecommitdiffstats
path: root/main/asterisk/ASTERISK-19610c.patch
blob: 1177865372c67f725c6ecb4ed0220521c048aed4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
commit 235d08f
Author: alecdavis <alecdavis@f38db490-d61c-443f-a65b-d21fe96a405b>
Date:   Wed Sep 5 18:43:12 2012 +0000

    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
    
    
    git-svn-id: http://svn.digium.com/svn/asterisk/branches/10@372341 f38db490-d61c-443f-a65b-d21fe96a405b

diff --git a/main/dsp.c b/main/dsp.c
index 7541650..4272158 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -312,7 +312,6 @@ static inline void goertzel_sample(goertzel_state_t *s, short sample)
 		s->chunky++;
 		s->v3 = s->v3 >> 1;
 		s->v2 = s->v2 >> 1;
-		v1 = v1 >> 1;
 	}
 }
 
@@ -502,7 +501,7 @@ static void ast_mf_detect_init (mf_detect_state_t *s, unsigned int sample_rate)
 	int i;
 	s->hits[0] = s->hits[1] = s->hits[2] = s->hits[3] = s->hits[4] = 0;
 	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_GSIZE, sample_rate);
 	}
 	s->current_sample = 0;
 	s->current_hit = 0;