[Scummvm-cvs-logs] SF.net SVN: scummvm:[40957] scummvm/trunk/sound
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu May 28 12:29:25 CEST 2009
Revision: 40957
http://scummvm.svn.sourceforge.net/scummvm/?rev=40957&view=rev
Author: fingolfin
Date: 2009-05-28 10:29:25 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Added Audio::Timestamp::addMsecs method
Modified Paths:
--------------
scummvm/trunk/sound/timestamp.cpp
scummvm/trunk/sound/timestamp.h
Modified: scummvm/trunk/sound/timestamp.cpp
===================================================================
--- scummvm/trunk/sound/timestamp.cpp 2009-05-28 10:29:11 UTC (rev 40956)
+++ scummvm/trunk/sound/timestamp.cpp 2009-05-28 10:29:25 UTC (rev 40957)
@@ -53,6 +53,12 @@
return timestamp;
}
+Timestamp Timestamp::addMsecs(int ms) const {
+ Timestamp timestamp(*this);
+ timestamp._msecs += ms;
+ return timestamp;
+}
+
int Timestamp::frameDiff(const Timestamp &b) const {
assert(_frameRate == b._frameRate);
Modified: scummvm/trunk/sound/timestamp.h
===================================================================
--- scummvm/trunk/sound/timestamp.h 2009-05-28 10:29:11 UTC (rev 40956)
+++ scummvm/trunk/sound/timestamp.h 2009-05-28 10:29:25 UTC (rev 40957)
@@ -56,6 +56,9 @@
/** Adds a number of frames to a timestamp. */
Timestamp addFrames(int frames) const;
+ /** Adds a number of milliseconds to a timestamp. */
+ Timestamp addMsecs(int ms) const;
+
/** Computes the difference (# of frames) between this timestamp and b. */
int frameDiff(const Timestamp &b) 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