[Scummvm-cvs-logs] SF.net SVN: scummvm:[52128] tools/branches/gsoc2010-decompiler

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Mon Aug 16 20:55:58 CEST 2010


Revision: 52128
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52128&view=rev
Author:   pidgeot
Date:     2010-08-16 18:55:58 +0000 (Mon, 16 Aug 2010)

Log Message:
-----------
DECOMPILER: Merge trunk changes into branch

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/compress.cpp
    tools/branches/gsoc2010-decompiler/engines/sci/compress_sci.cpp

Property Changed:
----------------
    tools/branches/gsoc2010-decompiler/


Property changes on: tools/branches/gsoc2010-decompiler
___________________________________________________________________
Modified: svn:mergeinfo
   - /tools/trunk:41370-43135,48931-51928
   + /tools/trunk:41370-43135,48931-51928,52059-52127

Modified: tools/branches/gsoc2010-decompiler/compress.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/compress.cpp	2010-08-16 18:07:21 UTC (rev 52127)
+++ tools/branches/gsoc2010-decompiler/compress.cpp	2010-08-16 18:55:58 UTC (rev 52128)
@@ -372,7 +372,7 @@
 		} else {
 			int result = 0;
 
-			/* Quality input is 1 - 10, function takes -0.1 through 1.0 */
+			/* Quality input is -1 - 10, function takes -0.1 through 1.0 */
 			result = vorbis_encode_setup_vbr(&vi, numChannels, samplerate, oggparms.quality * 0.1f);
 
 			if (result == OV_EFAULT) {
@@ -885,13 +885,13 @@
 
 // vorbis
 void CompressionTool::setOggQuality(const std::string& arg) {
-	oggparms.quality = (float)atoi(arg.c_str());
+	oggparms.quality = (float)atof(arg.c_str());
 
 	if (oggparms.quality == 0. && arg != "0")
 		throw ToolException("Quality (-q) must be a number.");
 
-	if (oggparms.quality < 0. || oggparms.quality > 10.)
-		throw ToolException("Quality out of bounds (-q), must be between 0 and 10.");
+	if (oggparms.quality < -1.f || oggparms.quality > 10.f)
+		throw ToolException("Quality out of bounds (-q), must be between -1 and 10.");
 }
 
 void CompressionTool::setOggMinBitrate(const std::string& arg) {
@@ -1169,7 +1169,7 @@
 		os << " -b <rate>    <rate> is the nominal bitrate (default:unset)\n";
 		os << " -m <rate>    <rate> is the minimum bitrate (default:unset)\n";
 		os << " -M <rate>    <rate> is the maximum bitrate (default:unset)\n";
-		os << " -q <value>   specifies the value (0 - 10) of VBR quality (10=best) (default:" << oggqualDef << ")\n";
+		os << " -q <value>   specifies the value (-1 - 10) of VBR quality (10=best) (default:" << oggqualDef << ")\n";
 		os << " --silent     the output of oggenc is hidden (default:disabled)\n";
 	}
 

Modified: tools/branches/gsoc2010-decompiler/engines/sci/compress_sci.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/engines/sci/compress_sci.cpp	2010-08-16 18:07:21 UTC (rev 52127)
+++ tools/branches/gsoc2010-decompiler/engines/sci/compress_sci.cpp	2010-08-16 18:55:58 UTC (rev 52128)
@@ -363,6 +363,9 @@
 
 	print("Valid sci audio resource file. Found %d resources", resourceCount);
 
+	if (outfile.empty())
+		error("please specify an output file");
+
 	// Now write basic output file header
 	_output.open(outfile, "wb");
 	// Compression ID


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