From 7cd40da1be0278b31bc012005544b41aab6cf231 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 9 Mar 2009 03:45:40 +0000 Subject: Added some comments to Audio::Timestamp svn-id: r39257 --- sound/timestamp.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sound') 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. */ -- cgit v1.2.3