aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-03-09 03:45:40 +0000
committerMax Horn2009-03-09 03:45:40 +0000
commit7cd40da1be0278b31bc012005544b41aab6cf231 (patch)
treed5b541a390541c4036e5812f2871441797b55df2
parent563d76d34292bf8e83bbb6fb254799af2ebe9fb8 (diff)
downloadscummvm-rg350-7cd40da1be0278b31bc012005544b41aab6cf231.tar.gz
scummvm-rg350-7cd40da1be0278b31bc012005544b41aab6cf231.tar.bz2
scummvm-rg350-7cd40da1be0278b31bc012005544b41aab6cf231.zip
Added some comments to Audio::Timestamp
svn-id: r39257
-rw-r--r--sound/timestamp.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/timestamp.h b/sound/timestamp.h
index c68c4b7357..8d5eed46fc 100644
--- a/sound/timestamp.h
+++ b/sound/timestamp.h
@@ -28,9 +28,14 @@
#include "common/scummsys.h"
-
namespace Audio {
+/**
+ * Timestamps allow measuring times with a sub-millisecond granularity,
+ * and without rounding losses. This is achieved by measuring frames
+ * instead of milliseconds: Specify an initial time in milliseconds
+ * plus framerate (in Hertz, so frames per second).
+ */
class Timestamp {
protected:
uint32 _msecs;
@@ -40,6 +45,12 @@ protected:
public:
Timestamp();
+
+ /**
+ * Set up a timestamp with a given time and framerate.
+ * @param msecs staring time in milliseconds
+ * @param frameRate number of frames per second
+ */
Timestamp(uint32 msecs, int frameRate);
/** Adds a number of frames to a timestamp. */