mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
VOYEUR: Converted RL2 header getFrameRate to use Common::Rational
This commit is contained in:
parent
d5231aa862
commit
77d8810b19
@ -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);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
@ -69,7 +69,7 @@ private:
|
||||
~RL2FileHeader();
|
||||
void load(Common::SeekableReadStream *stream);
|
||||
bool isValid() const;
|
||||
double getFrameRate() const;
|
||||
Common::Rational getFrameRate() const;
|
||||
};
|
||||
|
||||
class SoundFrame {
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user