Changeset 627 for pjproject


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

Location:
pjproject/trunk/pjmedia/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/gsm.c

    r582 r627  
    344344{ 
    345345    struct gsm_data *gsm_data; 
     346    pj_int16_t frame[160]; 
     347    int i; 
    346348 
    347349    PJ_ASSERT_RETURN(factory && codec, PJ_EINVAL); 
     
    352354    /* Close codec, if it's not closed. */ 
    353355    gsm_codec_close(codec); 
     356 
     357    /* Clear left samples in the PLC, since codec+plc will be reused 
     358     * next time. 
     359     */ 
     360    for (i=0; i<2; ++i) { 
     361        pjmedia_zero_samples(frame, PJ_ARRAY_SIZE(frame)); 
     362        pjmedia_plc_save(gsm_data->plc, frame); 
     363    } 
    354364 
    355365    /* Put in the free list. */ 
  • 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.