[asterisk-commits] markster: branch markster/mfr2 r114716 - /team/markster/mfr2/main/dsp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 28 10:01:17 CDT 2008


Author: markster
Date: Mon Apr 28 10:01:16 2008
New Revision: 114716

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114716
Log:
Reduce number of hits required for MFR2...

Modified:
    team/markster/mfr2/main/dsp.c

Modified: team/markster/mfr2/main/dsp.c
URL: http://svn.digium.com/view/asterisk/team/markster/mfr2/main/dsp.c?view=diff&rev=114716&r1=114715&r2=114716
==============================================================================
--- team/markster/mfr2/main/dsp.c (original)
+++ team/markster/mfr2/main/dsp.c Mon Apr 28 10:01:16 2008
@@ -893,16 +893,22 @@
 			best = best*5 + second_best - 1;
 			hit = all_mf_positions[s->td.mf.mode][best];
 			/* Look for two successive similar results */
-			/* The logic in the next test is:
-			   For KP we need 4 successive identical clean detects, with
-			   two blocks of something different preceeding it. For anything
-			   else we need two successive identical clean detects, with
-			   two blocks of something different preceeding it. */
-			if (hit == s->td.mf.hits[4] && hit == s->td.mf.hits[3] &&
-			   ((hit != '*' && hit != s->td.mf.hits[2] && hit != s->td.mf.hits[1])||
-			    (hit == '*' && hit == s->td.mf.hits[2] && hit != s->td.mf.hits[1] && 
-			    hit != s->td.mf.hits[0]))) {
-				store_digit(s, hit);
+			if (s->td.mf.mode) {
+				if (hit == s->td.mf.hits[4] && hit != s->td.mf.hits[3] && hit != s->td.mf.hits[2]) {
+					store_digit(s, hit);
+				}
+			} else {
+				/* The logic in the next test is:
+				   For KP we need 4 successive identical clean detects, with
+				   two blocks of something different preceeding it. For anything
+				   else we need two successive identical clean detects, with
+				   two blocks of something different preceeding it. */
+				if (hit == s->td.mf.hits[4] && hit == s->td.mf.hits[3] &&
+				   ((hit != '*' && hit != s->td.mf.hits[2] && hit != s->td.mf.hits[1])||
+				    (hit == '*' && hit == s->td.mf.hits[2] && hit != s->td.mf.hits[1] && 
+				    hit != s->td.mf.hits[0]))) {
+					store_digit(s, hit);
+				}
 			}
 		}
 




More information about the asterisk-commits mailing list