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

jm at svn.xiph.org jm at svn.xiph.org
Sun Oct 16 07:50:39 PDT 2005


Author: jm
Date: 2005-10-16 07:50:37 -0700 (Sun, 16 Oct 2005)
New Revision: 10164

Modified:
   trunk/speex/libspeex/nb_celp.c
Log:
prevents wierd things from happening when a large number of packets are missing
(or a disconnect)


Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2005-10-16 07:16:12 UTC (rev 10163)
+++ trunk/speex/libspeex/nb_celp.c	2005-10-16 14:50:37 UTC (rev 10164)
@@ -1193,6 +1193,8 @@
       pitch_val = st->last_pitch + SHR32((spx_int32_t)speex_rand(1+st->count_lost, &st->seed),SIG_SHIFT);
       if (pitch_val > st->max_pitch)
          pitch_val = st->max_pitch;
+      if (pitch_val < st->min_pitch)
+         pitch_val = st->min_pitch;
       for (i=0;i<st->subframeSize;i++)
       {
          exc[i]= MULT16_32_Q15(pitch_gain, (exc[i-pitch_val]+VERY_SMALL)) + 



More information about the commits mailing list