Changeset 5702
- Timestamp:
- Nov 27, 2017 3:29:07 AM (7 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/config.h
r5643 r5702 73 73 #ifndef PJMEDIA_CONF_SWITCH_BOARD_BUF_SIZE 74 74 # define PJMEDIA_CONF_SWITCH_BOARD_BUF_SIZE PJMEDIA_MAX_MTU 75 #endif 76 77 /** 78 * Specify whether the conference bridge uses AGC, an automatic adjustment to 79 * avoid dramatic change in the signal level which can cause noise. 80 * 81 * Default: 1 (enabled) 82 */ 83 #ifndef PJMEDIA_CONF_USE_AGC 84 # define PJMEDIA_CONF_USE_AGC 1 75 85 #endif 76 86 -
pjproject/trunk/pjmedia/src/pjmedia/conference.c
r5698 r5702 76 76 * in the port does not cause misaligned signal (which causes noise). 77 77 */ 78 #define ATTACK_A (conf->clock_rate / conf->samples_per_frame) 79 #define ATTACK_B 1 80 #define DECAY_A 0 81 #define DECAY_B 1 82 83 #define SIMPLE_AGC(last, target) \ 78 #if defined(PJMEDIA_CONF_USE_AGC) && PJMEDIA_CONF_USE_AGC != 0 79 # define ATTACK_A ((conf->clock_rate / conf->samples_per_frame) >> 4) 80 # define ATTACK_B 1 81 # define DECAY_A 0 82 # define DECAY_B 1 83 84 # define SIMPLE_AGC(last, target) \ 84 85 if (target >= last) \ 85 86 target = (ATTACK_A*(last+1)+ATTACK_B*target)/(ATTACK_A+ATTACK_B); \ 86 87 else \ 87 88 target = (DECAY_A*last+DECAY_B*target)/(DECAY_A+DECAY_B) 89 #else 90 # define SIMPLE_AGC(last, target) 91 #endif 88 92 89 93 #define MAX_LEVEL (32767)
Note: See TracChangeset
for help on using the changeset viewer.