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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Wed May 26 14:15:14 CEST 2010


Revision: 49236
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49236&view=rev
Author:   mthreepwood
Date:     2010-05-26 12:15:14 +0000 (Wed, 26 May 2010)

Log Message:
-----------
Have makeADPCMStream use the entire stream if the size is 0 (as it says in the doxygen comment).

Modified Paths:
--------------
    scummvm/trunk/sound/decoders/adpcm.cpp

Modified: scummvm/trunk/sound/decoders/adpcm.cpp
===================================================================
--- scummvm/trunk/sound/decoders/adpcm.cpp	2010-05-26 11:56:58 UTC (rev 49235)
+++ scummvm/trunk/sound/decoders/adpcm.cpp	2010-05-26 12:15:14 UTC (rev 49236)
@@ -724,6 +724,10 @@
 }
 
 RewindableAudioStream *makeADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, typesADPCM type, int rate, int channels, uint32 blockAlign) {
+	// If size is 0, report the entire size of the stream
+	if (!size)
+		size = stream->size();
+
 	switch (type) {
 	case kADPCMOki:
 		return new Oki_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign);


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