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

jm at svn.xiph.org jm at svn.xiph.org
Mon May 21 04:41:22 PDT 2007


Author: jm
Date: 2007-05-21 04:41:21 -0700 (Mon, 21 May 2007)
New Revision: 12965

Modified:
   trunk/speex/libspeex/jitter.c
Log:
automatically decide when to update the jitter buffer delay based on the 
decoded activity level.


Modified: trunk/speex/libspeex/jitter.c
===================================================================
--- trunk/speex/libspeex/jitter.c	2007-05-19 11:45:06 UTC (rev 12964)
+++ trunk/speex/libspeex/jitter.c	2007-05-21 11:41:21 UTC (rev 12965)
@@ -578,6 +578,7 @@
 {
    int i;
    int ret;
+   spx_int32_t activity;
    char data[2048];
    JitterBufferPacket packet;
    packet.data = data;
@@ -617,7 +618,9 @@
             out[i]=0;
       }
    }
-   jitter_buffer_update_delay(jitter->packets, &packet, NULL);
+   speex_decoder_ctl(jitter->dec, SPEEX_GET_ACTIVITY, &activity);
+   if (activity < 30)
+      jitter_buffer_update_delay(jitter->packets, &packet, NULL);
    jitter_buffer_tick(jitter->packets);
 }
 



More information about the commits mailing list