Should fix the de-adaptation problem caused by sinusoids
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 27 Jun 2005 06:57:01 +0000 (06:57 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Mon, 27 Jun 2005 06:57:01 +0000 (06:57 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@9516 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/mdf.c

index 258b100..6fe4684 100644 (file)
@@ -420,7 +420,7 @@ void speex_echo_cancel(SpeexEchoState *st, short *ref, short *echo, short *out,
    /* Update frequency-dependent energy ratio with the total energy ratio */
    for (i=0;i<=st->frame_size;i++)
    {
-      st->fratio[i]  = (.2*ESR+.8*min(ESR,st->fratio[i]));
+      st->fratio[i]  = min(ESR,st->fratio[i]);
    }   
 
    if (st->adapted)