[Scummvm-cvs-logs] SF.net SVN: scummvm:[47112] scummvm/trunk/sound/audiocd.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Jan 7 15:22:58 CET 2010


Revision: 47112
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47112&view=rev
Author:   lordhoto
Date:     2010-01-07 14:22:57 +0000 (Thu, 07 Jan 2010)

Log Message:
-----------
Cleanup.

Modified Paths:
--------------
    scummvm/trunk/sound/audiocd.cpp

Modified: scummvm/trunk/sound/audiocd.cpp
===================================================================
--- scummvm/trunk/sound/audiocd.cpp	2010-01-07 14:22:24 UTC (rev 47111)
+++ scummvm/trunk/sound/audiocd.cpp	2010-01-07 14:22:57 UTC (rev 47112)
@@ -69,21 +69,16 @@
 		_mixer->stopHandle(_handle);
 
 		if (stream != 0) {
-			if (startFrame != 0 || duration != 0) {
-				stream = new SubSeekableAudioStream(stream, Timestamp(0, startFrame, 75), Timestamp(0, startFrame + duration, 75));
-				assert(stream);
-			}
+			Timestamp start = Timestamp(0, startFrame, 75);
+			Timestamp end = duration ? Timestamp(0, startFrame + duration, 75) : stream->getLength();
 
 			/*
 			FIXME: Seems numLoops == 0 and numLoops == 1 both indicate a single repetition,
 			while all other positive numbers indicate precisely the number of desired
 			repetitions. Finally, -1 means infinitely many
 			*/
-			AudioStream *output = new LoopingAudioStream(stream, (numLoops < 1) ? numLoops + 1 : numLoops);
-			assert(output);
-
 			_emulating = true;
-			_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, output);
+			_mixer->playInputStreamLooping(Audio::Mixer::kMusicSoundType, &_handle, stream, (numLoops < 1) ? numLoops + 1 : numLoops, start, end);
 		} else {
 			_emulating = false;
 			if (!only_emulate)


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