From fe0f5baa73e639e0a7ef2e7f4b08e255bac4872a Mon Sep 17 00:00:00 2001 From: Jeffrey Goode Date: Wed, 26 May 2010 03:11:00 +0000 Subject: Fix crash in talk.c logf line when outputting voice only clips, more comments in lang.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26294 a1c6a512-1295-4272-9138-f99709370657 --- apps/talk.c | 10 ++++++++-- tools/genlang | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/talk.c b/apps/talk.c index 0e3ff17..b859975 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -37,7 +37,7 @@ #include "lang.h" #include "talk.h" #include "metadata.h" -/*#define LOGF_ENABLE*/ +#define LOGF_ENABLE #include "logf.h" #include "bitswap.h" #include "structec.h" @@ -628,7 +628,13 @@ int talk_id(int32_t id, bool enqueue) if (clipbuf == NULL) return -1; /* not present */ - logf("\ntalk_id: Say '%s'\n", str(id)); +#ifdef LOGF_ENABLE + if (id > VOICEONLY_DELIMITER) + logf("\ntalk_id: Say voice clip 0x%x\n", id - 1); + else + logf("\ntalk_id: Say '%s'\n", str(id)); +#endif + queue_clip(clipbuf, clipsize, enqueue); return 0; diff --git a/tools/genlang b/tools/genlang index 07eb9f1..ee57396 100755 --- a/tools/genlang +++ b/tools/genlang @@ -658,7 +658,7 @@ MOO $name =~ s/\"//g; # cut off the quotes - printf HFILE_CORE (" %s,\n", $name); + printf HFILE_CORE (" %s, /* 0x%x */\n", $name, $i); } # Output end of enum -- cgit v1.1