From f2dda51943c0a34315babb8241c1f12fe3f5d658 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 26 May 2010 12:15:14 +0000 Subject: Have makeADPCMStream use the entire stream if the size is 0 (as it says in the doxygen comment). svn-id: r49236 --- sound/decoders/adpcm.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound/decoders') diff --git a/sound/decoders/adpcm.cpp b/sound/decoders/adpcm.cpp index 7a85bc24d5..c8a907d13e 100644 --- a/sound/decoders/adpcm.cpp +++ b/sound/decoders/adpcm.cpp @@ -724,6 +724,10 @@ int16 Ima_ADPCMStream::decodeIMA(byte code, int channel) { } 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); -- cgit v1.2.3