summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-08-06 15:01:45 +0000
committerNils Wallménius <nils@rockbox.org>2007-08-06 15:01:45 +0000
commit1ff0c351f77ad14f4a53c7c87b9b9a20c653a2d8 (patch)
treeba6c1d8d022afe1ccac26e5936fd2cefa6f836b3
parent7fe32b9a27e128e7a674ca24db90cf74d3fa6a54 (diff)
Fix red archos sims and make some minor cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14216 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/splash.c2
-rw-r--r--apps/talk.c3
-rw-r--r--apps/talk.h20
3 files changed, 20 insertions, 5 deletions
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 94d9ef6a5c..c690777cc6 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -200,12 +200,14 @@ void gui_syncsplash(int ticks, const unsigned char *fmt, ...)
{
va_list ap;
int i;
+#if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC
long id;
/* fmt may be a so called virtual pointer. See settings.h. */
if((id = P2ID(fmt)) >= 0)
/* If fmt specifies a voicefont ID, and voice menus are
enabled, then speak it. */
cond_talk_ids_fq(id);
+#endif
/* If fmt is a lang ID then get the corresponding string (which
still might contain % place holders). */
fmt = P2STR(fmt);
diff --git a/apps/talk.c b/apps/talk.c
index 3b7ab2a03f..e1bf6cbc5c 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -139,7 +139,8 @@ static void mp3_callback(unsigned char** start, size_t* size);
static int queue_clip(unsigned char* buf, long size, bool enqueue);
static int open_voicefile(void);
static unsigned char* get_clip(long id, long* p_size);
-
+static int shutup(void); /* Interrupt voice, as when enqueue is false */
+static int do_shutup(void); /* kill voice unconditionally */
/***************** Private implementation *****************/
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 */
int talk_get_bufsize(void); /* get the loaded voice file size */
/* talk_buffer_steal - on SWCODEC, for use by buffer functions only */
int talk_buffer_steal(void); /* claim the mp3 buffer e.g. for play/record */
-//int shutup(void); /* Interrupt voice, as when enqueue is false */
-//int do_shutup(void); /* kill voice unconditionally */
bool is_voice_queued(void); /* Are there more voice clips to be spoken? */
int talk_id(long id, bool enqueue); /* play a voice ID from voicefont */
int 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 */
void talk_disable_menus(void); /* disable voice menus (temporarily, not persisted) */
void talk_enable_menus(void); /* re-enable voice menus */
+
+
+
+/* This (otherwise invalid) ID signals the end of the array. */
+#define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY
+
+/* We don't build talk.c for hwcodec sims so we need to define these as empty */
+#if defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)
+#define talk_force_enqueue_next(...)
+#define talk_idarray(...)
+#define talk_ids(...)
+#define cond_talk_ids(...)
+#define cond_talk_ids_fq(...)
+#else
+
/* Enqueue next utterance even if enqueue parameter is false: don't
interrupt the current utterance. */
void talk_force_enqueue_next(void);
/* speaks one or more IDs (from an array)). */
int talk_idarray(long *idarray, bool enqueue);
-/* This (otherwise invalid) ID signals the end of the array. */
-#define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY
/* This makes an initializer for the array of IDs and takes care to
put the final sentinel element at the end. */
#define TALK_IDARRAY(ids...) ((long[]){ids,TALK_FINAL_ID})
@@ -110,4 +121,5 @@ int talk_idarray(long *idarray, bool enqueue);
talk_force_enqueue_next(); \
} \
}while(0)
+#endif /*defined(SIMULATOR) && !(CONFIG_CODEC == SWCODEC)*/
#endif /* __TALK_H__ */