diff options
author | Einar Johan Trøan Sømåen | 2013-01-22 15:10:01 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-01-22 15:10:01 +0100 |
commit | 7143eaed892e6008a7eb09f058f54d794764f199 (patch) | |
tree | cddbfce26ed20f56061a38c7bf12dd9dae777e66 /engines/wintermute/base | |
parent | 93763acd328df7a25a77136769086329761c8023 (diff) | |
download | scummvm-rg350-7143eaed892e6008a7eb09f058f54d794764f199.tar.gz scummvm-rg350-7143eaed892e6008a7eb09f058f54d794764f199.tar.bz2 scummvm-rg350-7143eaed892e6008a7eb09f058f54d794764f199.zip |
WINTERMUTE: Properly create WAV-substreams, (fix bug #3592165)
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r-- | engines/wintermute/base/sound/base_sound_buffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/wintermute/base/sound/base_sound_buffer.cpp b/engines/wintermute/base/sound/base_sound_buffer.cpp index 250570f2b8..e8f4fcec53 100644 --- a/engines/wintermute/base/sound/base_sound_buffer.cpp +++ b/engines/wintermute/base/sound/base_sound_buffer.cpp @@ -111,7 +111,7 @@ bool BaseSoundBuffer::loadFromFile(const Common::String &filename, bool forceRel if (Audio::loadWAVFromStream(*_file, waveSize, waveRate, waveFlags, &waveType)) { if (waveType == 1) { // We need to wrap the file in a substream to make sure the size is right. - _file = new Common::SeekableSubReadStream(_file, 0, waveSize); + _file = new Common::SeekableSubReadStream(_file, _file->pos(), waveSize + _file->pos()); _stream = Audio::makeRawStream(_file, waveRate, waveFlags, DisposeAfterUse::YES); } else { error("BSoundBuffer::LoadFromFile - WAVE not supported yet for %s with type %d", filename.c_str(), waveType); |