修复设备对话没声音的bug
authorxue <2144439972@qq.com>
Thu, 11 Dec 2025 06:44:37 +0000 (14:44 +0800)
committerxue <2144439972@qq.com>
Thu, 11 Dec 2025 06:44:37 +0000 (14:44 +0800)
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdModel.cpp
code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdPresenter.cpp

index 0bb6527..9fef607 100644 (file)
@@ -112,7 +112,7 @@ extern "C" {
                                            m_reminderHideActive(false), m_reminderHideTime(0),
                                            m_otaCountdownActive(false), m_otaCountdownValue(0),
                                            m_countUpActive(false), m_countUpValue(0), m_countUpTarget(0),
-                                           m_currentFps(60),  // 默认60FPS
+                                           m_currentFps(60), 
                                            m_simStatus(0), m_cat1PowerStatus(0), m_signalStrength(0),
                                           m_networkStatus(0), m_networkType(0),
                                           m_hasNetwork(false), m_networkStatusChanged(false),
@@ -2465,7 +2465,7 @@ extern "C" {
 
 
     }
-    
+    // 切换角色
     bool ThunderBirdModel::SwitchExpression(const char* eyeShape, const char* eyeColor)
    {
        // 参数验证
@@ -2516,6 +2516,7 @@ extern "C" {
        return true; // 异步调用,返回 true 表示调用已提交
    }
 
+    // 切换表情
     bool ThunderBirdModel::SwitchExpressionVideo(const char* videoPath)
     {
         // 参数验证
index 6b04eb9..5480c13 100644 (file)
@@ -1201,7 +1201,8 @@ namespace OHOS
                 do_ln_http_server_send_data(LN_HTTP_SERVICE_CMD_GET_CHAT_STAMINA, NULL, 0);
                 // do_custom_cmd_service_check_msg(CUSTOM_CMD_MSG_AUDIO_INIT, NULL, 0);
                 // 音频已在按键按下时初始化,这里直接开始对话
-                //ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST);//开始对话
+                // 初始化音频聊天上下文,确保可以接收服务器消息
+                ln_ws_start_audio_chat(LN_AUDIO_CHAT_VOICE_CHAT_REQUEST);//开始对话
                 
                
             }