mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-07 04:03:53 +00:00
fix MODAPP-59
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7002 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
a48149e25e
commit
756970153c
@ -1909,8 +1909,9 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t * t
|
|||||||
switch_core_file_set_string(&fh, SWITCH_AUDIO_COL_STR_ARTIST, "FreeSWITCH mod_conference Software Conference Module");
|
switch_core_file_set_string(&fh, SWITCH_AUDIO_COL_STR_ARTIST, "FreeSWITCH mod_conference Software Conference Module");
|
||||||
|
|
||||||
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(conference, CFLAG_RUNNING) && conference->count) {
|
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(conference, CFLAG_RUNNING) && conference->count) {
|
||||||
|
switch_size_t len;
|
||||||
mux_used = (uint32_t) switch_buffer_inuse(member->mux_buffer);
|
mux_used = (uint32_t) switch_buffer_inuse(member->mux_buffer);
|
||||||
|
|
||||||
if (switch_test_flag(member, MFLAG_FLUSH_BUFFER)) {
|
if (switch_test_flag(member, MFLAG_FLUSH_BUFFER)) {
|
||||||
if (mux_used) {
|
if (mux_used) {
|
||||||
switch_mutex_lock(member->audio_out_mutex);
|
switch_mutex_lock(member->audio_out_mutex);
|
||||||
@ -1928,18 +1929,26 @@ static void *SWITCH_THREAD_FUNC conference_record_thread_run(switch_thread_t * t
|
|||||||
|
|
||||||
if ((rlen = (uint32_t) switch_buffer_read(member->mux_buffer, data, sizeof(data)))) {
|
if ((rlen = (uint32_t) switch_buffer_read(member->mux_buffer, data, sizeof(data)))) {
|
||||||
if (!switch_test_flag((&fh), SWITCH_FILE_PAUSE)) {
|
if (!switch_test_flag((&fh), SWITCH_FILE_PAUSE)) {
|
||||||
switch_size_t len = (switch_size_t) rlen / sizeof(int16_t);
|
len = (switch_size_t) rlen / sizeof(int16_t);
|
||||||
if (switch_core_file_write(&fh, data, &len) != SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Failed\n");
|
|
||||||
switch_clear_flag_locked(member, MFLAG_RUNNING);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(member->audio_out_mutex);
|
switch_mutex_unlock(member->audio_out_mutex);
|
||||||
} else {
|
} else {
|
||||||
switch_core_timer_next(&timer);
|
if (!switch_test_flag((&fh), SWITCH_FILE_PAUSE)) {
|
||||||
|
len = (switch_size_t) samples;
|
||||||
|
memset(data, 0, len);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} /* Rinse ... Repeat */
|
|
||||||
|
if (!switch_test_flag((&fh), SWITCH_FILE_PAUSE)) {
|
||||||
|
if (switch_core_file_write(&fh, data, &len) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Failed\n");
|
||||||
|
switch_clear_flag_locked(member, MFLAG_RUNNING);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_core_timer_next(&timer);
|
||||||
|
} /* Rinse ... Repeat */
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user