[Scummvm-cvs-logs] SF.net SVN: scummvm: [25840] scummvm/trunk/engines/sword1/animation.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Feb 25 01:03:48 CET 2007


Revision: 25840
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25840&view=rev
Author:   fingolfin
Date:     2007-02-24 16:03:47 -0800 (Sat, 24 Feb 2007)

Log Message:
-----------
Switch to the new makeVorbisStream variant (and get rid of a File::decRef call)

Modified Paths:
--------------
    scummvm/trunk/engines/sword1/animation.cpp

Modified: scummvm/trunk/engines/sword1/animation.cpp
===================================================================
--- scummvm/trunk/engines/sword1/animation.cpp	2007-02-24 23:53:35 UTC (rev 25839)
+++ scummvm/trunk/engines/sword1/animation.cpp	2007-02-25 00:03:47 UTC (rev 25840)
@@ -165,7 +165,8 @@
 				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 @@
 				_bgSoundStream = sStream;
 			} else
 				warning("Sound file \"%s\" not found", sndName);
-			oggSource->decRef();
+			delete oggSource;
 #endif
 			initOverlays(id);
 		}


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list