Make streaming thread to exit when stop request received 40/201740/5
authorJi-hoon Lee <dalton.lee@samsung.com>
Tue, 19 Mar 2019 06:45:36 +0000 (15:45 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Tue, 26 Mar 2019 07:09:47 +0000 (16:09 +0900)
Change-Id: Id772476569eafe62a300b58f5843469947a0d693

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

index fb9ae91bef131792d746f536675c8a6956c1d959..ffea203af25ac7a470e960d9dbfa45f4001d7857 100644 (file)
@@ -307,7 +307,7 @@ void CAudioManager::streaming_thread_func(void)
 
        int index = 0;
 
-       while (1) {
+       while (!(mStopStreamingThread.load())) {
                int ret = -1;
                int cnt = 0;
 
index 2d607fd8f981c6a356265550f4468870307e6ada..90e68e7e3be0fcb81dc7ead08e121b765d5377e5 100644 (file)
@@ -915,7 +915,7 @@ static void engine_data_thread_func(void)
        wakeup_speech_data speech_data;
        int index = 0;
 
-       while (1) {
+       while (!(g_engine_data_thread_should_stop.load())) {
                int ret = -1;
                int cnt = 0;