aboutsummaryrefslogtreecommitdiff
path: root/audio/timestamp.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-10-12 15:18:03 -0400
committerPaul Gilbert2015-10-12 15:18:03 -0400
commitb0016071ecf3f5ffbc6f1619af610ab648bbba3a (patch)
treef00f6b17bfd3475200e454cdfc09eba94d764f01 /audio/timestamp.cpp
parent652a6623156b6c6bba8ca49e038945fd0c2b7780 (diff)
parentfbcf667b6a57593a2b85622ad1e1380c8aef7210 (diff)
downloadscummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.gz
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.tar.bz2
scummvm-rg350-b0016071ecf3f5ffbc6f1619af610ab648bbba3a.zip
Merge branch 'msvc_2015' into xeen
Diffstat (limited to 'audio/timestamp.cpp')
-rw-r--r--audio/timestamp.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/audio/timestamp.cpp b/audio/timestamp.cpp
index 1ce971631c..63752812e1 100644
--- a/audio/timestamp.cpp
+++ b/audio/timestamp.cpp
@@ -39,12 +39,10 @@ Timestamp::Timestamp(uint ms, uint fr) {
Timestamp::Timestamp(uint s, uint frames, uint fr) {
assert(fr > 0);
- _secs = s;
+ _secs = s + (frames / fr);
_framerateFactor = 1000 / Common::gcd<uint>(1000, fr);
_framerate = fr * _framerateFactor;
- _numFrames = frames * _framerateFactor;
-
- normalize();
+ _numFrames = (frames % fr) * _framerateFactor;
}
Timestamp Timestamp::convertToFramerate(uint newFramerate) const {