aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/voyeur/animation.cpp5
-rw-r--r--engines/voyeur/animation.h2
-rw-r--r--engines/voyeur/voyeur.cpp3
3 files changed, 6 insertions, 4 deletions
diff --git a/engines/voyeur/animation.cpp b/engines/voyeur/animation.cpp
index 57a64945db..5318da26e9 100644
--- a/engines/voyeur/animation.cpp
+++ b/engines/voyeur/animation.cpp
@@ -220,8 +220,9 @@ bool RL2Decoder::RL2FileHeader::isValid() const {
return _signature == MKTAG('R','L','V','2') || _signature != MKTAG('R','L','V','3');
}
-double RL2Decoder::RL2FileHeader::getFrameRate() const {
- return (_soundRate > 0) ? _rate / _defSoundSize : 11025 / 1103;
+Common::Rational RL2Decoder::RL2FileHeader::getFrameRate() const {
+ return (_soundRate > 0) ? Common::Rational(_rate, _defSoundSize) :
+ Common::Rational(11025, 1103);
}
/*------------------------------------------------------------------------*/
diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
index 30d60827a2..8ebebaaada 100644
--- a/engines/voyeur/animation.h
+++ b/engines/voyeur/animation.h
@@ -69,7 +69,7 @@ private:
~RL2FileHeader();
void load(Common::SeekableReadStream *stream);
bool isValid() const;
- double getFrameRate() const;
+ Common::Rational getFrameRate() const;
};
class SoundFrame {
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 177ee552f0..37dd527b39 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -565,8 +565,9 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
RL2Decoder decoder;
decoder.loadVideo(videoId);
+ decoder.seek(Audio::Timestamp(_voy._vocSecondsOffset * 1000,
+ decoder.getHeader().getFrameRate().toInt()));
decoder.start();
- decoder.seek(Audio::Timestamp(_voy._vocSecondsOffset * 1000, decoder.getHeader().getFrameRate()));
int endFrame = decoder.getCurFrame() + totalFrames;
_eventsManager.getMouseInfo();