talk.h add failed to load splash

Change-Id: Ie355a52bb6c687d302dc3e39693b9ab40e2dd699
This commit is contained in:
William Wilgus 2020-05-22 07:52:01 -05:00
parent 74f358cf8b
commit dcf8154c32
2 changed files with 6 additions and 5 deletions

View file

@ -2369,13 +2369,11 @@ static const char* dbg_talk_get_name(int selected_item, void *data,
buffer = "No voice information available";
break;
case 1:
if (talk_data->status == TALK_STATUS_OK)
buffer = "Talk Status: OK";
else if (talk_data->status != TALK_STATUS_ERR_INCOMPATIBLE)
if (talk_data->status != TALK_STATUS_OK)
snprintf(buffer, buffer_len, "Talk Status: ERR (%i)",
talk_data->status);
else
buffer = "Talk Status: ERR Incompatible voice file";
buffer = "Talk Status: OK";
break;
case 2:
snprintf(buffer, buffer_len, "Number of (empty) clips in voice file: (%d) %d",

View file

@ -31,6 +31,7 @@
#include "kernel.h"
#include "settings.h"
#include "settings_list.h"
#include "splash.h"
#if CONFIG_CODEC == SWCODEC
#include "voice_thread.h"
#else
@ -937,8 +938,10 @@ void talk_init(void)
if (filehandle > 0)
{
if (!load_voicefile_index(filehandle))
{
splashf(HZ * 2, str(LANG_READ_FAILED), ".voice");
goto out;
}
/* Now determine the maximum buffer size needed for the voicefile.
* The below pretends the entire voicefile would be loaded. The buffer
* size is eventually capped later on in load_voicefile_data() */