aboutsummaryrefslogtreecommitdiff
path: root/sound/audiostream.cpp
diff options
context:
space:
mode:
authorMax Horn2010-01-07 15:12:20 +0000
committerMax Horn2010-01-07 15:12:20 +0000
commit32ec5746bebcfbaecece143f2ee75644a1000d17 (patch)
treecbd9512ceaebfc0b6c2ff959d66e12dfcc566315 /sound/audiostream.cpp
parent423094cd5f624feb259a0c6cbfefd269553ef44d (diff)
downloadscummvm-rg350-32ec5746bebcfbaecece143f2ee75644a1000d17.tar.gz
scummvm-rg350-32ec5746bebcfbaecece143f2ee75644a1000d17.tar.bz2
scummvm-rg350-32ec5746bebcfbaecece143f2ee75644a1000d17.zip
Add Timestamp::totalNumberOfFrames() method, clarify some comments
svn-id: r47120
Diffstat (limited to 'sound/audiostream.cpp')
-rw-r--r--sound/audiostream.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index 79e8308115..6a3b1d792d 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -183,8 +183,7 @@ inline int32 calculatePlayTime(int rate, int samples) {
}
uint32 calculateSampleOffset(const Timestamp &where, int rate) {
- const Timestamp whereRate = where.convertToFramerate(rate);
- return whereRate.secs() * rate + whereRate.numberOfFrames();
+ return where.convertToFramerate(rate).totalNumberOfFrames();
}
/**