Changeset 888 for pjproject/trunk/pjmedia/src/pjmedia/silencedet.c
- Timestamp:
- Jan 20, 2007 5:18:14 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/src/pjmedia/silencedet.c
r838 r888 143 143 min_signal = sd->ptime; 144 144 if (recalc_time < 0) 145 recalc_time = 5000;145 recalc_time = 2000; 146 146 147 147 sd->min_signal_cnt = min_signal / sd->ptime; … … 257 257 /* Adjust according to signal/silence proportions. */ 258 258 if (pct_signal > 95) { 259 new_threshold += (sd->weakest_signal - sd->cur_threshold)/4;259 new_threshold += (sd->weakest_signal+1 - sd->cur_threshold)/2; 260 260 } else if (pct_signal < 5) { 261 261 new_threshold = (sd->cur_threshold+sd->loudest_silence)/2+1; 262 } else if (pct_signal > 90) {262 } else if (pct_signal > 80) { 263 263 new_threshold++; 264 264 } else if (pct_signal < 10) { … … 269 269 270 270 if (updated && sd->cur_threshold != new_threshold) { 271 PJ_LOG(5,(sd->objname, 272 "Vad cur_threshold updated %d-->%d. " 273 "Signal lo=%d", 274 sd->cur_threshold, new_threshold, 275 sd->weakest_signal)); 271 276 sd->cur_threshold = new_threshold; 272 PJ_LOG(5,(sd->objname, "Vad cur_threshold updated to %d",273 sd->cur_threshold));274 277 } 275 278 }
Note: See TracChangeset
for help on using the changeset viewer.