[xiph-commits] r10362 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Wed Nov 9 22:36:13 PST 2005


Author: jm
Date: 2005-11-09 22:36:11 -0800 (Wed, 09 Nov 2005)
New Revision: 10362

Modified:
   trunk/speex/libspeex/mdf.c
Log:
C89 compilers don't like declarations in the middle of code


Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2005-11-10 05:34:43 UTC (rev 10361)
+++ trunk/speex/libspeex/mdf.c	2005-11-10 06:36:11 UTC (rev 10362)
@@ -205,7 +205,8 @@
    float Syy=0,See=0;
    float leak_estimate;
    float ss;
-   
+   float adapt_rate;
+
    N = st->window_size;
    M = st->M;
    scale = 1.0f/N;
@@ -314,11 +315,9 @@
       /*printf ("%f\n", leak_estimate);*/
    }
    
-   float adapt_rate;
    if (!st->adapted)
    {
       float Sxx;
-      adapt_rate;
       Sxx = inner_prod(st->x+st->frame_size, st->x+st->frame_size, st->frame_size);
 
       /* We consider that the filter is adapted if the following is true*/
@@ -405,7 +404,7 @@
       
       /* Estimate residual echo */
       for (i=0;i<=st->frame_size;i++)
-         Yout[i] = 2*leak_estimate*st->Yps[i];
+         Yout[i] = 2.f*leak_estimate*st->Yps[i];
    }
 
 }



More information about the commits mailing list