From fc20408ad41558eca8f3aa7997806064cb8b4623 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 30 Jan 2008 17:23:17 +0000 Subject: [PATCH] zig git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7437 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_conference/mod_conference.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 24cee76d6d..d9dc07104a 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -1513,7 +1513,8 @@ static void conference_loop_output(conference_member_t * member) uint32_t tsamples = member->orig_read_codec->implementation->samples_per_frame; uint32_t low_count = 0, bytes = samples * 2; call_list_t *call_list = NULL, *cp = NULL; - + uint32_t file_intervals = member->conference->interval / (member->orig_read_codec->implementation->microseconds_per_frame / 1000); + switch_assert(member->conference != NULL); if (switch_core_timer_init(& timer, member->conference->timer_name, interval, tsamples, NULL) != SWITCH_STATUS_SUCCESS) { @@ -1689,6 +1690,7 @@ static void conference_loop_output(conference_member_t * member) if (file_sample_len <= 0) { member->fnode->done++; } else { /* there is file node data to deliver */ + int ic; write_frame.data = file_frame; write_frame.datalen = (uint32_t) file_data_len; write_frame.samples = (uint32_t) file_sample_len; @@ -1698,8 +1700,10 @@ static void conference_loop_output(conference_member_t * member) } write_frame.timestamp = timer.samplecount; switch_core_session_write_frame(member->session, &write_frame, -1, 0); - switch_core_timer_next(&timer); - + for (ic = 0; ic < file_intervals; ic++) { + switch_core_timer_next(&timer); + } + /* forget the conference data we played file node data instead */ switch_set_flag_locked(member, MFLAG_FLUSH_BUFFER); }