提交 d3509c6b authored 作者: Anthony Minessale's avatar Anthony Minessale

small change for energy detection stuff

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1783 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 3837f5d2
...@@ -2145,7 +2145,7 @@ static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void * ...@@ -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);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论