aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-06 15:33:54 +0000
committerJohannes Schickel2010-01-06 15:33:54 +0000
commite72707b04e2080c6f780fed54df3a57ce3c6d460 (patch)
tree0f100d439283fb5eb3f622f6e5548b11f2e6fc4d /sound
parent84f30344060ef382efa7d86fa8f7e55859e82421 (diff)
downloadscummvm-rg350-e72707b04e2080c6f780fed54df3a57ce3c6d460.tar.gz
scummvm-rg350-e72707b04e2080c6f780fed54df3a57ce3c6d460.tar.bz2
scummvm-rg350-e72707b04e2080c6f780fed54df3a57ce3c6d460.zip
- Add some functionallity to query the seconds and number of frames stored in a Timestamp.
- Add tests for these svn-id: r47081
Diffstat (limited to 'sound')
-rw-r--r--sound/timestamp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/timestamp.h b/sound/timestamp.h
index 2d4f3db693..a027570469 100644
--- a/sound/timestamp.h
+++ b/sound/timestamp.h
@@ -129,6 +129,17 @@ public:
/** Return the framerate used by this timestamp. */
int getFramerate() const { return _framerate / _framerateFactor; }
+ /**
+ * Determines the time in seconds described by this timestamp,
+ * rounded down.
+ */
+ uint32 secs() const { return _secs; }
+
+ /**
+ * Determines the frames described by this timestamp.
+ */
+ int getNumberOfFrames() const { return _numberOfFrames / _framerateFactor; }
+
protected:
int cmp(const Timestamp &ts) const;