ret = sound_manager_add_focus_state_watch_cb(SOUND_STREAM_FOCUS_FOR_PLAYBACK, __player_focus_state_watch_cb, NULL, &g_focus_watch_id);
if (SOUND_MANAGER_ERROR_NONE != ret) {
SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Fail to add sound focus watch callback");
+ sound_manager_destroy_stream_information(g_stream_info_h);
return -1;
} else {
SLOG(LOG_DEBUG, tts_tag(), "[Player SUCCESS] Add sound focus watch callback");
ecore_thread_max_set(1);
ret = __create_audio_out(TTSE_AUDIO_TYPE_RAW_S16, 16000);
- if (0 != ret)
+ if (0 != ret) {
+ sound_manager_destroy_stream_information(g_stream_info_h);
+ sound_manager_remove_focus_state_watch_cb(g_focus_watch_id);
return -1;
+ }
g_player_init = true;