diff options
| author | Johannes Schickel | 2010-02-03 15:45:54 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2010-02-03 15:45:54 +0000 | 
| commit | 6312b690de2cdda07b158fcffab35c02afaae92b (patch) | |
| tree | b2fd34c2317ec51ed430c65096d7caa9e0a5855b | |
| parent | 2cb82808ebb8b7b0c938cc20d5b9446182177459 (diff) | |
| download | scummvm-rg350-6312b690de2cdda07b158fcffab35c02afaae92b.tar.gz scummvm-rg350-6312b690de2cdda07b158fcffab35c02afaae92b.tar.bz2 scummvm-rg350-6312b690de2cdda07b158fcffab35c02afaae92b.zip | |
Fix bug in RawStream::getLength for 16bit streams. (Uncovered by our new unit tests yay!)
svn-id: r47859
| -rw-r--r-- | sound/decoders/raw.cpp | 2 | ||||
| -rw-r--r-- | sound/decoders/raw.h | 2 | 
2 files changed, 2 insertions, 2 deletions
| diff --git a/sound/decoders/raw.cpp b/sound/decoders/raw.cpp index addad0a253..2d4da5c63d 100644 --- a/sound/decoders/raw.cpp +++ b/sound/decoders/raw.cpp @@ -99,7 +99,7 @@ public:  			len += i->len;  		} -		_playtime = Timestamp(0, len / (is16Bit ? 2 : 1) / (stereo ? 2 : 1), rate); +		_playtime = Timestamp(0, len / (stereo ? 2 : 1), rate);  	} diff --git a/sound/decoders/raw.h b/sound/decoders/raw.h index edbb108de7..e04f1b5621 100644 --- a/sound/decoders/raw.h +++ b/sound/decoders/raw.h @@ -69,7 +69,7 @@ enum RawFlags {   */  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!)  };  /** | 
