summaryrefslogtreecommitdiff
path: root/apps/talk.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/talk.h')
-rw-r--r--apps/talk.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/apps/talk.h b/apps/talk.h
index d471ec7ca8..5374ae9b20 100644
--- a/apps/talk.h
+++ b/apps/talk.h
@@ -66,8 +66,6 @@ bool talk_voice_required(void); /* returns true if voice codec required */
66int talk_get_bufsize(void); /* get the loaded voice file size */ 66int talk_get_bufsize(void); /* get the loaded voice file size */
67/* talk_buffer_steal - on SWCODEC, for use by buffer functions only */ 67/* talk_buffer_steal - on SWCODEC, for use by buffer functions only */
68int talk_buffer_steal(void); /* claim the mp3 buffer e.g. for play/record */ 68int talk_buffer_steal(void); /* claim the mp3 buffer e.g. for play/record */
69//int shutup(void); /* Interrupt voice, as when enqueue is false */
70//int do_shutup(void); /* kill voice unconditionally */
71bool is_voice_queued(void); /* Are there more voice clips to be spoken? */ 69bool is_voice_queued(void); /* Are there more voice clips to be spoken? */
72int talk_id(long id, bool enqueue); /* play a voice ID from voicefont */ 70int talk_id(long id, bool enqueue); /* play a voice ID from voicefont */
73int talk_file(const char* filename, bool enqueue); /* play a thumbnail from file */ 71int talk_file(const char* filename, bool enqueue); /* play a thumbnail from file */
@@ -78,14 +76,27 @@ bool talk_menus_enabled(void); /* returns true if menus should be voiced */
78void talk_disable_menus(void); /* disable voice menus (temporarily, not persisted) */ 76void talk_disable_menus(void); /* disable voice menus (temporarily, not persisted) */
79void talk_enable_menus(void); /* re-enable voice menus */ 77void talk_enable_menus(void); /* re-enable voice menus */
80 78
79
80
81
82/* This (otherwise invalid) ID signals the end of the array. */
83#define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY
84
85/* We don't build talk.c for hwcodec sims so we need to define these as empty */
86#if defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)
87#define talk_force_enqueue_next(...)
88#define talk_idarray(...)
89#define talk_ids(...)
90#define cond_talk_ids(...)
91#define cond_talk_ids_fq(...)
92#else
93
81/* Enqueue next utterance even if enqueue parameter is false: don't 94/* Enqueue next utterance even if enqueue parameter is false: don't
82 interrupt the current utterance. */ 95 interrupt the current utterance. */
83void talk_force_enqueue_next(void); 96void talk_force_enqueue_next(void);
84 97
85/* speaks one or more IDs (from an array)). */ 98/* speaks one or more IDs (from an array)). */
86int talk_idarray(long *idarray, bool enqueue); 99int talk_idarray(long *idarray, bool enqueue);
87/* This (otherwise invalid) ID signals the end of the array. */
88#define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY
89/* This makes an initializer for the array of IDs and takes care to 100/* This makes an initializer for the array of IDs and takes care to
90 put the final sentinel element at the end. */ 101 put the final sentinel element at the end. */
91#define TALK_IDARRAY(ids...) ((long[]){ids,TALK_FINAL_ID}) 102#define TALK_IDARRAY(ids...) ((long[]){ids,TALK_FINAL_ID})
@@ -110,4 +121,5 @@ int talk_idarray(long *idarray, bool enqueue);
110 talk_force_enqueue_next(); \ 121 talk_force_enqueue_next(); \
111 } \ 122 } \
112 }while(0) 123 }while(0)
124#endif /*defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)*/
113#endif /* __TALK_H__ */ 125#endif /* __TALK_H__ */