summaryrefslogtreecommitdiff
path: root/apps/talk.h
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2020-05-21 12:55:32 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2020-05-22 06:35:22 -0500
commit74f358cf8b909aab5d1b9a157765ef6dcd8fe9dc (patch)
treeb23f607f4141bbd49a3537fe03d97fdd92110dd0 /apps/talk.h
parentbbe8c73bb8c036e33e1f5e30af4a392f11bd0f25 (diff)
downloadrockbox-74f358cf8b909aab5d1b9a157765ef6dcd8fe9dc.tar.gz
rockbox-74f358cf8b909aab5d1b9a157765ef6dcd8fe9dc.zip
talk.h add init status to debug menu
g#2272 adds checks for incompatible version & proper number of clips Currently incompatible talk files will logf when failure to load occurs Adds a message to Debug > Talk engine stats 'Talk Status: OK' 'Talk Status: ERR Incompatible voice file' 'Talk Status: ERR (#)' -- OOM, Alloc Error Change-Id: Ifd2c1f38f710541c9cd929b8abf67bba4363ca53
Diffstat (limited to 'apps/talk.h')
-rw-r--r--apps/talk.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/talk.h b/apps/talk.h
index a643cd4f89..bfd8e496af 100644
--- a/apps/talk.h
+++ b/apps/talk.h
@@ -55,6 +55,15 @@ enum {
55 UNIT_LAST /* END MARKER */ 55 UNIT_LAST /* END MARKER */
56}; 56};
57 57
58/* Status of loading talk file, shown in debug_menu */
59enum talk_status {
60 TALK_STATUS_OK = 0,
61 TALK_STATUS_ERR_OOM,
62 TALK_STATUS_ERR_ALLOC,
63 TALK_STATUS_ERR_NOFILE,
64 TALK_STATUS_ERR_INCOMPATIBLE
65};
66
58#define UNIT_SHIFT (32-5) /* this many bits left from UNIT_xx enum */ 67#define UNIT_SHIFT (32-5) /* this many bits left from UNIT_xx enum */
59 68
60#define DECIMAL_SHIFT (32 - 8) 69#define DECIMAL_SHIFT (32 - 8)
@@ -174,6 +183,7 @@ struct talk_debug_data {
174 int cached_clips; 183 int cached_clips;
175 int cache_hits; 184 int cache_hits;
176 int cache_misses; 185 int cache_misses;
186 enum talk_status status;
177}; 187};
178 188
179bool talk_get_debug_data(struct talk_debug_data *data); 189bool talk_get_debug_data(struct talk_debug_data *data);