aboutsummaryrefslogtreecommitdiff
path: root/video/psx_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'video/psx_decoder.cpp')
-rw-r--r--video/psx_decoder.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/video/psx_decoder.cpp b/video/psx_decoder.cpp
index 74f740f614..df91a2badd 100644
--- a/video/psx_decoder.cpp
+++ b/video/psx_decoder.cpp
@@ -385,7 +385,7 @@ void PSXStreamDecoder::queueAudioFromSector(Common::SeekableReadStream *sector)
uint rate = (format & (1 << 2)) ? 18900 : 37800;
_audStream = Audio::makeQueuingAudioStream(rate, stereo);
- g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream);
+ g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, &_audHandle, _audStream, -1, getVolume(), getBalance());
}
sector->seek(24);
@@ -694,4 +694,14 @@ void PSXStreamDecoder::decodeBlock(Common::BitStream *bits, byte *block, int pit
}
}
+void PSXStreamDecoder::updateVolume() {
+ if (g_system->getMixer()->isSoundHandleActive(_audHandle))
+ g_system->getMixer()->setChannelVolume(_audHandle, getVolume());
+}
+
+void PSXStreamDecoder::updateBalance() {
+ if (g_system->getMixer()->isSoundHandleActive(_audHandle))
+ g_system->getMixer()->setChannelBalance(_audHandle, getBalance());
+}
+
} // End of namespace Video