Adjust pcm_wait_count value
authorJi-hoon Lee <dalton.lee@samsung.com>
Wed, 24 Jul 2019 07:16:42 +0000 (16:16 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 5 Aug 2019 11:01:03 +0000 (20:01 +0900)
Change-Id: I531fba2647588a45a160fe20fa7331183f98ff77

plugins/wakeup-manager/src/wakeup_audio_manager.cpp
plugins/wakeup-manager/src/wakeup_engine_manager.cpp

index 7e3e305..d6c1868 100644 (file)
@@ -11,6 +11,9 @@ namespace multiassistant
 namespace wakeup
 {
 
+/* Need to check whether this value needs to be configurable */
+static int g_speech_pcm_wait_count = 800;
+
 static long get_current_milliseconds_after_epoch()
 {
        auto now = chrono::system_clock::now();
@@ -169,7 +172,7 @@ void CAudioManager::streaming_audio_data_thread_func(long start_time)
                                        MWR_LOGI("[INFO] Resume thread");
                                        break;
                                }
-                               if (200 < cnt) {
+                               if (g_speech_pcm_wait_count < cnt) {
                                        MWR_LOGE("[ERROR] Wrong request, there's no pcm data");
                                        for (const auto& observer : mObservers) {
                                                if (observer) {
index 32d226b..e5f76ed 100644 (file)
@@ -11,6 +11,9 @@ namespace multiassistant
 namespace wakeup
 {
 
+/* Need to check whether this value needs to be configurable */
+static int g_speech_pcm_wait_count = 400;
+
 /* Utility function for checking if an element exists in a container */
 template<class C, class T>
 static auto contains(const C& v, const T& x) -> decltype(end(v), true)
@@ -167,7 +170,7 @@ void CWakeupEngineManager::streaming_speech_data_thread_func()
                                                MWR_LOGI("[INFO] Resume thread");
                                                break;
                                        }
-                                       if (200 < cnt) {
+                                       if (g_speech_pcm_wait_count < cnt) {
                                                MWR_LOGE("[ERROR] Wrong request, there's no pcm data");
                                                for (const auto& observer : mObservers) {
                                                        if (observer) {