static sound_stream_info_h g_stream_info_h;
static int g_focus_watch_id;
+
+
/*
* Internal Interfaces
*/
ret = sound_manager_get_current_playback_focus(&reason, &sound_behavior, &extra_info);
- SLOG(LOG_DEBUG, tts_tag(), "[Player] current playback focus: extra_info(%s), reason(%d), sound_behavior(%d)", extra_info, reason, sound_behavior, extra_info);
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] current playback focus: extra_info(%s), reason(%d), sound_behavior(%d)", extra_info, reason, sound_behavior);
if (SOUND_MANAGER_ERROR_NONE == ret && NULL != extra_info && 0 < strlen(extra_info)) {
if (SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION == reason && 0 == strncmp(extra_info, "TTSD_MODE_INTERRUPT", strlen(extra_info))) {
}
if (g_sampling_rate != sound_data->rate || g_audio_type != sound_data->audio_type) {
- SLOG(LOG_DEBUG, tts_tag(), "[Player] Change audio handle : org type(%d) org rate(%d)", g_audio_type, g_sampling_rate);
+ SLOG(LOG_INFO, tts_tag(), "[Player] Change audio handle : org type(%d) org rate(%d)", g_audio_type, g_sampling_rate);
if (NULL != g_audio_h) {
__destroy_audio_out();
}
return;
}
+ SLOG(LOG_INFO, tts_tag(), "[Player INFO] Success to destroy and recreate audio out");
__set_policy_for_playing(40);
}
if (APP_STATE_PAUSED == player->state) {
/* Save data */
+ SLOG(LOG_DEBUG, tts_tag(), "[Player] player(%p)", player);
player->paused_data = sound_data;
player->is_paused_data = true;
player->idx = idx;
g_audio_state = AUDIO_STATE_READY;
+
SLOG(LOG_INFO, tts_tag(), "[Player] Stop player thread by pause");
/* Request prepare */
if (NULL != g_playing_info) {
if (uid == g_playing_info->uid) {
/* release current playing info */
+ SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] release current playing info (%d)", uid);
g_playing_info = NULL;
} else {
/* error case */
}
}
+ SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] current player (%p), g_playing_info(%p)", current, g_playing_info);
+
current->state = APP_STATE_PAUSED;
- 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] @@@@@");
+ if (NULL == g_playing_info) {
+ 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] @@@@@");
- /* The thread should be released */
- int thread_count = ecore_thread_active_get();
- int count = 0;
- while (0 < thread_count) {
- usleep(10000);
+ /* The thread should be released */
+ int thread_count = ecore_thread_active_get();
+ int count = 0;
+ while (0 < thread_count) {
+ usleep(10000);
- count++;
- if (30 == count) {
- SLOG(LOG_WARN, tts_tag(), "[Player WARNING!!] Thread is blocked. Player release continue.");
- break;
+ count++;
+ SLOG(LOG_DEBUG, tts_tag(), "[Player DEBUG] current(%p), state(%d)", current, current->state);
+
+ if (30 == count) {
+ SLOG(LOG_WARN, tts_tag(), "[Player WARNING!!] Thread is blocked. Player release continue. current(%p) current state(%d)", current, current->state);
+ break;
+ }
+
+ thread_count = ecore_thread_active_get();
}
- thread_count = ecore_thread_active_get();
+ 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_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
SLOG(LOG_DEBUG, tts_tag(), "[Player SUCCESS] Pause player : uid(%d)", uid);