summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-03 16:13:04 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-06-05 23:24:54 +0200
commitb2380b535e99b4bc49d91bb228598f85362446ca (patch)
tree5144a4e0e9ef8b19e43ec9f71312a5b85901e1fe /tools
parent7c78963bbb09603e8ceb986b478ae4762a6f427b (diff)
downloadrockbox-b2380b535e99b4bc49d91bb228598f85362446ca.tar.gz
rockbox-b2380b535e99b4bc49d91bb228598f85362446ca.zip
voicefont: make format version a parameter.
Make hardcoded format version a parameter to allow adjusting depending on the installed Rockbox version. Rockbox Utility will read the version from the installed version. Since the command line voicefont tool is only intended for use in the current tree it uses a fixed version. Change-Id: I1ec935d47c71961e93b3c6bc6c5d816cd9fc83ff
Diffstat (limited to 'tools')
-rw-r--r--tools/voicefont.c6
-rw-r--r--tools/voicefont.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/voicefont.c b/tools/voicefont.c
index 3b67e97436..4d1363b1bc 100644
--- a/tools/voicefont.c
+++ b/tools/voicefont.c
@@ -70,7 +70,7 @@ int BitswapAudio (unsigned char* pDest, unsigned char* pSrc, size_t len)
70 return 0; 70 return 0;
71} 71}
72 72
73int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output) 73int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output, unsigned int version)
74{ 74{
75 75
76 int i,j; 76 int i,j;
@@ -159,7 +159,7 @@ int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output)
159 /* Create the file format: */ 159 /* Create the file format: */
160 160
161 /* 1st 32 bit value in the file is the version number */ 161 /* 1st 32 bit value in the file is the version number */
162 value = UINT_TO_BE(400); /* 4.00 */ 162 value = UINT_TO_BE(version);
163 fwrite(&value, sizeof(value), 1, output); 163 fwrite(&value, sizeof(value), 1, output);
164 164
165 /* 2nd 32 bit value in the file is the id number for the target 165 /* 2nd 32 bit value in the file is the id number for the target
@@ -243,7 +243,7 @@ int main (int argc, char** argv)
243 return -2; 243 return -2;
244 } 244 }
245 245
246 voicefont(ids, atoi(argv[2]),argv[3],output); 246 voicefont(ids, atoi(argv[2]),argv[3],output, 400);
247 return 0; 247 return 0;
248} 248}
249#endif 249#endif
diff --git a/tools/voicefont.h b/tools/voicefont.h
index 6b603ef9be..dad7589c26 100644
--- a/tools/voicefont.h
+++ b/tools/voicefont.h
@@ -34,7 +34,7 @@
34extern "C" { 34extern "C" {
35#endif 35#endif
36 36
37int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output); 37int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output, unsigned int version);
38 38
39#ifdef __cplusplus 39#ifdef __cplusplus
40} 40}