From 7143eaed892e6008a7eb09f058f54d794764f199 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Tue, 22 Jan 2013 15:10:01 +0100 Subject: WINTERMUTE: Properly create WAV-substreams, (fix bug #3592165) --- engines/wintermute/base/sound/base_sound_buffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/wintermute/base') 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); -- cgit v1.2.3