small change for energy detection stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1783 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2006-07-07 13:38:14 +00:00
parent 3837f5d242
commit d3509c6b98
1 changed files with 1 additions and 1 deletions

View File

@ -2145,7 +2145,7 @@ static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void *
} }
/* skip frames that are not actual media or when we are muted or silent */ /* skip frames that are not actual media or when we are muted or silent */
if (talking && switch_test_flag(member, MFLAG_CAN_SPEAK)) { if ((talking || energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK)) {
/* Write the audio into the input buffer */ /* Write the audio into the input buffer */
switch_mutex_lock(member->audio_in_mutex); switch_mutex_lock(member->audio_in_mutex);
switch_buffer_write(member->audio_buffer, read_frame->data, read_frame->datalen); switch_buffer_write(member->audio_buffer, read_frame->data, read_frame->datalen);