summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-08-05 19:19:39 +0000
committerNils Wallménius <nils@rockbox.org>2007-08-05 19:19:39 +0000
commitb3113674819cd8daf44750d129c5d8298e830df0 (patch)
treeebc7ec9e096e309ef79834802eed28ff9c22fd41 /apps/talk.c
parente70f7f4ca857e9e88a6e076360b6c9c235d7739b (diff)
downloadrockbox-b3113674819cd8daf44750d129c5d8298e830df0.tar.gz
rockbox-b3113674819cd8daf44750d129c5d8298e830df0.zip
*** Lang v2 cleanup (FS#6574) ***
1) Introduces apps/features.txt that controls which strings are included for each target based on defines. 2) .lng and .voice files are now target specific and the format versions of both these file types have been bumped, which means that new voice files are needed. 3) Use the 'features' mechanism to exclude strings for targets that didn't use them. 4) Delete unused and deprecated and duplicated strings, sort strings in english.lang Some string IDs were changed so translations will be slightly worse than before. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14198 a1c6a512-1295-4272-9138-f99709370657
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;