init buffer in lead out on speak

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13787 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-06-16 21:33:31 +00:00
parent d03163bf5d
commit b164cbfe9c
1 changed files with 3 additions and 0 deletions

View File

@ -1888,6 +1888,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
status = switch_core_speech_read_tts(sh, abuf, &ilen, &flags);
if (status != SWITCH_STATUS_SUCCESS) {
write_frame.datalen = (uint32_t) codec->implementation->decoded_bytes_per_packet;
write_frame.samples = (uint32_t) (write_frame.datalen / 2);
memset(write_frame.data, 0, write_frame.datalen);
for (x = 0; !done && x < lead_in_out; x++) {
switch_yield(codec->implementation->microseconds_per_packet);
if (timer) {