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

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sun Dec 2 11:58:45 CET 2007


Revision: 29696
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29696&view=rev
Author:   Kirben
Date:     2007-12-02 02:58:45 -0800 (Sun, 02 Dec 2007)

Log Message:
-----------
Fix compile.

Modified Paths:
--------------
    tools/branches/gsoc2007-toolsgui/compress_saga.cpp

Modified: tools/branches/gsoc2007-toolsgui/compress_saga.cpp
===================================================================
--- tools/branches/gsoc2007-toolsgui/compress_saga.cpp	2007-12-02 10:16:19 UTC (rev 29695)
+++ tools/branches/gsoc2007-toolsgui/compress_saga.cpp	2007-12-02 10:58:45 UTC (rev 29696)
@@ -29,6 +29,7 @@
 #include "utils/file.h"
 #include "utils/voc.h"
 #include "utils/wave.h"
+#include "utils/adpcm.h"
 
 #define FILE_MD5_BYTES 5000
 #define RSC_TABLEINFO_SIZE 8
@@ -76,7 +77,7 @@
 	{"voices.rsc",					false,		"c46e4392fcd2e89bc91e5567db33b62d", kSoundVOC,		-1,			false},	// Disk
 	{"voices.rsc",					false,		"0c9113e630f97ef0996b8c3114badb08", kSoundVOC,		-1,			false},	// German disk
 	{"voices.rsc",					false,		"c58e67c506af4ffa03fd0aac2079deb0", kSoundVOC,		-1,			false},	// Early DOS demo
-	{"voicesd.rsc",				false,		"e139d86bab2ee8ba3157337f894a92d4", kSoundVOX,		22050,		false},	// New PC demos and all Mac demos
+	{"voicesd.rsc",					false,		"e139d86bab2ee8ba3157337f894a92d4", kSoundVOX,		22050,		false},	// New PC demos and all Mac demos
 	// Unsupported (8 bit unsigned sound) - used in the early ITE Win32 demo
 	//{"voicesd.rsc",				false,		"0759eaf5b64ae19fd429920a70151ad3", kSoundPCM,		22050,			false},	// Old Win32 demo
 	{"ite voices.bin",				true,		"dba92ae7d57e942250fe135609708369", kSoundMacPCM,	22050,		false}	// MacBinary
@@ -264,7 +265,8 @@
 }
 
 uint32 encodeEntry(FILE* inputFile, uint32 inputSize, FILE* outputFile) {
-	uint8 *inputData;
+	uint8 *inputData = 0;
+	byte *buffer = 0;
 	Common::File inputFileStream(inputFile);
 	int rate, size;
 	byte flags;
@@ -331,11 +333,11 @@
 		writeBufferToFile((uint8 *)buffer, sampleSize, TEMP_RAW);
 		free(buffer);
 
-		setRawAudioType( !currentFileDescription->swapEndian, sampleStereo, false, sampleBits);
+		setRawAudioType( !currentFileDescription->swapEndian, sampleStereo, sampleBits);
 		encodeAudio(TEMP_RAW, true, sampleRate, tempEncoded, gCompMode);
 		return copyFile(tempEncoded, outputFile) + HEADER_SIZE;
 	}
-  if (currentFileDescription->resourceType == kSoundMacPCM) {
+	if (currentFileDescription->resourceType == kSoundMacPCM) {
 		error("MacBinary files are not supported yet");
 		// TODO
 		// Note: MacBinary files are unsigned. With the pending changes to setRawAudioType, there will need


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