mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
talk: When no voice file is loaded don't even attempt to load the clip, it's hopeless.
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
This commit is contained in:
parent
543027564c
commit
efc20ec164
1 changed files with 3 additions and 1 deletions
|
@ -908,12 +908,14 @@ int talk_id(int32_t id, bool enqueue)
|
|||
int32_t unit;
|
||||
int decimals;
|
||||
|
||||
if (!has_voicefile)
|
||||
return 0; /* no voicefile loaded, not an error -> pretent success */
|
||||
if (talk_temp_disable_count > 0)
|
||||
return -1; /* talking has been disabled */
|
||||
if (!check_audio_status())
|
||||
return -1;
|
||||
|
||||
if (has_voicefile && (talk_handle <= 0 || index_handle <= 0)) /* reload needed? */
|
||||
if (talk_handle <= 0 || index_handle <= 0) /* reload needed? */
|
||||
{
|
||||
int fd = open_voicefile();
|
||||
if (fd < 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue