aboutsummaryrefslogtreecommitdiff
path: root/video/smk_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/smk_decoder.cpp')
-rw-r--r--video/smk_decoder.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/video/smk_decoder.cpp b/video/smk_decoder.cpp
index 439fe9027d..359f4cb9bd 100644
--- a/video/smk_decoder.cpp
+++ b/video/smk_decoder.cpp
@@ -667,7 +667,7 @@ void SmackerDecoder::handleAudioTrack(byte track, uint32 chunkSize, uint32 unpac
}
if (!_audioStarted) {
- _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, 255);
+ _mixer->playStream(_soundType, &_audioHandle, _audioStream, -1, getVolume(), getBalance());
_audioStarted = true;
}
} else {
@@ -819,4 +819,14 @@ void SmackerDecoder::unpackPalette() {
free(chunk);
}
+void SmackerDecoder::updateVolume() {
+ if (g_system->getMixer()->isSoundHandleActive(_audioHandle))
+ g_system->getMixer()->setChannelVolume(_audioHandle, getVolume());
+}
+
+void SmackerDecoder::updateBalance() {
+ if (g_system->getMixer()->isSoundHandleActive(_audioHandle))
+ g_system->getMixer()->setChannelBalance(_audioHandle, getBalance());
+}
+
} // End of namespace Video