diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp index 3c968bb44a9..158ba18f7a2 100644 --- a/engines/director/castmember.cpp +++ b/engines/director/castmember.cpp @@ -343,7 +343,7 @@ Graphics::MacWidget *DigitalVideoCastMember::createWidget(Common::Rect &bbox, Ch _channel = channel; // Do not render stopped videos - if (_channel->_movieRate == 0.0) + if (_channel->_movieRate == 0.0 && !_pausedAtStart) return nullptr; if (!_video || !_video->isVideoLoaded()) { @@ -421,11 +421,14 @@ void DigitalVideoCastMember::setStopTime(int stamp) { _video->setEndTime(Audio::Timestamp(_channel->_stopTime * 1000 / 60, dur.framerate())); } -void DigitalVideoCastMember::setMovieRate(int rate) { +void DigitalVideoCastMember::setMovieRate(double rate) { if (!_video) return; - warning("STUB: DigitalVideoCastMember::setMovieRate(%d)", rate); + if (rate < 0.0) + warning("STUB: DigitalVideoCastMember::setMovieRate(%g)", rate); + else + _video->setRate(Common::Rational((int)(rate * 100.0), 100)); } void DigitalVideoCastMember::setFrameRate(int rate) { diff --git a/engines/director/castmember.h b/engines/director/castmember.h index 2396508c40f..95b6d6b2e36 100644 --- a/engines/director/castmember.h +++ b/engines/director/castmember.h @@ -146,7 +146,7 @@ public: uint getMovieTotalTime(); void seekMovie(int stamp); void setStopTime(int stamp); - void setMovieRate(int rate); + void setMovieRate(double rate); void setFrameRate(int rate); bool hasField(int field) override; diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp index ca0adeed24c..e94ca7fb7d9 100644 --- a/engines/director/lingo/lingo-the.cpp +++ b/engines/director/lingo/lingo-the.cpp @@ -1172,9 +1172,10 @@ Datum Lingo::getTheSprite(Datum &id1, int field) { d.u.i = sprite->_moveable; break; case kTheMovieRate: - d.u.i = channel->_movieRate; + d.type = FLOAT; + d.u.f = channel->_movieRate; if (debugChannelSet(-1, kDebugEndVideo)) - d.u.i = 0; + d.u.f = 0.0; break; case kTheMovieTime: d.u.i = channel->_movieTime; @@ -1373,7 +1374,7 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) { sprite->_moveable = d.asInt(); break; case kTheMovieRate: - channel->_movieRate = d.asInt(); + channel->_movieRate = d.asFloat(); if (sprite->_cast->_type == kCastDigitalVideo) ((DigitalVideoCastMember *)sprite->_cast)->setMovieRate(channel->_movieRate); else