summaryrefslogtreecommitdiff
path: root/main/dsp.c
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-10-27 20:11:11 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-10-27 20:11:11 +0000
commit849992fde929425bde434bf18d192947193bfca9 (patch)
tree896725c4e9eba36914e7059e66e19c793833c942 /main/dsp.c
parente5ac65bb43ac5d92861d3b185ac7f828bcd94df8 (diff)
tweak the v21 detector to detect an additional pattern of hits and misses
........ Merged revisions 342605 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/dsp.c')
-rw-r--r--main/dsp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/dsp.c b/main/dsp.c
index fdea748fd..91eea6c9d 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -631,7 +631,7 @@ static int v21_detect(struct ast_dsp *dsp, v21_detect_state_t *s, int16_t *amp,
}
if (hit) {
- if (s->miss_count == 3) {
+ if (s->miss_count == 3 || (s->hit_count == 1 && s->miss_count == 2)) {
s->hit_count++;
} else {
s->hit_count = 1;