summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 1610fa95ec..89ab3901c4 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -95,6 +95,7 @@ struct clip_entry /* one entry of the index table */
95struct voicefile /* file format of our voice file */ 95struct voicefile /* file format of our voice file */
96{ 96{
97 int version; /* version of the voicefile */ 97 int version; /* version of the voicefile */
98 int target_id; /* the rockbox target the file was made for */
98 int table; /* offset to index table, (=header size) */ 99 int table; /* offset to index table, (=header size) */
99 int id1_max; /* number of "normal" clips contained in above index */ 100 int id1_max; /* number of "normal" clips contained in above index */
100 int id2_max; /* number of "voice only" clips contained in above index */ 101 int id2_max; /* number of "voice only" clips contained in above index */
@@ -197,6 +198,11 @@ static void load_voicefile(void)
197 { 198 {
198 p_voicefile = (struct voicefile*)audiobuf; 199 p_voicefile = (struct voicefile*)audiobuf;
199 200
201 if (p_voicefile->target_id != TARGET_ID)
202 {
203 logf("Incompatible voice file (wrong target)");
204 goto load_err;
205 }
200#if CONFIG_CODEC != SWCODEC 206#if CONFIG_CODEC != SWCODEC
201 /* MASCODEC: now use audiobuf for voice then thumbnail */ 207 /* MASCODEC: now use audiobuf for voice then thumbnail */
202 p_thumbnail = audiobuf + file_size; 208 p_thumbnail = audiobuf + file_size;