diff options
Diffstat (limited to 'video/video_decoder.cpp')
-rw-r--r-- | video/video_decoder.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index ae82a3374c..44d7917652 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -22,6 +22,8 @@ #include "video/video_decoder.h" +#include "audio/mixer.h" // for kMaxChannelVolume + #include "common/rational.h" #include "common/file.h" #include "common/system.h" @@ -61,6 +63,8 @@ void VideoDecoder::reset() { _curFrame = -1; _startTime = 0; _pauseLevel = 0; + _audioVolume = Audio::Mixer::kMaxChannelVolume; + _audioBalance = 0; } bool VideoDecoder::endOfVideo() const { @@ -94,6 +98,16 @@ void VideoDecoder::resetPauseStartTime() { _pauseStartTime = g_system->getMillis(); } +void VideoDecoder::setVolume(byte volume) { + _audioVolume = volume; + updateVolume(); +} + +void VideoDecoder::setBalance(int8 balance) { + _audioBalance = balance; + updateBalance(); +} + uint32 FixedRateVideoDecoder::getTimeToNextFrame() const { if (endOfVideo() || _curFrame < 0) return 0; |