fix: resolve some audio issues on esp-hi (#1027)

* fix: resolve crash when closing codec dev on esp-hi

* fix: fix incorrect status display in non-zh-CN languages

* fix: reduce noise when not in Speaking state
This commit is contained in:
laride
2025-08-19 11:50:00 +08:00
committed by GitHub
parent 156eb15f58
commit 2d772dad68
5 changed files with 20 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
#include <esp_log.h>
#include "mmap_generate_emoji.h"
#include "emoji_display.h"
#include "assets/lang_config.h"
#include <esp_lcd_panel_io.h>
#include <freertos/FreeRTOS.h>
@@ -146,9 +147,9 @@ void EmojiWidget::SetEmotion(const char* emotion)
void EmojiWidget::SetStatus(const char* status)
{
if (player_) {
if (strcmp(status, "聆听中...") == 0) {
if (strcmp(status, Lang::Strings::LISTENING) == 0) {
player_->StartPlayer(MMAP_EMOJI_ASKING_AAF, true, 15);
} else if (strcmp(status, "待命") == 0) {
} else if (strcmp(status, Lang::Strings::STANDBY) == 0) {
player_->StartPlayer(MMAP_EMOJI_WAKE_AAF, true, 15);
}
}