Selaa lähdekoodia

连续打断的进入异常状态

xuxinyi 4 kuukautta sitten
vanhempi
commit
4ad48c5e0c
1 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 7 7
      main/application.cc

+ 7 - 7
main/application.cc

@@ -884,16 +884,16 @@ void Application::WakeWordInvoke(const std::string& wake_word) {
                 protocol_->SendWakeWordDetected(wake_word); 
                 protocol_->SendWakeWordDetected(wake_word); 
             }
             }
         }); 
         }); 
-    } else if (device_state_ == kDeviceStateSpeaking) {
+    } else if (device_state_ == kDeviceStateSpeaking || device_state_ == kDeviceStateListening) {
         Schedule([this]() {
         Schedule([this]() {
             AbortSpeaking(kAbortReasonNone);
             AbortSpeaking(kAbortReasonNone);
         });
         });
-    } else if (device_state_ == kDeviceStateListening) {   
-        Schedule([this]() {
-            if (protocol_) {
-                protocol_->CloseAudioChannel();
-            }
-        });
+    // } else if (device_state_ == kDeviceStateListening) {   
+    //     Schedule([this]() {
+    //         if (protocol_) {
+    //             protocol_->CloseAudioChannel();
+    //         }
+    //     });
     }
     }
 }
 }