1
0
Fork 0
forked from len0rd/rockbox

talk.c helper functions to voice a filename, in a more generic way

than from tree.c
Voice a file or dir's thumbnail from path components,
or spell last path component. Ability to prefix the thumbnail or
spelling with some talk ids.

This is the talk_file patch from FS#6323, just refactored a bit.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18048 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Stéphane Doyon 2008-07-15 14:55:31 +00:00
parent d3cb2aca44
commit 3eb76d053d
4 changed files with 150 additions and 36 deletions

View file

@ -84,7 +84,17 @@ int talk_get_bufsize(void); /* get the loaded voice file size */
void talk_buffer_steal(void); /* claim the mp3 buffer e.g. for play/record */
bool is_voice_queued(void); /* Are there more voice clips to be spoken? */
int talk_id(int32_t id, bool enqueue); /* play a voice ID from voicefont */
int talk_file(const char* filename, bool enqueue); /* play a thumbnail from file */
/* play a thumbnail from file */
int talk_file(const char *root, const char *dir, const char *file,
const char *ext, long *prefix_ids, bool enqueue);
/* play file's thumbnail or spell name */
int talk_file_or_spell(const char *dirname, const char* filename,
long *prefix_ids, bool enqueue);
/* play dir's thumbnail or spell name */
int talk_dir_or_spell(const char* filename,
long *prefix_ids, bool enqueue);
/* play thumbnails for each components of full path, or spell */
int talk_fullpath(const char* path, bool enqueue);
int talk_number(long n, bool enqueue); /* say a number */
int talk_value(long n, int unit, bool enqueue); /* say a numeric value */
int talk_value_decimal(long n, int unit, int decimals, bool enqueue);