Changeset 2215


Ignore:
Timestamp:
Aug 14, 2008 5:00:21 PM (16 years ago)
Author:
bennylp
Message:

Added maximum threshold for silence detector, to aovid the silence detector setting the threshold too high thus cutting audio signal (e.g. when streaming long continuous signal)

Location:
pjproject/trunk/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r2214 r2215  
    430430 
    431431/** 
     432 * Maximum silence threshold in the silence detector. The silence detector 
     433 * will not cut the audio transmission if the audio level is above this 
     434 * level. 
     435 * 
     436 * Default: 25 
     437 */ 
     438#ifndef PJMEDIA_SILENCE_DET_MAX_THRESHOLD 
     439#   define PJMEDIA_SILENCE_DET_MAX_THRESHOLD    25 
     440#endif 
     441 
     442 
     443/** 
    432444 * Speex Accoustic Echo Cancellation (AEC). 
    433445 * By default is enabled. 
  • pjproject/trunk/pjmedia/src/pjmedia/silencedet.c

    r2039 r2215  
    268268            } 
    269269 
     270            if (new_threshold > PJMEDIA_SILENCE_DET_MAX_THRESHOLD) 
     271                new_threshold = PJMEDIA_SILENCE_DET_MAX_THRESHOLD; 
     272 
    270273            if (updated && sd->cur_threshold != new_threshold) { 
    271274                PJ_LOG(5,(sd->objname,  
Note: See TracChangeset for help on using the changeset viewer.