From 95c62df6b473ae07047bb9fe0671d8cb0ebeec26 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Fri, 16 Jan 2026 11:03:56 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E6=95=85=E4=BA=8B5s=E4=B8=BA?= =?utf8?q?=E6=92=AD=E6=94=BE=E9=9F=B3=E9=A2=91=E7=BB=93=E6=9D=9F=E5=AE=9A?= =?utf8?q?=E6=97=B6=E5=99=A8=E5=BC=80=E5=90=AF=E4=BD=8D=E7=BD=AE=EF=BC=8C?= =?utf8?q?=E5=BA=94=E8=AF=A5=E5=9C=A8=E7=AC=AC=E4=B8=80=E5=8F=A5=E9=9F=B3?= =?utf8?q?=E9=A2=91=E7=BB=93=E6=9D=9F=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/thunderbird/include/ThunderBirdModel.h | 1 + .../nativeui/thunderbird/src/ThunderBirdLullabyView.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h index 810940121..29fb123ca 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/include/ThunderBirdModel.h @@ -447,6 +447,7 @@ namespace OHOS // 故事模式相关标志 bool m_storyModeFinished = false; // 故事模式是否已finished(收到finished=true) + bool m_firstStoryAudioPlayed = false; // 故事模式第一句音频是否已播放完成 void* m_storyModeTimeoutTimer; // 故事模式超时定时器(1分钟无文本切换则退出) void* m_storyAudioPlaybackTimeoutTimer; // 故事模式音频播放超时定时器(5秒内无音频播放则退出) diff --git a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp index 8257307db..7c8799713 100644 --- a/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp +++ b/code/sdk/application/wearable/ln/nativeapp/nativeui/thunderbird/src/ThunderBirdLullabyView.cpp @@ -344,11 +344,13 @@ namespace OHOS // 重置故事模式finished标志,确保每次进入故事模式时标志位是干净的 ThunderBirdModel::GetInstance()->ResetStoryModeFinished(); + // 重置第一句音频播放标志,确保每次进入故事模式时标志位是干净的 + ThunderBirdModel::GetInstance()->ResetFirstStoryAudioPlayed(); + // 启动故事模式超时定时器(1分钟无文本切换则退出) ThunderBirdModel::GetInstance()->StartStoryModeTimeoutTimer(); - // 启动故事模式音频播放超时定时器(5秒内无音频播放则退出) - ThunderBirdModel::GetInstance()->StartStoryAudioPlaybackTimeoutTimer(); + // 注意:5秒音频播放超时定时器将在第一句音频播放完成后才启动 // 进入故事模式时关闭VAD WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "进入故事模式,关闭VAD"); -- 2.17.1