From 75c40942e44c112450d943b0a61aae6ff8414af6 Mon Sep 17 00:00:00 2001 From: "sungwook79.park" Date: Wed, 7 Sep 2016 19:26:31 +0900 Subject: [PATCH] Remove unused code Change-Id: I44d6b7578cfb32c118bbe2bc704c465cf331b49b Signed-off-by: sungwook79.park --- inc/w-input-stt-engine.h | 2 -- src/w-input-stt-engine.cpp | 87 ---------------------------------------------- 2 files changed, 89 deletions(-) diff --git a/inc/w-input-stt-engine.h b/inc/w-input-stt-engine.h index 8dbb1df..0cf85e1 100755 --- a/inc/w-input-stt-engine.h +++ b/inc/w-input-stt-engine.h @@ -98,10 +98,8 @@ typedef enum _Feedback_Type{ void set_animation_state(VoiceData *ud); -const char * error_string(int ecode); // STT functions bool _app_stt_initialize(VoiceData *user_data); -void on_feedback(stt_h handle); #if 0 diff --git a/src/w-input-stt-engine.cpp b/src/w-input-stt-engine.cpp index 92075d5..be508bf 100755 --- a/src/w-input-stt-engine.cpp +++ b/src/w-input-stt-engine.cpp @@ -41,93 +41,6 @@ static stt_h g_stt; -const char * error_string(int ecode) -{ - const char *str = NULL; - switch (ecode) { - case STT_ERROR_OUT_OF_MEMORY: - str = "STT_ERROR_OUT_OF_MEMORY"; - break; - case STT_ERROR_IO_ERROR: - str = "STT_ERROR_IO_ERROR"; - break; - case STT_ERROR_INVALID_PARAMETER: - str = "STT_ERROR_INVALID_PARAMETER"; - break; - case STT_ERROR_TIMED_OUT: - str = "STT_ERROR_TIMED_OUT"; - break; - case STT_ERROR_RECORDER_BUSY: - str = "STT_ERROR_RECORDER_BUSY"; - break; - case STT_ERROR_OUT_OF_NETWORK: - str = "STT_ERROR_OUT_OF_NETWORK"; - break; - case STT_ERROR_INVALID_STATE: - str = " STT_ERROR_INVALID_STATE"; - break; - case STT_ERROR_INVALID_LANGUAGE: - str = "STT_ERROR_INVALID_LANGUAGE"; - break; - case STT_ERROR_ENGINE_NOT_FOUND: - str = "STT_ERROR_ENGINE_NOT_FOUND"; - break; - case STT_ERROR_OPERATION_FAILED: - str = "STT_ERROR_OPERATION_FAILED"; - break; - case STT_ERROR_NOT_SUPPORTED_FEATURE: - str = "STT_ERROR_NOT_SUPPORTED_FEATURE"; - break; - } - return str; -} - -void voice_stt_set_silence_detection_func(bool bEnable) -{ - int ret = STT_ERROR_NONE; - - stt_option_silence_detection_e s_option; - - if(bEnable) - s_option = STT_OPTION_SILENCE_DETECTION_TRUE; - else - s_option = STT_OPTION_SILENCE_DETECTION_FALSE; - - ret = stt_set_silence_detection(g_stt, s_option); - if (STT_ERROR_NONE != ret) { - PRINTFUNC(DLOG_ERROR, "stt_set_silence_detection Failed : error(%d) = %s", ret, error_string((stt_error_e)ret)); - } else { - PRINTFUNC(NO_PRINT, "stt_set_silence_detection Successful"); - } -} - - -//////////////////////////////////////////////////////////////////////////////// -// STT Callback functions -//////////////////////////////////////////////////////////////////////////////// - -void on_feedback(stt_h handle) -{ - int is_sound = 0; - int is_sound_vibe = 0; - - if(vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &is_sound)) { - PRINTFUNC(DLOG_ERROR, "get sound status failed."); - } - - if(vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &is_sound_vibe)) { - PRINTFUNC(DLOG_ERROR, "get vibe status failed."); - } - - if (is_sound || is_sound_vibe) { - stt_set_start_sound(handle, "/usr/share/ise-voice-input/audio/voice_start.wav"); - stt_set_stop_sound(handle, "/usr/share/ise-voice-input/audio/voice_stop.wav"); - } else { - stt_unset_start_sound(handle); - stt_unset_stop_sound(handle); - } -} - //////////////////////////////////////////////////////////////////////////////// // STT APIs callers //////////////////////////////////////////////////////////////////////////////// -- 2.7.4