[Scummvm-git-logs] scummvm master -> deb2d48d715af7dbcdb92815cf828230ab2b3ab1
bluegr
noreply at scummvm.org
Tue Jan 25 16:49:30 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
deb2d48d71 TRECISION: Reuse muteTrack() and setMute()
Commit: deb2d48d715af7dbcdb92815cf828230ab2b3ab1
https://github.com/scummvm/scummvm/commit/deb2d48d715af7dbcdb92815cf828230ab2b3ab1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-01-25T18:49:16+02:00
Commit Message:
TRECISION: Reuse muteTrack() and setMute()
Changed paths:
engines/trecision/video.cpp
engines/trecision/video.h
diff --git a/engines/trecision/video.cpp b/engines/trecision/video.cpp
index b47a34f0be6..4951dbf16fb 100644
--- a/engines/trecision/video.cpp
+++ b/engines/trecision/video.cpp
@@ -39,6 +39,24 @@
namespace Trecision {
+void NightlongVideoDecoder::muteTrack(uint track, bool mute) {
+ // FIXME: In the Amiga version, there's only one audio track
+ // for each video, so we silently ignore calls to mute the
+ // second audio track. Is this correct?
+
+ Track *t = getTrack(track);
+ if (t && t->getTrackType() == Track::kTrackTypeAudio) {
+ ((AudioTrack *)t)->setMute(mute);
+ }
+}
+
+void NightlongVideoDecoder::setMute(bool mute) {
+ for (TrackList::iterator it = getTrackListBegin(); it != getTrackListEnd(); ++it) {
+ if ((*it)->getTrackType() == Track::kTrackTypeAudio)
+ ((AudioTrack *)*it)->setMute(mute);
+ }
+}
+
bool NightlongSmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
if (!SmackerDecoder::loadStream(stream))
return false;
@@ -55,20 +73,6 @@ bool NightlongSmackerDecoder::loadStream(Common::SeekableReadStream *stream) {
return true;
}
-void NightlongSmackerDecoder::muteTrack(uint track, bool mute) {
- Track *t = getTrack(track);
- if (t && t->getTrackType() == Track::kTrackTypeAudio) {
- ((AudioTrack *)t)->setMute(mute);
- }
-}
-
-void NightlongSmackerDecoder::setMute(bool mute) {
- for (TrackList::iterator it = getTrackListBegin(); it != getTrackListEnd(); ++it) {
- if ((*it)->getTrackType() == Track::kTrackTypeAudio)
- ((AudioTrack *)*it)->setMute(mute);
- }
-}
-
bool NightlongSmackerDecoder::forceSeekToFrame(uint frame) {
const uint seekFrame = MAX<uint>(frame - 10, 0);
@@ -197,14 +201,6 @@ bool NightlongAmigaDecoder::loadStream(Common::SeekableReadStream *stream) {
return true;
}
-void NightlongAmigaDecoder::muteTrack(uint track, bool mute) {
- // TODO
-}
-
-void NightlongAmigaDecoder::setMute(bool mute) {
- // TODO
-}
-
bool NightlongAmigaDecoder::forceSeekToFrame(uint frame) {
// TODO
return false;
diff --git a/engines/trecision/video.h b/engines/trecision/video.h
index 3cd679b83ce..d612607df9a 100644
--- a/engines/trecision/video.h
+++ b/engines/trecision/video.h
@@ -34,8 +34,8 @@ class TrecisionEngine;
class NightlongVideoDecoder : public Video::SmackerDecoder {
public:
- virtual void muteTrack(uint track, bool mute) {}
- virtual void setMute(bool mute) {}
+ void muteTrack(uint track, bool mute);
+ void setMute(bool mute);
virtual bool forceSeekToFrame(uint frame) { return false; }
virtual bool endOfFrames() const { return false; }
};
@@ -43,8 +43,6 @@ public:
class NightlongSmackerDecoder : public NightlongVideoDecoder {
public:
bool loadStream(Common::SeekableReadStream *stream) override;
- void muteTrack(uint track, bool mute) override;
- void setMute(bool mute) override;
bool forceSeekToFrame(uint frame) override;
bool endOfFrames() const override;
};
@@ -52,8 +50,6 @@ public:
class NightlongAmigaDecoder : public NightlongVideoDecoder {
public:
bool loadStream(Common::SeekableReadStream *stream) override;
- void muteTrack(uint track, bool mute) override;
- void setMute(bool mute) override;
bool forceSeekToFrame(uint frame) override;
bool endOfFrames() const override;
const Common::Rect *getNextDirtyRect() override;
More information about the Scummvm-git-logs
mailing list