From 97bafd66db8a77c34679289f2c8b8f2144a23057 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Mon, 6 Aug 2007 18:39:04 +0000 Subject: We only need to have bit-swapped voice files for the SH based archos targets git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14220 a1c6a512-1295-4272-9138-f99709370657 --- tools/voicefont.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/voicefont.c b/tools/voicefont.c index a5e72af567..94f8252e6e 100644 --- a/tools/voicefont.c +++ b/tools/voicefont.c @@ -85,6 +85,8 @@ int main (int argc, char** argv) char mp3filename2[1024]; char* mp3filename; FILE* pMp3File; + int target_id; + int do_bitswap_audio = 0; if (argc < 2) @@ -103,7 +105,14 @@ int main (int argc, char** argv) printf("Error opening language file %s\n", argv[1]); return -2; } - + + /* We bitswap the voice file only SH based archos players, target IDs + equal to or lower than 8. See the target_id line for each target in + configure */ + target_id = atoi(argv[2]); + if (target_id <= 8) + do_bitswap_audio = 1; + memset(voiceonly, 0, sizeof(voiceonly)); while (!feof(pFile)) { @@ -156,7 +165,8 @@ int main (int argc, char** argv) size[i] = fread(buffer, 1, sizeof(buffer), pMp3File); fclose(pMp3File); - BitswapAudio(buffer, buffer, size[i]); + if (do_bitswap_audio) + BitswapAudio(buffer, buffer, size[i]); fwrite(buffer, 1, size[i], pFile); printf("%d %s %d\n", i, names[i], size[i]); /* debug */ -- cgit v1.2.3