Ignore:
Timestamp:
Jul 26, 2006 11:23:07 AM (18 years ago)
Author:
bennylp
Message:

Fixed rather loud clicking/tick noise when call is established. This was caused by the PLC not properly cleared before it is reused for the next call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/g711.c

    r584 r627  
    358358                                      pjmedia_codec *codec ) 
    359359{ 
    360      
     360    struct g711_private *priv = codec->codec_data; 
     361    pj_int16_t frame[SAMPLES_PER_FRAME]; 
     362    int i; 
     363 
    361364    PJ_ASSERT_RETURN(factory==&g711_factory.base, PJ_EINVAL); 
    362365 
     
    365368    if (codec->next!=NULL || codec->prev!=NULL) { 
    366369        return PJ_EINVALIDOP; 
     370    } 
     371 
     372    /* Clear left samples in the PLC, since codec+plc will be reused 
     373     * next time. 
     374     */ 
     375    for (i=0; i<2; ++i) { 
     376        pjmedia_zero_samples(frame, PJ_ARRAY_SIZE(frame)); 
     377        pjmedia_plc_save(priv->plc, frame); 
    367378    } 
    368379 
Note: See TracChangeset for help on using the changeset viewer.