[Scummvm-cvs-logs] SF.net SVN: scummvm: [27908] tools/branches/gsoc2007-toolsgui

lightcast at users.sourceforge.net lightcast at users.sourceforge.net
Thu Jul 5 01:03:34 CEST 2007


Revision: 27908
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27908&view=rev
Author:   lightcast
Date:     2007-07-04 16:03:34 -0700 (Wed, 04 Jul 2007)

Log Message:
-----------
Update help message to reflect addition of libvorbis and libflac to compress.c.

Modified Paths:
--------------
    tools/branches/gsoc2007-toolsgui/compress_agos.c
    tools/branches/gsoc2007-toolsgui/compress_saga.cpp
    tools/branches/gsoc2007-toolsgui/compress_scumm_sou.c
    tools/branches/gsoc2007-toolsgui/compress_sword1.c
    tools/branches/gsoc2007-toolsgui/compress_sword2.c
    tools/branches/gsoc2007-toolsgui/compress_touche.c
    tools/branches/gsoc2007-toolsgui/encode_dxa.cpp

Modified: tools/branches/gsoc2007-toolsgui/compress_agos.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_agos.c	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_agos.c	2007-07-04 23:03:34 UTC (rev 27908)
@@ -74,11 +74,11 @@
 	unlink(TEMP_RAW);
 	unlink(tempEncoded);
 	unlink(TEMP_WAV);
-	
+
 	exit(0);
 }
 
-	
+
 static int get_offsets(uint32 filenums[], uint32 offsets[])
 {
 	int i;
@@ -148,7 +148,7 @@
 
 void showhelp(char *exename)
 {
-	printf("\nUsage: %s <params> [<file> | mac]\n", exename);
+	printf("\nUsage: %s [params] (<file> | mac)\n", exename);
 
 	printf("\nParams:\n");
 	printf(" --mp3        encode to MP3 format (default)\n");
@@ -173,8 +173,12 @@
 	printf(" --silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf(" [params]     optional arguments passed directly to the encoder\n");
-	printf("              recommended is: --best -b 1152\n");
+ 	printf(" --fast       FLAC uses compresion level 0\n");
+ 	printf(" --best       FLAC uses compresion level 8\n");
+ 	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+ 	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+ 	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n --help     this help message\n");
 
@@ -253,7 +257,7 @@
 	char tmp[256];
 	uint32 filenums[32768];
 	uint32 offsets[32768];
-	
+
 	sprintf(infile_base, "simon2");
 
 	input = fopen("voices.idx", "rb");
@@ -295,7 +299,7 @@
 			sprintf(tmp, "voices%d.dat", filenums[i]);
 			if (input)
 				fclose(input);
-			input = fopen(tmp, "rb"); 
+			input = fopen(tmp, "rb");
 			if (!input) {
 				printf("Cannot open file: %s\n", tmp);
 				exit(-1);
@@ -311,7 +315,7 @@
 int main(int argc, char *argv[])
 {
 	int i;
-	
+
 	if (argc < 2)
 		showhelp(argv[0]);
 

Modified: tools/branches/gsoc2007-toolsgui/compress_saga.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_saga.cpp	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_saga.cpp	2007-07-04 23:03:34 UTC (rev 27908)
@@ -19,7 +19,7 @@
  *
  * $URL$
  * $Id$
- * 
+ *
  */
 
 #include "compress.h"
@@ -194,7 +194,7 @@
 	uint32 size;
 	char fbuf[2048];
 	FILE * tempf;
-	
+
 	tempf = fopen(fromFileName, "rb");
 	if (tempf == NULL)
 		error("Unable to open %s", fromFileName);
@@ -211,7 +211,7 @@
 	uint32 size;
 	char fbuf[2048];
 	FILE * tempf;
-	
+
 	tempf = fopen(toFileName, "wb");
 	if (tempf == NULL)
 		error("Unable to open %s", toFileName);
@@ -228,7 +228,7 @@
 
 void writeBufferToFile(uint8* data, uint32 inputSize, const char* toFileName) {
 	FILE * tempf;
-	
+
 	tempf = fopen(toFileName, "wb");
 	if (tempf == NULL)
 		error("Unable to open %s", toFileName);
@@ -248,7 +248,7 @@
 	Common::File inputFileStream(inputFile);
 	int rate, size;
 	byte flags;
-	
+
 	if (currentFileDescription->resourceType == kSoundVOC) {
 		inputData = Audio::loadVOCFromStream(inputFileStream, size, rate);
 		sampleSize = size;
@@ -259,7 +259,7 @@
 		free(inputData);
 		writeHeader(outputFile);
 
-		setRawAudioType( true, false, !isSigned, 8);
+		setRawAudioType( true, false, 8);
 		encodeAudio(TEMP_RAW, true, sampleRate, tempEncoded, gCompMode);
 		return copyFile(tempEncoded, outputFile) + HEADER_SIZE;
 	}
@@ -271,7 +271,7 @@
 		sampleStereo = currentFileDescription->stereo;
 		writeHeader(outputFile);
 
-		setRawAudioType( !currentFileDescription->swapEndian, currentFileDescription->stereo, !isSigned, sampleBits);
+		setRawAudioType( !currentFileDescription->swapEndian, currentFileDescription->stereo, sampleBits);
 		encodeAudio(TEMP_RAW, true, currentFileDescription->frequency, tempEncoded, gCompMode);
 		return copyFile(tempEncoded, outputFile) + HEADER_SIZE;
 	}
@@ -287,7 +287,7 @@
 
 		copyFile(inputFile, size, TEMP_RAW);
 
-		setRawAudioType( true, sampleStereo != 0, !isSigned, sampleBits);
+		setRawAudioType( true, sampleStereo != 0, sampleBits);
 		encodeAudio(TEMP_RAW, true, sampleRate, tempEncoded, gCompMode);
 		return copyFile(tempEncoded, outputFile) + HEADER_SIZE;
 	}
@@ -302,7 +302,7 @@
 		sampleStereo = currentFileDescription->stereo;
 		writeHeader(outputFile);
 
-		setRawAudioType( !currentFileDescription->swapEndian, currentFileDescription->stereo, !isSigned, sampleBits);
+		setRawAudioType( !currentFileDescription->swapEndian, currentFileDescription->stereo, sampleBits);
 		encodeAudio(TEMP_RAW, true, currentFileDescription->frequency, tempEncoded, gCompMode);
 		return copyFile(tempEncoded, outputFile) + HEADER_SIZE;
 		*/
@@ -348,12 +348,12 @@
 		error("Something's wrong with your resource file");
 	}
 
-	// Go to beginning of the table 
+	// Go to beginning of the table
 	fseek(inputFile, resTableOffset, SEEK_SET);
 
 	inputTable = (Record*)malloc(resTableCount * sizeof(Record));
 
-	// Put offsets of all the records in a table 
+	// Put offsets of all the records in a table
 	for (i = 0; i < resTableCount; i++) {
 
 	if (!currentFileDescription->swapEndian) {
@@ -365,7 +365,7 @@
 	}
 
 		 printf("Record: %ul, offset: %ul, size: %ul\n", i, inputTable[i].offset, inputTable[i].size);
-	
+
 		if ((inputTable[i].offset > inputFileSize) ||
 		    (inputTable[i].offset + inputTable[i].size > inputFileSize)) {
 			error("The offset points outside the file");
@@ -374,13 +374,13 @@
 	}
 	outputTable = (Record*)malloc(resTableCount * sizeof(Record));
 
-	sprintf(outputFileNameWithExt, "%s.cmp", inputFileName);	
+	sprintf(outputFileNameWithExt, "%s.cmp", inputFileName);
 	outputFile = fopen(outputFileNameWithExt, "wb");
 
 	for (i = 0; i < resTableCount; i++) {
 		fseek(inputFile, inputTable[i].offset, SEEK_SET);
 		outputTable[i].offset = ftell(outputFile);
-		
+
 		outputTable[i].size = encodeEntry(inputFile, inputTable[i].size, outputFile);
 	}
 	fclose(inputFile);
@@ -391,13 +391,13 @@
 		writeUint32LE(outputFile, outputTable[i].size);
 	}
 	writeUint32LE(outputFile, resTableOffset);
-	writeUint32LE(outputFile, resTableCount);	// Should be the same number of entries 
+	writeUint32LE(outputFile, resTableCount);	// Should be the same number of entries
 
 	fclose(outputFile);
 
 	free(inputTable);
 	free(outputTable);
-	
+
 	// Cleanup
 	unlink(TEMP_RAW);
 	unlink(tempEncoded);
@@ -406,7 +406,7 @@
 }
 
 void showhelp(char *exename) {
-	printf("\nUsage: %s <params> [<file> | mac]\n", exename);
+	printf("\nUsage: %s [params] <file>\n", exename);
 
 	printf("\nParams:\n");
 
@@ -432,8 +432,12 @@
 	printf("--silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf("[params]     optional Arguments passed to the Encoder\n");
-	printf("             recommended is: --best -b 1152\n");
+ 	printf(" --fast       FLAC uses compresion level 0\n");
+ 	printf(" --best       FLAC uses compresion level 8\n");
+ 	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+ 	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+ 	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n--help     this help message\n");
 

Modified: tools/branches/gsoc2007-toolsgui/compress_scumm_sou.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_scumm_sou.c	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_scumm_sou.c	2007-07-04 23:03:34 UTC (rev 27908)
@@ -72,7 +72,7 @@
 	unlink(TEMP_DAT);
 	unlink(TEMP_RAW);
 	unlink(tempEncoded);
-	
+
 	exit(-1);
 }
 
@@ -130,7 +130,7 @@
 
 	/* Conver the VOC data */
 	extractAndEncodeVOC(TEMP_RAW, input, gCompMode);
-	
+
 	/* Append the converted data to the master output file */
 	sprintf(outname, tempEncoded);
 	f = fopen(outname, "rb");
@@ -171,8 +171,12 @@
 	printf(" --silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf(" [params]     optional arguments passed directly to the encoder\n");
-	printf("              recommended is: --best -b 1152\n");
+ 	printf(" --fast       FLAC uses compresion level 0\n");
+ 	printf(" --best       FLAC uses compresion level 8\n");
+ 	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+ 	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+ 	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n --help     this help message\n");
 
@@ -242,7 +246,7 @@
 		printf("Can't open file " TEMP_DAT " for write!\n");
 		exit(-1);
 	}
-	
+
 	/* Get the 'SOU ....' header */
 	fread(buf, 1, 8, input);
 	if (strncmp(buf, f_hdr, 8)) {

Modified: tools/branches/gsoc2007-toolsgui/compress_sword1.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_sword1.c	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_sword1.c	2007-07-04 23:03:34 UTC (rev 27908)
@@ -116,7 +116,7 @@
 	{ "2M26", false },
 	{ "3M7", false },
 	{ "3M8", false },
-	{ "3M9", true }, 
+	{ "3M9", true },
 	{ "3M10", false },
 	{ "2M13", false },
 	{ "3M12", false },
@@ -163,7 +163,7 @@
 	{ "4M31", false },
 	{ "4M32", false },
 	{ "5M1", false },
-	{ "5M2", true }, 
+	{ "5M2", true },
 	{ "5M3", false },
 	{ "5M4", false },
 	{ "5M5", false },
@@ -275,7 +275,7 @@
 	{ "11M4", false },
 	{ "11M7", false },
 	{ "11M8", false },
-	{ "11M9", true }, 
+	{ "11M9", true },
 	{ "12M1", false },
 	{ "11M2", false },
 	{ "SPM2", false },
@@ -308,7 +308,7 @@
 };
 
 void showhelp(char *exename) {
-	printf("\nUsage: %s <params>\n", exename);
+	printf("\nUsage: %s [params]\n", exename);
 
 	printf("\nParams:\n");
 	printf(" --mp3          encode to MP3 format (default)\n");
@@ -337,6 +337,14 @@
 	printf("                (default:%d)\n", oggqualDef);
 	printf(" --silent       the output of oggenc is hidden (default:disabled)\n");
 
+	printf("\nFlac mode params:\n");
+ 	printf(" --fast       FLAC uses compresion level 0\n");
+ 	printf(" --best       FLAC uses compresion level 8\n");
+ 	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+ 	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+ 	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
+
 	printf("\n --help         this help message\n");
 
 	printf("\nIf a parameter is not given the default value is used\n");
@@ -438,7 +446,7 @@
 	}
 	cl3Index = (uint32*)malloc(numSamples * 8);
 	memset(cl3Index, 0, numSamples * 8);
-	
+
 	sampleIndex = cowHeader + numRooms + 1;
 	/* This points to the sample index table. 8 bytes each (4 bytes size and then 4 bytes file index) */
 
@@ -446,7 +454,7 @@
 
 	for (cnt = 0; cnt < numSamples; cnt++) {
 		if (sampleIndex[cnt << 1] | sampleIndex[(cnt << 1) | 1]) {
-			printf("sample %5d: ", cnt);
+			printf("sample %5d: \n", cnt);
 			smpData = (uint8*)uncompressSpeech(clu, sampleIndex[cnt << 1] + headerSize, sampleIndex[(cnt << 1) | 1], &smpSize);
 			if ((!smpData) || (!smpSize))
 				error("unable to handle speech sample %d!\n", cnt);
@@ -475,7 +483,7 @@
 	int i;
 	char cluName[256], outName[256];
 
-	setRawAudioType(true, false, false, 16);
+	setRawAudioType(true, false, 16);
 	for (i = 1; i <= 2; i++) {
 		sprintf(cluName, "SPEECH/SPEECH%d.CLU", i);
 		clu = fopen(cluName, "rb");
@@ -670,7 +678,7 @@
 		compressSpeech(compMode);
 	if (compMusic)
 		compressMusic(compMode);
-	
+
 	return EXIT_SUCCESS;
 }
 

Modified: tools/branches/gsoc2007-toolsgui/compress_sword2.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_sword2.c	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_sword2.c	2007-07-04 23:03:34 UTC (rev 27908)
@@ -31,7 +31,7 @@
 
 void showhelp(char *exename)
 {
-	printf("\nUsage: %s <params> file.clu\n", exename);
+	printf("\nUsage: %s [params] <file>\n", exename);
 
 	printf("\nParams:\n");
 	printf(" --mp3        encode to MP3 format (default)\n");
@@ -56,8 +56,12 @@
 	printf(" --silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf(" [params]     optional arguments passed directly to the encoder\n");
-	printf("              recommended is: --best -b 1152\n");
+	printf(" --fast       FLAC uses compresion level 0\n");
+	printf(" --best       FLAC uses compresion level 8\n");
+	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n --help     this help message\n");
 
@@ -104,7 +108,7 @@
 	uint32 indexSize;
 	uint32 totalSize;
 	uint32 length;
-	
+
 	if (argc < 2)
 		showhelp(argv[0]);
 	i = 1;

Modified: tools/branches/gsoc2007-toolsgui/compress_touche.c
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_touche.c	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/compress_touche.c	2007-07-04 23:03:34 UTC (rev 27908)
@@ -158,9 +158,10 @@
 }
 
 static void showhelp(const char *exename) {
-	printf("\nUsage: %s <params> input_directory\n", exename);
+	printf("\nUsage: %s [params] <inputdir>\n", exename);
 
 	printf("\nParams:\n");
+
 	printf(" --mp3        encode to MP3 format (default)\n");
 	printf(" --vorbis     encode to Vorbis format\n");
 	printf(" --flac       encode to Flac format\n");
@@ -183,8 +184,12 @@
 	printf(" --silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf(" [params]     optional arguments passed directly to the encoder\n");
-	printf("              recommended is: --best -b 1152\n");
+	printf(" --fast       FLAC uses compresion level 0\n");
+	printf(" --best       FLAC uses compresion level 8\n");
+	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n --help     this help message\n");
 

Modified: tools/branches/gsoc2007-toolsgui/encode_dxa.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/encode_dxa.cpp	2007-07-04 23:00:38 UTC (rev 27907)
+++ tools/branches/gsoc2007-toolsgui/encode_dxa.cpp	2007-07-04 23:03:34 UTC (rev 27908)
@@ -699,7 +699,7 @@
 }
 
 void showhelp(char *exename) {
-	printf("\nUsage: %s <inputfile> \n", exename);
+	printf("\nUsage: %s <params> <file>\n", exename);
 
 	printf("\nParams:\n");
 	printf(" --mp3        encode to MP3 format (default)\n");
@@ -724,14 +724,17 @@
 	printf(" --silent     the output of oggenc is hidden (default:disabled)\n");
 
 	printf("\nFlac mode params:\n");
-	printf(" [params]     optional arguments passed directly to the encoder\n");
-	printf("              recommended is: --best -b 1152\n");
+	printf(" --fast       FLAC uses compresion level 0\n");
+	printf(" --best       FLAC uses compresion level 8\n");
+	printf(" -<value>     specifies the value (0 - 8) of compresion (8=best)(default:%d)\n", flacCompressDef);
+	printf(" -b <value>   specifies a blocksize of <value> samples (default:%d)\n", flacBlocksizeDef);
+	printf(" --verify     files are encoded and then decoded to check accuracy\n");
+	printf(" --silent     the output of FLAC is hidden (default:disabled)\n");
 
 	printf("\n --help     this help message\n");
 
 	printf("\n\nIf a parameter is not given the default value is used\n");
 	printf("If using VBR mode for MP3 -b and -B must be multiples of 8; the maximum is 160!\n");
-	printf("Use the `mac' option instead of a filename if converting simon2mac sounds\n");
 	exit(2);
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list