SLOG(LOG_DEBUG, TAG_VCM, "@@@ [Manager] Set Demandable client rule(%s) DONE", rule);
- return VC_ERROR_NONE;
+ return ret;
}
int vc_mgr_unset_demandable_client_rule(void)
{
// called by app directly
vc_mgr_core_set_volume(volume);
-
+
return VC_ERROR_NONE;
}
/* waiting */
while (1) {
+ if (ecore_thread_check(thread) == EINA_TRUE) {
+ SLOG(LOG_INFO, TAG_VCM, "[INFO] Stop feedback is called");
+ return;
+ }
+
usleep(10000);
+
if (0 < vc_mgr_data_get_feedback_data_size()) {
SLOG(LOG_INFO, TAG_VCM, "[INFO] Resume thread");
break;
vc_mgr_client_not_use_callback();
pthread_mutex_unlock(&g_feedback_streaming_cb_mutex);
-
- /* If no feedback data and EVENT_FINISH */
- if (0 >= vc_mgr_data_get_feedback_data_size() && VC_FEEDBACK_EVENT_FINISH == feedback_data->event) {
- SLOG(LOG_INFO, TAG_VCM, "[INFO] Finish feedback");
- if (feedback_data) {
- free(feedback_data);
- feedback_data = NULL;
- }
- break;
- }
} else {
vc_mgr_vc_tts_streaming_cb callback = NULL;
void* user_data = NULL;
vc_mgr_client_not_use_callback();
pthread_mutex_unlock(&g_vc_tts_streaming_cb_mutex);
-
- /* If no feedback data and EVENT_FINISH */
- if (0 >= vc_mgr_data_get_feedback_data_size() && VC_FEEDBACK_EVENT_FINISH == feedback_data->event) {
- SLOG(LOG_INFO, TAG_VCM, "[INFO] Finish vc tts feedback");
- if (feedback_data) {
- free(feedback_data);
- feedback_data = NULL;
- }
- break;
- }
}
free(feedback_data);
feedback_data = NULL;
RETVM_IF(VC_STATE_READY != state, VC_ERROR_INVALID_STATE, TAG_VCM, "[ERROR] Stop feedback : Current state is not 'Ready' (%d)", state);
#if 1
- ret = -1;
+ if (g_feedback_thread) {
+ ecore_thread_cancel(g_feedback_thread);
+ g_feedback_thread = NULL;
+ }
+ ret = -1;
while (1) {
vc_feedback_data_s* feedback_data = NULL;
SLOG(LOG_INFO, TAG_VCM, "[DEBUG] Success to recover volume");
return ret;
-}
\ No newline at end of file
+}