aboutsummaryrefslogtreecommitdiff
path: root/video/qt_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/qt_decoder.cpp')
-rw-r--r--video/qt_decoder.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/video/qt_decoder.cpp b/video/qt_decoder.cpp
index 585f5927a1..aba545abc0 100644
--- a/video/qt_decoder.cpp
+++ b/video/qt_decoder.cpp
@@ -97,7 +97,7 @@ void QuickTimeDecoder::startAudio() {
updateAudioBuffer();
for (uint32 i = 0; i < _audioTracks.size(); i++) {
- g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandles[i], _audioTracks[i], -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO);
+ g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audioHandles[i], _audioTracks[i], -1, getVolume(), getBalance(), DisposeAfterUse::NO);
// Pause the audio again if we're still paused
if (isPaused())
@@ -236,6 +236,18 @@ bool QuickTimeDecoder::loadStream(Common::SeekableReadStream *stream) {
return true;
}
+void QuickTimeDecoder::updateVolume() {
+ for (uint32 i = 0; i < _audioHandles.size(); i++)
+ if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i]))
+ g_system->getMixer()->setChannelVolume(_audioHandles[i], getVolume());
+}
+
+void QuickTimeDecoder::updateBalance() {
+ for (uint32 i = 0; i < _audioHandles.size(); i++)
+ if (g_system->getMixer()->isSoundHandleActive(_audioHandles[i]))
+ g_system->getMixer()->setChannelBalance(_audioHandles[i], getBalance());
+}
+
void QuickTimeDecoder::init() {
Audio::QuickTimeAudioDecoder::init();