#include "ttsd_server.h"
+#define CLIENT_CLEAN_UP_TIME 500
+
+
typedef enum {
TTSD_SYNTHESIS_CONTROL_DOING = 0,
TTSD_SYNTHESIS_CONTROL_DONE = 1,
/* If engine is running */
static ttsd_synthesis_control_e g_synth_control;
+static Ecore_Timer* g_check_client_timer = NULL;
static Ecore_Timer* g_wait_timer = NULL;
static utterance_t g_utt;
}
int ttsd_send_result(ttse_result_event_e event, const void* data, unsigned int data_size, ttse_audio_type_e audio_type, int rate, void* user_data)
-
{
SLOG(LOG_DEBUG, tts_tag(), "===== SEND SYNTHESIS RESULT START");
ttsd_config_set_screen_reader_callback(__screen_reader_changed_cb);
}
+ g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
+ if (NULL == g_check_client_timer) {
+ SLOG(LOG_WARN, tts_tag(), "[WARNING] Fail to create timer");
+ }
+
return TTSD_ERROR_NONE;
}
ttsd_engine_agent_release();
+ if (NULL != g_check_client_timer) {
+ ecore_timer_del(g_check_client_timer);
+ g_check_client_timer = NULL;
+
+ SLOG(LOG_INFO, tts_tag(), "[INFO] Delete ecore timer handle");
+ }
+
return TTSD_ERROR_NONE;
}
static Eina_Bool __quit_ecore_loop(void *data)
{
ttsd_dbus_close_connection();
-
ttsd_network_finalize();
-
ttsd_finalize();
-
ecore_main_loop_quit();
+
return EINA_FALSE;
}
#include "ttse.h"
-#define CLIENT_CLEAN_UP_TIME 500
-
-static Ecore_Timer* g_check_client_timer = NULL;
-
static ttsd_mode_e g_tts_mode = TTSD_MODE_DEFAULT;
const char* tts_tag()
SLOG(LOG_WARN, tts_tag(), "[WARNING] Fail to initialize network");
}
- g_check_client_timer = ecore_timer_add(CLIENT_CLEAN_UP_TIME, ttsd_cleanup_client, NULL);
- if (NULL == g_check_client_timer) {
- SLOG(LOG_WARN, tts_tag(), "[WARNING] Fail to create timer");
- }
-
SLOG(LOG_DEBUG, tts_tag(), "====");
SLOG(LOG_DEBUG, tts_tag(), "");
}
return ret;
-}
+}
\ No newline at end of file