From 21b095ce208e1816845b1c1503c0164c68caba02 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 25 Feb 2007 00:03:47 +0000 Subject: Switch to the new makeVorbisStream variant (and get rid of a File::decRef call) svn-id: r25840 --- engines/sword1/animation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/sword1/animation.cpp') 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); } -- cgit v1.2.3