aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-14 17:47:40 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2011-07-14 17:47:40 +0000
commit5911bed3161fa69c67919a669d2522e7bb569fbb (patch)
tree4cdf19d1c2dcfa24ec54017bdc70b2c005f1a469
parentfb85b967191258fa96fceef1b6ee99b203a021b7 (diff)
Merged revisions 328162 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10 ........ r328162 | mnicholson | 2011-07-14 12:46:32 -0500 (Thu, 14 Jul 2011) | 3 lines tune the v21 preamble detector to properly detect the desired sequence of hits and misses ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328163 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--main/dsp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/dsp.c b/main/dsp.c
index 02cdc9d73..da982d0c1 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -624,10 +624,10 @@ static int v21_detect(struct ast_dsp *dsp, v21_detect_state_t *s, int16_t *amp,
}
if (hit) {
- if (s->hit_count == 0 || s->miss_count == 3) {
+ if (s->miss_count == 3) {
s->hit_count++;
} else {
- s->hit_count = 0;
+ s->hit_count = 1;
}
s->miss_count = 0;