int16_t prevSubView_{0};
// 网络状态变化标志(-1 未初始化,0 无网络,1 有网络)
int8_t lastNetworkOnline_{-1};
+ // 防止GoBackToPreviousView循环跳转的标志位
+ bool isGoingBack_{false};
UIImageView *curFace{nullptr};
DialVideoView *videoPlayer_ = nullptr;
UILiteSurfaceView *surfaceView_ = nullptr;
#include <vector>
#include <string>
#include <fstream>
+#include <queue>
+#include <mutex>
#include <cstring>
#include "AppViewIDs.h"
// #include "UiConfig.h"
// 恢复视频帧率
void HighFrequence();
+ // 音频播放开始处理函数
+ void HandleAudioPlaybackStart();
// 音频播放结束处理函数
void HandleAudioPlaybackEnd();
+ // NPC表情变化处理函数
+ void HandleNpcEmotionChange(const char* emotion);
+
+ // 音频文本队列操作函数
+ void EnqueueAudioText(const std::string& text);
+ void DequeueAndPushAudioText();
+ bool HasAudioTextInQueue();
+ void ClearAudioTextQueue();
// 对话状态显示相关函数
void SetCurrentExpression(const std::string& expression);
std::vector<ReminderData> m_reminders;
uint32_t m_nextReminderId;
std::string m_currentTimeStr;
+ // 音频播放文本队列存储
+ std::queue<std::string> m_audioTextQueue; // 音频文本队列
+ std::mutex m_textQueueMutex; // 文本队列互斥锁
+ bool m_hasTextProcessing; // 是否有文本正在处理中
// OTA升级状态
int m_otaStatus;
void ThunderBirdDialogueView::AudioPlaybackEnd()
{
if(!TextLabel || !TextLabel_Y) return;
- TextLabel->SetText("");
- TextLabel_Y->SetText("");
+ //TextLabel->SetText("还有什么想聊的吗?");
+ //TextLabel_Y->SetText("还有什么想聊的吗?");
if(speakAnimator) {speakAnimator->Stop();}
}
}