[Freeswitch-svn] [commit] r4685 - freeswitch/trunk/libs/libteletone/src

Freeswitch SVN anthm at freeswitch.org
Tue Mar 20 14:10:21 EDT 2007


Author: anthm
Date: Tue Mar 20 14:10:21 2007
New Revision: 4685

Modified:
   freeswitch/trunk/libs/libteletone/src/libteletone_detect.c

Log:
let multitone support unitone

Modified: freeswitch/trunk/libs/libteletone/src/libteletone_detect.c
==============================================================================
--- freeswitch/trunk/libs/libteletone/src/libteletone_detect.c	(original)
+++ freeswitch/trunk/libs/libteletone/src/libteletone_detect.c	Tue Mar 20 14:10:21 2007
@@ -217,7 +217,7 @@
 			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--;
 			}



More information about the Freeswitch-svn mailing list