From 39c9c350ae2f42e83d398c8a446ec99c1cadcfc5 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Wed, 17 Apr 2024 08:57:19 -0400 Subject: voice: Fix voicefile generation I updated the scripts to use a generic '.enc' as the filename as we haven't used true '.mp3' files for some time (and even then, only on the Archos devices) but I missed the voicefont generation tool. Change-Id: I450de9215664b6559058b175afc25aa874d11dcc --- tools/voicefont.c | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) (limited to 'tools') diff --git a/tools/voicefont.c b/tools/voicefont.c index 82ab537b73..2c092dc00c 100644 --- a/tools/voicefont.c +++ b/tools/voicefont.c @@ -18,14 +18,14 @@ * KIND, either express or implied. * * A tool to generate the Rockbox "voicefont", a collection of all the UI - * strings. - * + * strings. + * * Details at http://www.rockbox.org/wiki/VoiceBuilding * ****************************************************************************/ -#include "voicefont.h" - +#include "voicefont.h" + #include #include @@ -59,10 +59,10 @@ int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output, unsi static unsigned char buffer[65535]; /* clip buffer, allow only 64K */ int fields; char line[255]; /* one line from the .lang file */ - char mp3filename1[1024]; - char mp3filename2[1024]; - char* mp3filename; - FILE* pMp3File; + char encfilename1[1024]; + char encfilename2[1024]; + char* encfilename; + FILE* pEncFile; memset(voiceonly, 0, sizeof(voiceonly)); while (!feof(voicefontids)) @@ -97,25 +97,25 @@ int voicefont(FILE* voicefontids,int targetnum,char* filedir, FILE* output, unsi for (i=0; i \n"); + printf("Makes a Rockbox voicefont from a collection of encoded clips.\n"); + printf("Usage: voicefont \n"); printf("\n"); printf("Example: \n"); - printf("voicefont voicefontids.txt 2 voice\\ voicefont.bin\n"); + printf("voicefont voicefontids.txt 2 voice/ voicefont.bin\n"); return -1; } - + ids = fopen(argv[1], "r"); if (ids == NULL) { @@ -207,7 +207,7 @@ int main (int argc, char** argv) printf("Error opening output file %s\n", argv[4]); return -2; } - + if (voicefont(ids, atoi(argv[2]),argv[3],output, 400) < 0) { printf("Error too many voicefont entries!\n"); @@ -216,4 +216,3 @@ int main (int argc, char** argv) return 0; } #endif - -- cgit v1.2.3