[Asterisk-Dev] Fixed jitterbuffer bug

Bryce Nesbitt (mailing list account) bryce1 at obviously.com
Mon May 16 13:51:47 MST 2005


I'm attempting to set a fixed sized jitter buffer:

    jitterbuffer=yes
    maxjitterbuffer=150
    maxexcessbuffer=150
    minexcessbuffer=150
    jittershrinkrate=0

Looking in "channels/chan_iax2.c", though, it appears that the jitter
buffer code will step the jitterbuffer under certain circumstances,
ignoring the maximum and minimum buffer sizes:

    // max and min refers to received packet spread
    // max_jitter_buffer is set to maxexcessbuffer
    // min_jitter_buffer is set to minexcessbuffer

    if (max < iaxs[fr->callno]->jitterbuffer - max_jitter_buffer)
        iaxs[fr->callno]->jitterbuffer -= jittershrinkrate;

    if (max > iaxs[fr->callno]->jitterbuffer - min_jitter_buffer)
        iaxs[fr->callno]->jitterbuffer += jittershrinkrate;

    if (max > iaxs[fr->callno]->jitterbuffer)
        iaxs[fr->callno]->jitterbuffer = max;

This the last line of this code snippet a bug?  Stepping the jitterbuffer size
would seem to risk an audible artifact.



More information about the asterisk-dev mailing list