return 0;
}
+static void __recorder_destroy_by_error_result(void *data)
+{
+ SLOG(LOG_DEBUG, TAG_STTD, "[Engine Agent] Destroy recorder");
+ if (0 != sttd_recorder_destroy())
+ SECURE_SLOG(LOG_WARN, TAG_STTD, "[Engine Agent] Fail to destroy recorder");
+
+ return;
+}
+
int sttd_engine_agent_send_result(stte_result_event_e event, const char* type, const char** result, int result_count,
const char* msg, void* time_info, void *user_data)
{
#ifdef AUDIO_CREATE_ON_START
if (event == STTE_RESULT_EVENT_ERROR) {
- SLOG(LOG_DEBUG, TAG_STTD, "[Engine Agent] Destroy recorder");
- if (0 != sttd_recorder_destroy())
- SECURE_SLOG(LOG_WARN, TAG_STTD, "[Engine Agent] Fail to destroy recorder");
+ ecore_main_loop_thread_safe_call_async(__recorder_destroy_by_error_result, NULL);
}
#endif