summaryrefslogtreecommitdiffstats
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.tar.bz2
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 {
UNIT_LAST /* END MARKER */
};
+/* Status of loading talk file, shown in debug_menu */
+enum talk_status {
+ TALK_STATUS_OK = 0,
+ TALK_STATUS_ERR_OOM,
+ TALK_STATUS_ERR_ALLOC,
+ TALK_STATUS_ERR_NOFILE,
+ TALK_STATUS_ERR_INCOMPATIBLE
+};
+
#define UNIT_SHIFT (32-5) /* this many bits left from UNIT_xx enum */
#define DECIMAL_SHIFT (32 - 8)
@@ -174,6 +183,7 @@ struct talk_debug_data {
int cached_clips;
int cache_hits;
int cache_misses;
+ enum talk_status status;
};
bool talk_get_debug_data(struct talk_debug_data *data);