summaryrefslogtreecommitdiff
path: root/apps/talk.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/talk.h')
-rw-r--r--apps/talk.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/apps/talk.h b/apps/talk.h
index 55e7208f1d..28be71884f 100644
--- a/apps/talk.h
+++ b/apps/talk.h
@@ -71,6 +71,26 @@ enum {
71/* convenience macro to have both virtual pointer and ID as arguments */ 71/* convenience macro to have both virtual pointer and ID as arguments */
72#define STR(id) ID2P(id), id 72#define STR(id) ID2P(id), id
73 73
74/* Policy values for how hard to try to keep the talk/voice buffers.
75 * Affects how genereous talk.c is when it's asked for memory in
76 * shrink_callbacks().
77 *
78 * I.e. setting the policy to TALK_BUFFER_LOOSE, it will happily give its
79 * entire bufer away if asked for, e.g. due to a another module
80 * calling core_alloc_maximum(), TALK_BUFFER_HOLD on the other hand will
81 * make it keep the buffers so that a call to core_alloc_maximum() does not
82 * stop the speech-interface.
83 */
84enum talk_buffer_policies {
85 TALK_BUFFER_DEFAULT,
86 TALK_BUFFER_LOOSE,
87 TALK_BUFFER_HOLD,
88};
89
90/* This sets the actual policy. Call this before core_alloc_maximum() to
91 * get the desired outcome */
92void talk_buffer_set_policy(int policy);
93
74/* publish these strings, so they're stored only once (better than #define) */ 94/* publish these strings, so they're stored only once (better than #define) */
75extern const char* const dir_thumbnail_name; /* "_dirname.talk" */ 95extern const char* const dir_thumbnail_name; /* "_dirname.talk" */
76extern const char* const file_thumbnail_ext; /* ".talk" for file voicing */ 96extern const char* const file_thumbnail_ext; /* ".talk" for file voicing */
@@ -81,7 +101,6 @@ bool talk_voice_required(void); /* returns true if voice codec required */
81#endif 101#endif
82int talk_get_bufsize(void); /* get the loaded voice file size */ 102int talk_get_bufsize(void); /* get the loaded voice file size */
83size_t talkbuf_init(char* bufstart); 103size_t talkbuf_init(char* bufstart);
84void talk_buffer_steal(void); /* claim the mp3 buffer e.g. for play/record */
85bool is_voice_queued(void); /* Are there more voice clips to be spoken? */ 104bool is_voice_queued(void); /* Are there more voice clips to be spoken? */
86int talk_id(int32_t id, bool enqueue); /* play a voice ID from voicefont */ 105int talk_id(int32_t id, bool enqueue); /* play a voice ID from voicefont */
87/* play a thumbnail from file */ 106/* play a thumbnail from file */