hi,Jean-Marc In jitter.c, the function speex_jitter_get has such code, if (late_ratio_short > .1 || late_ratio_long > .03) { jitter->shortterm_margin[MAX_MARGIN-1] +jitter->shortterm_margin[MAX_MARGIN-2]; jitter->longterm_margin[MAX_MARGIN-1] +jitter->longterm_margin[MAX_MARGIN-2]; for (i=MAX_MARGIN-2;i>=0;i--) { jitter->shortterm_margin[i+1] = jitter->shortterm_margin[i]; jitter->longterm_margin[i+1] = jitter->longterm_margin[i]; } jitter->shortterm_margin[0] = 0; jitter->longterm_margin[0] = 0; /*fprintf (stderr, "interpolate frame\n");*/ speex_decode_int(jitter->dec, NULL, out); if (current_timestamp) *current_timestamp = jitter->pointer_timestamp; return; } I think , for (i=MAX_MARGIN-2;i>=0;i--) should be replaced by for (i=MAX_MARGIN-3;i>=0;i--) . Best regards keith
> Why is frame_time is equal to frame_size. As we know,if we use 8k > sampling, the frame_size is 160, > (frame_size = 320 ,sampling = 16k ..),but the frame_time is const, it > is > 20ms.I changed the meaning of frame_time to mean the same as in the RTP RFC, which means that the units of frame_time are samples... which means it's the same as frame_size now. ...> I think , for (i=MAX_MARGIN-2;i>=0;i--) should be replaced by for > (i=MAX_MARGIN-3;i>=0;i--) .yes, probably (have to look at it more carefully). Jean-Marc