This commit is contained in:
Anthony Minessale 2010-06-28 08:37:11 -05:00
parent 3b1d9f5bef
commit 46064642ba

View File

@ -1952,6 +1952,10 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
} }
/* Check for input volume adjustments */ /* Check for input volume adjustments */
if (!switch_test_flag(member->conference, CFLAG_GAIN_CONTROL)) {
member->agc_volume_in_level = 0;
}
if (switch_test_flag(member->conference, CFLAG_GAIN_CONTROL) && member->agc_volume_in_level) { if (switch_test_flag(member->conference, CFLAG_GAIN_CONTROL) && member->agc_volume_in_level) {
switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->agc_volume_in_level); switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->agc_volume_in_level);
} else if (member->volume_in_level) { } else if (member->volume_in_level) {
@ -2004,11 +2008,11 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
member->agc_concur = 0; member->agc_concur = 0;
} }
if (member->agc_concur >= one_sec / 2) { if (member->agc_concur >= one_sec) {
if (diff > 200) { if (diff > 200) {
member->agc_volume_in_level++; member->agc_volume_in_level++;
if (diff > 200) { if (diff > 400) {
member->agc_volume_in_level++; member->agc_volume_in_level++;
} }