dramatic jitterbuffer changes

This commit is contained in:
Anthony Minessale
2010-12-10 17:47:24 -06:00
parent bbf1cd1f43
commit d547096164
10 changed files with 285 additions and 27 deletions

View File

@@ -2290,7 +2290,7 @@ SWITCH_DECLARE(void) switch_ivr_delay_echo(switch_core_session_t *session, uint3
qlen = delay_ms / (interval);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Setting delay to %dms (%d frames)\n", delay_ms, qlen);
jb = stfu_n_init(qlen, 0);
jb = stfu_n_init(qlen, qlen, read_impl.samples_per_packet, read_impl.samples_per_second);
write_frame.codec = switch_core_session_get_read_codec(session);
@@ -2300,7 +2300,7 @@ SWITCH_DECLARE(void) switch_ivr_delay_echo(switch_core_session_t *session, uint3
break;
}
stfu_n_eat(jb, ts, read_frame->payload, read_frame->data, read_frame->datalen);
stfu_n_eat(jb, ts, 0, read_frame->payload, read_frame->data, read_frame->datalen);
ts += interval;
if ((jb_frame = stfu_n_read_a_frame(jb))) {