Changeset 2367 for pjproject/trunk


Ignore:
Timestamp:
Nov 18, 2008 1:44:19 PM (16 years ago)
Author:
nanang
Message:

Ticket #676: Updated silence detector to regard max silence threshold setting.

File:
1 edited

Legend:

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

    r2230 r2367  
    223223    avg_recent_level = (sd->sum_level / sd->sum_cnt); 
    224224 
    225     if (level > sd->threshold) { 
     225    if (level > sd->threshold ||  
     226        (level >> 8) >= PJMEDIA_SILENCE_DET_MAX_THRESHOLD) 
     227    { 
    226228        sd->silence_timer = 0; 
    227229        sd->voiced_timer += sd->ptime; 
Note: See TracChangeset for help on using the changeset viewer.