diff options
author | Max Horn | 2010-03-12 22:34:54 +0000 |
---|---|---|
committer | Max Horn | 2010-03-12 22:34:54 +0000 |
commit | 79662919c6358954a020b7d4ed52b6ecf93327f1 (patch) | |
tree | 50d163b6f4095a9e7205a68aa27813bc527a937d /sound/decoders | |
parent | bee3321ec44cbadf669987d81477b9a4313e1981 (diff) | |
download | scummvm-rg350-79662919c6358954a020b7d4ed52b6ecf93327f1.tar.gz scummvm-rg350-79662919c6358954a020b7d4ed52b6ecf93327f1.tar.bz2 scummvm-rg350-79662919c6358954a020b7d4ed52b6ecf93327f1.zip |
Fix bug #2969282: DW2: Weird "PC SPEAKER-like" sound distortion.
svn-id: r48246
Diffstat (limited to 'sound/decoders')
-rw-r--r-- | sound/decoders/adpcm.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/decoders/adpcm.cpp b/sound/decoders/adpcm.cpp index 3ee92265a0..7a85bc24d5 100644 --- a/sound/decoders/adpcm.cpp +++ b/sound/decoders/adpcm.cpp @@ -405,6 +405,7 @@ public: : ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) { if (blockAlign == 0) error("MS_ADPCMStream(): blockAlign isn't specified for MS ADPCM"); + memset(&_status, 0, sizeof(_status)); } virtual int readBuffer(int16 *buffer, const int numSamples); @@ -505,6 +506,7 @@ public: if (channels != 1) error("Tinsel_ADPCMStream(): Tinsel ADPCM only supports mono"); + memset(&_status, 0, sizeof(_status)); } }; @@ -595,11 +597,15 @@ protected: void reset() { ADPCMStream::reset(); _chunkPos = 0; + _chunkData = 0; } public: Tinsel6_ADPCMStream(Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign) - : Tinsel_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) {} + : Tinsel_ADPCMStream(stream, disposeAfterUse, size, rate, channels, blockAlign) { + _chunkPos = 0; + _chunkData = 0; + } virtual int readBuffer(int16 *buffer, const int numSamples); }; |