summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-27 10:05:48 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-27 10:05:48 +0100
commitefc20ec1642fd28ce1518f97ef3addef2984cadd (patch)
treee347cefacdf16d7e3486e5c96595bf7c2f4ab0a3 /apps/talk.c
parent543027564cc72ba3effa8d7b00f380b6dafd8494 (diff)
downloadrockbox-efc20ec1642fd28ce1518f97ef3addef2984cadd.tar.gz
rockbox-efc20ec1642fd28ce1518f97ef3addef2984cadd.zip
talk: When no voice file is loaded don't even attempt to load the clip, it's hopeless.
Change-Id: I420155d7f01ca0ea301c0678ac7245d251d365b0
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 3f8a7f3f60..9e46218187 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -908,12 +908,14 @@ int talk_id(int32_t id, bool enqueue)
908 int32_t unit; 908 int32_t unit;
909 int decimals; 909 int decimals;
910 910
911 if (!has_voicefile)
912 return 0; /* no voicefile loaded, not an error -> pretent success */
911 if (talk_temp_disable_count > 0) 913 if (talk_temp_disable_count > 0)
912 return -1; /* talking has been disabled */ 914 return -1; /* talking has been disabled */
913 if (!check_audio_status()) 915 if (!check_audio_status())
914 return -1; 916 return -1;
915 917
916 if (has_voicefile && (talk_handle <= 0 || index_handle <= 0)) /* reload needed? */ 918 if (talk_handle <= 0 || index_handle <= 0) /* reload needed? */
917 { 919 {
918 int fd = open_voicefile(); 920 int fd = open_voicefile();
919 if (fd < 0 921 if (fd < 0