aboutsummaryrefslogtreecommitdiff
path: root/engines/sword25/fmv/theora_decoder.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-05-27 21:18:32 -0400
committerMatthew Hoops2012-05-28 14:00:16 -0400
commit10f7e805c20c164a7b3a20832237341136165e28 (patch)
tree5a561ded0a078ddd744b42337d253730bd5177ea /engines/sword25/fmv/theora_decoder.cpp
parent792d1e6f6ae3d910fcc88f43dc92a1a761496c1e (diff)
downloadscummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.tar.gz
scummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.tar.bz2
scummvm-rg350-10f7e805c20c164a7b3a20832237341136165e28.zip
VIDEO: Add volume/balance control to VideoDecoder
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