[Scummvm-cvs-logs] SF.net SVN: scummvm:[47859] scummvm/trunk/sound/decoders

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed Feb 3 16:45:54 CET 2010


Revision: 47859
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47859&view=rev
Author:   lordhoto
Date:     2010-02-03 15:45:54 +0000 (Wed, 03 Feb 2010)

Log Message:
-----------
Fix bug in RawStream::getLength for 16bit streams. (Uncovered by our new unit tests yay!)

Modified Paths:
--------------
    scummvm/trunk/sound/decoders/raw.cpp
    scummvm/trunk/sound/decoders/raw.h

Modified: scummvm/trunk/sound/decoders/raw.cpp
===================================================================
--- scummvm/trunk/sound/decoders/raw.cpp	2010-02-03 15:45:29 UTC (rev 47858)
+++ scummvm/trunk/sound/decoders/raw.cpp	2010-02-03 15:45:54 UTC (rev 47859)
@@ -99,7 +99,7 @@
 			len += i->len;
 		}
 
-		_playtime = Timestamp(0, len / (is16Bit ? 2 : 1) / (stereo ? 2 : 1), rate);
+		_playtime = Timestamp(0, len / (stereo ? 2 : 1), rate);
 	}
 
 

Modified: scummvm/trunk/sound/decoders/raw.h
===================================================================
--- scummvm/trunk/sound/decoders/raw.h	2010-02-03 15:45:29 UTC (rev 47858)
+++ scummvm/trunk/sound/decoders/raw.h	2010-02-03 15:45:54 UTC (rev 47859)
@@ -69,7 +69,7 @@
  */
 struct RawStreamBlock {
 	int32 pos;   ///< Position in stream of the block (in bytes of course!)
-	int32 len;   ///< Length of the block (in sample (pairs))
+	int32 len;   ///< Length of the block (in raw samples, not sample pairs!)
 };
 
 /**


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