Fix for fixed-point preprocessor bug reported by Peter Rowling
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 10 Oct 2007 10:23:49 +0000 (10:23 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 10 Oct 2007 10:23:49 +0000 (10:23 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@13950 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/preprocess.c

index c10f478..bbdb19f 100644 (file)
@@ -737,6 +737,8 @@ int speex_preprocess_run(SpeexPreprocessState *st, spx_int16_t *x)
    spx_word16_t effective_echo_suppress;
    
    st->nb_adapt++;
+   if (st->nb_adapt>20000)
+      st->nb_adapt = 20000;
    st->min_count++;
    
    beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt));