[Scummvm-cvs-logs] SF.net SVN: scummvm:[46861] scummvm/trunk/sound

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 1 23:55:38 CET 2010


Revision: 46861
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46861&view=rev
Author:   lordhoto
Date:     2010-01-01 22:55:38 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
Properly reset _numPlayedLoops in setNumLoops in all AudioStream implementations implementing setNumLoops.

Modified Paths:
--------------
    scummvm/trunk/sound/audiostream.cpp
    scummvm/trunk/sound/flac.cpp
    scummvm/trunk/sound/mp3.cpp
    scummvm/trunk/sound/vorbis.cpp

Modified: scummvm/trunk/sound/audiostream.cpp
===================================================================
--- scummvm/trunk/sound/audiostream.cpp	2010-01-01 22:33:45 UTC (rev 46860)
+++ scummvm/trunk/sound/audiostream.cpp	2010-01-01 22:55:38 UTC (rev 46861)
@@ -224,7 +224,10 @@
 	static const int32 BUFFER_SIZE = 16384;
 #endif
 
-	void setNumLoops(uint numLoops = 1) { _numLoops = numLoops; }
+	void setNumLoops(uint numLoops) {
+		_numLoops = numLoops;
+		_numPlayedLoops = 0;
+	}
 	uint getNumPlayedLoops() { return _numPlayedLoops; }
 
 protected:

Modified: scummvm/trunk/sound/flac.cpp
===================================================================
--- scummvm/trunk/sound/flac.cpp	2010-01-01 22:33:45 UTC (rev 46860)
+++ scummvm/trunk/sound/flac.cpp	2010-01-01 22:55:38 UTC (rev 46861)
@@ -151,7 +151,10 @@
 
 	bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC ; }
 
-	void setNumLoops(uint numLoops = 1) { _numLoops = numLoops; }
+	void setNumLoops(uint numLoops = 1) {
+		_numLoops = numLoops;
+		_numPlayedLoops = 0;
+	}
 	uint getNumPlayedLoops() { return _numPlayedLoops; }
 
 protected:

Modified: scummvm/trunk/sound/mp3.cpp
===================================================================
--- scummvm/trunk/sound/mp3.cpp	2010-01-01 22:33:45 UTC (rev 46860)
+++ scummvm/trunk/sound/mp3.cpp	2010-01-01 22:55:38 UTC (rev 46861)
@@ -98,7 +98,10 @@
 		return _totalPlayTime * _numLoops;
 	}
 
-	void setNumLoops(uint numLoops = 1) { _numLoops = numLoops; }
+	void setNumLoops(uint numLoops) {
+		_numLoops = numLoops;
+		_numPlayedLoops = 0;
+	}
 	uint getNumPlayedLoops() { return _numPlayedLoops; }
 
 protected:

Modified: scummvm/trunk/sound/vorbis.cpp
===================================================================
--- scummvm/trunk/sound/vorbis.cpp	2010-01-01 22:33:45 UTC (rev 46860)
+++ scummvm/trunk/sound/vorbis.cpp	2010-01-01 22:55:38 UTC (rev 46861)
@@ -121,7 +121,10 @@
 	bool isStereo() const		{ return _isStereo; }
 	int getRate() const			{ return _rate; }
 
-	void setNumLoops(uint numLoops = 1) { _numLoops = numLoops; }
+	void setNumLoops(uint numLoops) {
+		_numLoops = numLoops;
+		_numPlayedLoops = 0;
+	}
 	uint getNumPlayedLoops() { return _numPlayedLoops; }
 
 	int32 getTotalPlayTime() const {


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