fix(audio): preserve barge-in prompt across OTA
This commit is contained in:
@@ -862,17 +862,23 @@ void sendRecordingAudioPacket(AudioPacket *packet) {
|
||||
|
||||
extern const char *mp3_file[];
|
||||
|
||||
int app_play_tips_file(int index)
|
||||
{
|
||||
int file_valid_check = 0;
|
||||
|
||||
printf("xiaoice_play_index:%d\n", index);
|
||||
|
||||
//正在录音过程中不允许播放
|
||||
// if(xiaoice_get_tts_play_status() || get_start_mic_flag()==1) return -1;
|
||||
if(power_down_status!=1){
|
||||
if(vad_audio_is_recording() || tts_playing!=0 || fota_start==1 || power_down_status==2 || get_sleep_mode()==1) return -1;
|
||||
}
|
||||
int app_play_tips_file(int index)
|
||||
{
|
||||
int file_valid_check = 0;
|
||||
int access_ret = 0;
|
||||
|
||||
printf("xiaoice_play_index:%d\n", index);
|
||||
|
||||
//正在录音过程中不允许播放
|
||||
// if(xiaoice_get_tts_play_status() || get_start_mic_flag()==1) return -1;
|
||||
if(power_down_status!=1){
|
||||
if(vad_audio_is_recording() || tts_playing!=0 || fota_start==1 || power_down_status==2 || get_sleep_mode()==1) {
|
||||
printf("tips blocked:index=%d vad=%d tts=%d fota=%d power=%d sleep=%d\r\n",
|
||||
index, vad_audio_is_recording(), tts_playing, fota_start,
|
||||
power_down_status, get_sleep_mode());
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
char filename_buff[64]={0x00};
|
||||
|
||||
@@ -881,11 +887,14 @@ int app_play_tips_file(int index)
|
||||
if(index==0) {
|
||||
file_valid_check = 0;
|
||||
}else{
|
||||
if(ql_access(filename_buff, 0)==0){
|
||||
file_valid_check = 1;
|
||||
}else{
|
||||
file_valid_check = 2;
|
||||
}
|
||||
access_ret = ql_access(filename_buff, 0);
|
||||
if(access_ret==0){
|
||||
file_valid_check = 1;
|
||||
}else{
|
||||
printf("tips file missing:index=%d path=%s access=%d\r\n",
|
||||
index, filename_buff, access_ret);
|
||||
file_valid_check = 2;
|
||||
}
|
||||
}
|
||||
|
||||
if(file_valid_check!=2){
|
||||
|
||||
Reference in New Issue
Block a user