[Scummvm-git-logs] scummvm master -> a7f47d5c818696b9e79cbfc335d20148901456ed
SupSuper
supsuper at gmail.com
Sun Jan 31 18:56:43 UTC 2021
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:
a7f47d5c81 VIDEO: Allow setting the mixer sound type per audio track
Commit: a7f47d5c818696b9e79cbfc335d20148901456ed
https://github.com/scummvm/scummvm/commit/a7f47d5c818696b9e79cbfc335d20148901456ed
Author: SupSuper (supsuper at gmail.com)
Date: 2021-01-31T18:51:10Z
Commit Message:
VIDEO: Allow setting the mixer sound type per audio track
Changed paths:
video/video_decoder.cpp
video/video_decoder.h
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 6e408ba3d3..5bef77450b 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -149,8 +149,11 @@ Audio::Mixer::SoundType VideoDecoder::getSoundType() const {
}
void VideoDecoder::setSoundType(Audio::Mixer::SoundType soundType) {
- assert(!isVideoLoaded());
_soundType = soundType;
+
+ for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
+ if ((*it)->getTrackType() == Track::kTrackTypeAudio)
+ ((AudioTrack *)*it)->setSoundType(_soundType);
}
bool VideoDecoder::isVideoLoaded() const {
diff --git a/video/video_decoder.h b/video/video_decoder.h
index 358db122ed..a927818a0a 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -718,6 +718,16 @@ protected:
*/
void setBalance(int8 balance);
+ /**
+ * Get the sound type for this track
+ */
+ Audio::Mixer::SoundType getSoundType() const { return _soundType; }
+
+ /**
+ * Set the sound type for this track
+ */
+ void setSoundType(Audio::Mixer::SoundType soundType) { _soundType = soundType; }
+
/**
* Get the time the AudioStream behind this track has been
* running
More information about the Scummvm-git-logs
mailing list