Update of /usr/cvsroot/zaptel
In directory mongoose.digium.com:/tmp/cvs-serv19097

Modified Files:
        mec2.h 
Log Message:
Small fixes for mec2 echo can from #6937


Index: mec2.h
===================================================================
RCS file: /usr/cvsroot/zaptel/mec2.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- mec2.h      9 Nov 2004 19:16:18 -0000       1.4
+++ mec2.h      24 Aug 2005 00:45:04 -0000      1.5
@@ -163,6 +163,7 @@
   // reset the near-end speech detector
   //
   ec->s_tilde_i = 0;
+  ec->y_tilde_i = 0;
   ec->HCNTR_d = (int)0;
 
   // exit gracefully
@@ -239,9 +240,10 @@
   
   /* compute the new convergence factor
   */
-  Py_i = (ec->Ly_i >> DEFAULT_SIGMA_LY_I) * (ec->Ly_i >> DEFAULT_SIGMA_LY_I);
-  Py_i >>= 15;
-  if (ec->HCNTR_d > 0) {
+  if (!ec->HCNTR_d) {
+       Py_i = (ec->Ly_i >> DEFAULT_SIGMA_LY_I) * (ec->Ly_i >> 
DEFAULT_SIGMA_LY_I);
+       Py_i >>= 15;
+  } else {
        Py_i = (1 << 15);
   }
   

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to