/* wait for new audio data come */
while (1) { // 2nd while(1)
usleep(10000);
- if (NULL == g_playing_info) {
+ if (false == __is_player_valid(player)) {
/* current playing uid is replaced */
SLOG(LOG_INFO, tts_tag(), "[Player] Finish thread");
if (AUDIO_STATE_PLAY == g_audio_state) {
SLOG(LOG_DEBUG, tts_tag(), "[Player] No current playing");
}
- pthread_mutex_lock(&g_play_thread_mutex);
if (NULL == g_playing_info) {
- SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
+ pthread_mutex_lock(&g_play_thread_mutex);
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
+ pthread_mutex_unlock(&g_play_thread_mutex);
}
int ret = ttsd_player_clear(uid);
if (0 != ret) {
SLOG(LOG_ERROR, tts_tag(), "[Player ERROR] Fail to stop player, ret(%d)", ret);
- pthread_mutex_unlock(&g_play_thread_mutex);
pthread_mutex_unlock(&g_player_control_mutex);
return ret;
}
- pthread_mutex_unlock(&g_play_thread_mutex);
SLOG(LOG_INFO, tts_tag(), "[Player SUCCESS] Stop player : uid(%d)", uid);
current->state = APP_STATE_PAUSED;
- pthread_mutex_lock(&g_play_thread_mutex);
if (NULL == g_playing_info) {
- SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
+ pthread_mutex_lock(&g_play_thread_mutex);
SLOG(LOG_ERROR, tts_tag(), "[Player] Active thread count : %d", ecore_thread_active_get());
- SLOG(LOG_DEBUG, tts_tag(), "[Player] @@@@@");
+ pthread_mutex_unlock(&g_play_thread_mutex);
}
- pthread_mutex_unlock(&g_play_thread_mutex);
-
SLOG(LOG_DEBUG, tts_tag(), "[Player SUCCESS] Pause player : uid(%d)", uid);