SLOG(LOG_INFO, tts_tag(), "[Player DEBUG] Active thread count : %d", ecore_thread_active_get());
-// if (0 < ttsd_data_get_sound_data_size(current->uid)) {
+ if (0 <= ttsd_data_get_sound_data_size(current->uid)) {
SLOG(LOG_INFO, tts_tag(), "[Player] Run thread");
ecore_thread_run(__play_thread, __end_play_thread, NULL, NULL);
-// }
+ }
return 0;
}
SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to play pcm sound : uid(%d)", uid);
// Change ready state
- ttsd_server_stop(uid);
+ ttsd_server_stop_pcm(uid);
int tmp_pid;
tmp_pid = ttsd_data_get_pid(uid);
SLOG(LOG_INFO, tts_tag(), "[Server] server stop, state(%d)", state);
- if (APP_STATE_PLAYING == state || APP_STATE_PAUSED == state) {
- if (0 != ttsd_player_clear(uid))
- SLOG(LOG_WARN, tts_tag(), "[Server] Fail to ttsd_player_stop()");
-
+ if (APP_STATE_PLAYING == state || APP_STATE_PAUSED == state || APP_STATE_READY == state) {
ttsd_data_set_client_state(uid, APP_STATE_READY);
}
/* Reset all data */
ttsd_data_clear_data(uid);
+ ttsd_player_stop(uid);
+
+
return TTSD_ERROR_NONE;
}