From ec23a61287e61f57eafd44235ba9579e945c77fa Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 Mar 2007 18:10:21 +0000 Subject: [PATCH] let multitone support unitone git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4685 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/libteletone/src/libteletone_detect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/libteletone/src/libteletone_detect.c b/libs/libteletone/src/libteletone_detect.c index cc12c8b250..9e5e850eb6 100644 --- a/libs/libteletone/src/libteletone_detect.c +++ b/libs/libteletone/src/libteletone_detect.c @@ -217,7 +217,7 @@ int teletone_multi_tone_detect (teletone_multi_tone_t *mt, gtest += teletone_goertzel_result (&mt->gs2[x]) < eng_all[x] ? 1 : 0; } - if (gtest >= 2 && eng_sum > 42.0 * mt->energy) { + if ((gtest >= 2 || gtest == mt->tone_count) && eng_sum > 42.0 * mt->energy) { if(mt->negatives) { mt->negatives--; }