some more channels updates

This commit is contained in:
Anthony Minessale 2014-06-13 05:13:43 +05:00
parent 579a051867
commit 7642d846a9
2 changed files with 3 additions and 3 deletions

View File

@ -1075,7 +1075,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
break;
}
}
write_frame.datalen = (uint32_t) (ringback.asis ? olen : olen * 2);
write_frame.datalen = (uint32_t) (ringback.asis ? olen : olen * 2 * ringback.fh.channels);
} else if (ringback.audio_buffer) {
if ((write_frame.datalen = (uint32_t) switch_buffer_read_loop(ringback.audio_buffer,
write_frame.data,
@ -3188,7 +3188,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
break;
}
}
write_frame.datalen = (uint32_t) (ringback.asis ? olen : olen * 2);
write_frame.datalen = (uint32_t) (ringback.asis ? olen : olen * 2 ( ringback.fh.channels);
write_frame.samples = (uint32_t) olen;
} else if (ringback.audio_buffer) {

View File

@ -1861,7 +1861,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_silence(switch_core_session_
}
write_frame.samples = (uint32_t) olen;
write_frame.datalen = (uint32_t) (olen * sizeof(int16_t));
write_frame.datalen = (uint32_t) (olen * sizeof(int16_t) * fh.channels);
if ((status = switch_core_session_write_frame(session, &write_frame, SWITCH_IO_FLAG_NONE, 0)) != SWITCH_STATUS_SUCCESS) {
break;
}