typedef struct {
int uid; /** client id */
- app_state_e state; /** client state */
+ app_tts_state_e state; /** client state */
/* Current utterance information */
ttse_result_event_e event; /** event of last utterance */
void __player_focus_state_cb(sound_stream_info_h stream_info, sound_stream_focus_mask_e focus_mask, sound_stream_focus_state_e focus_state,
sound_stream_focus_change_reason_e reason_for_change, int sound_behavior, const char *extra_info, void *user_data)
{
- SLOG(LOG_DEBUG, tts_tag(), "===== Focus state changed cb");
+ SLOG(LOG_DEBUG, tts_tag(), "@@@ Focus state changed cb");
if (stream_info != g_stream_info_h) {
SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Invalid stream info handle");
return;
}
- g_playing_info->state = APP_STATE_PAUSED;
ttsd_data_set_client_state(uid, APP_STATE_PAUSED);
int pid = ttsd_data_get_pid(uid);
/* send message to client about changing state */
}
}
- SLOG(LOG_DEBUG, tts_tag(), "=====");
- SLOG(LOG_DEBUG, tts_tag(), "");
+ SLOG(LOG_DEBUG, tts_tag(), "@@@");
return;
}
static void __end_play_thread(void *data, Ecore_Thread *thread)
{
- SLOG(LOG_ERROR, tts_tag(), "===== End thread");
+ SLOG(LOG_ERROR, tts_tag(), "@@@ End thread");
}
static void __set_policy_for_playing(int volume)
static void __play_thread(void *data, Ecore_Thread *thread)
{
- SLOG(LOG_DEBUG, tts_tag(), "===== Start thread");
+ SLOG(LOG_DEBUG, tts_tag(), "@@@ Start thread");
if (NULL == g_playing_info) {
SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] No current player");
}
}
SLOG(LOG_INFO, tts_tag(), "[Player] Finish utterance : uid(%d), uttid(%d)", player->uid, sound_data->utt_id);
+ if (NULL != sound_data->data) {
+ free(sound_data->data);
+ sound_data->data = NULL;
+ }
+ free(sound_data);
+ sound_data = NULL;
continue;
}
}
int ret;
- SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] @@@@@");
SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] @@@@@");
/* The thread should be released */
int thread_count = ecore_thread_active_get();
current->idx = 0;
if (NULL == g_playing_info) {
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
/* The thread should be released */
int thread_count = ecore_thread_active_get();
thread_count = ecore_thread_active_get();
}
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
}
SLOG(LOG_INFO, tts_tag(), "[Player SUCCESS] Stop player : uid(%d)", uid);
}
current->state = APP_STATE_PAUSED;
-
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
/* The thread should be released */
int thread_count = ecore_thread_active_get();
thread_count = ecore_thread_active_get();
}
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] ==========================");
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_DEBUG, tts_tag(), "[Player SUCCESS] Pause player : uid(%d)", uid);
/* Get handle data from list */
data = (player_s*)iter->data;
- app_state_e state;
+ app_tts_state_e state;
if (0 > ttsd_data_get_client_state(data->uid, &state)) {
SLOG(LOG_ERROR, tts_tag(), "[player ERROR] uid(%d) is not valid", data->uid);
ttsd_player_destroy_instance(data->uid);