fix(audio): defer and coalesce role switch notices

This commit is contained in:
chenjintao
2026-10-13 15:56:00 +08:00
parent 109a95497a
commit 23983ccdc8
4 changed files with 214 additions and 11 deletions
@@ -108,6 +108,7 @@ static char payload[MQTT_PAYLOAD_SIZE] = {0};
extern int fota_start;
int app_play_ota_tips_file(void);
int app_role_notice_handle_url(const char *url);
int xiaoice_get_play_counter(void);
typedef struct {
@@ -1510,7 +1511,9 @@ void handle_command(command_t *cmd)
app_mqtt_publish(resp, strlen(resp), 0);
free(resp);
add_file_to_play_player_queue(cmd->params.nfc.url, 0);
if (!app_role_notice_handle_url(cmd->params.nfc.url)) {
add_file_to_play_player_queue(cmd->params.nfc.url, 0);
}
break;
}