FS-3399 --resolve
This commit is contained in:
parent
3668d788da
commit
845330eefa
|
@ -2181,6 +2181,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
|||
}
|
||||
}
|
||||
|
||||
switch_channel_audio_sync(channel);
|
||||
|
||||
ilen = len;
|
||||
for (;;) {
|
||||
switch_event_t *event;
|
||||
|
@ -2346,7 +2348,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text_handle(switch_core_session
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
done:
|
||||
|
@ -2377,8 +2378,12 @@ SWITCH_DECLARE(void) switch_ivr_clear_speech_cache(switch_core_session_t *sessio
|
|||
if (cache_obj->timer.interval) {
|
||||
switch_core_timer_destroy(&cache_obj->timer);
|
||||
}
|
||||
switch_core_speech_close(&cache_obj->sh, &flags);
|
||||
switch_core_codec_destroy(&cache_obj->codec);
|
||||
if (&cache_obj->sh && cache_obj->sh.speech_interface) {
|
||||
switch_core_speech_close(&cache_obj->sh, &flags);
|
||||
}
|
||||
if (&cache_obj->codec) {
|
||||
switch_core_codec_destroy(&cache_obj->codec);
|
||||
}
|
||||
switch_channel_set_private(channel, SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -2412,7 +2417,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
|
|||
timer = <imer;
|
||||
|
||||
if ((var = switch_channel_get_variable(channel, SWITCH_CACHE_SPEECH_HANDLES_VARIABLE)) && switch_true(var)) {
|
||||
if ((cache_obj = switch_channel_get_private(channel, SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME))) {
|
||||
if ((cache_obj = (cached_speech_handle_t *) switch_channel_get_private(channel, SWITCH_CACHE_SPEECH_HANDLES_OBJ_NAME))) {
|
||||
need_create = 0;
|
||||
if (!strcasecmp(cache_obj->tts_name, tts_name)) {
|
||||
need_alloc = 0;
|
||||
|
@ -2422,7 +2427,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_speak_text(switch_core_session_t *ses
|
|||
}
|
||||
|
||||
if (!cache_obj) {
|
||||
cache_obj = switch_core_session_alloc(session, sizeof(*cache_obj));
|
||||
cache_obj = (cached_speech_handle_t *) switch_core_session_alloc(session, sizeof(*cache_obj));
|
||||
}
|
||||
if (need_alloc) {
|
||||
switch_copy_string(cache_obj->tts_name, tts_name, sizeof(cache_obj->tts_name));
|
||||
|
|
Loading…
Reference in New Issue