aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorMax Horn2007-02-25 00:03:47 +0000
committerMax Horn2007-02-25 00:03:47 +0000
commit21b095ce208e1816845b1c1503c0164c68caba02 (patch)
treefc3e527a19b88b004c96363f33f7291aac7bc943 /engines/sword1
parent7f09562d081bbdfe1962e8a5811cdfdc9f2952ff (diff)
downloadscummvm-rg350-21b095ce208e1816845b1c1503c0164c68caba02.tar.gz
scummvm-rg350-21b095ce208e1816845b1c1503c0164c68caba02.tar.bz2
scummvm-rg350-21b095ce208e1816845b1c1503c0164c68caba02.zip
Switch to the new makeVorbisStream variant (and get rid of a File::decRef call)
svn-id: r25840
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/animation.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp
index afe9a13bd1..3cc756545a 100644
--- a/engines/sword1/animation.cpp
+++ b/engines/sword1/animation.cpp
@@ -165,7 +165,8 @@ bool MoviePlayer::load(uint32 id) {
for (uint32 segCnt = 0; segCnt < numSegs; segCnt++) {
oggSource->seek( header[SwordEngine::_systemVars.language * 2 + 0 + segCnt * 14]);
uint32 segSize = header[SwordEngine::_systemVars.language * 2 + 1 + segCnt * 14];
- Audio::AudioStream *apStream = Audio::makeVorbisStream(oggSource, segSize);
+ Common::MemoryReadStream *stream = oggSource->readStream(segSize);
+ Audio::AudioStream *apStream = Audio::makeVorbisStream(streamm true);
if (!apStream)
error("Can't create Vorbis Stream from file %s", sndName);
sStream->appendStream(apStream);
@@ -174,7 +175,7 @@ bool MoviePlayer::load(uint32 id) {
_bgSoundStream = sStream;
} else
warning("Sound file \"%s\" not found", sndName);
- oggSource->decRef();
+ delete oggSource;
#endif
initOverlays(id);
}