aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/fmv/theora_decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sword25/fmv/theora_decoder.cpp')
-rw-r--r--engines/sword25/fmv/theora_decoder.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/sword25/fmv/theora_decoder.cpp b/engines/sword25/fmv/theora_decoder.cpp
index 082c569fda..d38f5a26cf 100644
--- a/engines/sword25/fmv/theora_decoder.cpp
+++ b/engines/sword25/fmv/theora_decoder.cpp
@@ -289,7 +289,7 @@ bool TheoraDecoder::loadStream(Common::SeekableReadStream *stream) {
}
if (_audStream)
- g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream);
+ g_system->getMixer()->playStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream, -1, getVolume(), getBalance());
} else {
// tear down the partial vorbis setup
vorbis_info_clear(&_vorbisInfo);
@@ -550,6 +550,16 @@ void TheoraDecoder::translateYUVtoRGBA(th_ycbcr_buffer &YUVBuffer) {
Graphics::convertYUV420ToRGB(&_surface, YUVBuffer[kBufferY].data, YUVBuffer[kBufferU].data, YUVBuffer[kBufferV].data, YUVBuffer[kBufferY].width, YUVBuffer[kBufferY].height, YUVBuffer[kBufferY].stride, YUVBuffer[kBufferU].stride);
}
+void TheoraDecoder::updateVolume() {
+ if (g_system->getMixer()->isSoundHandleActive(*_audHandle))
+ g_system->getMixer()->setChannelVolume(*_audHandle, getVolume());
+}
+
+void TheoraDecoder::updateBalance() {
+ if (g_system->getMixer()->isSoundHandleActive(*_audHandle))
+ g_system->getMixer()->setChannelBalance(*_audHandle, getBalance());
+}
+
} // End of namespace Sword25
#endif