aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorSven Hesse2009-11-28 00:38:18 +0000
committerSven Hesse2009-11-28 00:38:18 +0000
commit68b99f1c9585e073b66286a2a05dce71bde81263 (patch)
tree887a612fbdd27f3d75a7f4812b2f9da2458a94f0 /graphics
parent07d8f1c89b657ae663700e5bc4b6341693f2271d (diff)
downloadscummvm-rg350-68b99f1c9585e073b66286a2a05dce71bde81263.tar.gz
scummvm-rg350-68b99f1c9585e073b66286a2a05dce71bde81263.tar.bz2
scummvm-rg350-68b99f1c9585e073b66286a2a05dce71bde81263.zip
Adding a parameter to the AviDecoder constructor to allow changing the SoundType (instead of it being fixed to Plain)
svn-id: r46170
Diffstat (limited to 'graphics')
-rw-r--r--graphics/video/avi_decoder.cpp6
-rw-r--r--graphics/video/avi_decoder.h5
2 files changed, 8 insertions, 3 deletions
diff --git a/graphics/video/avi_decoder.cpp b/graphics/video/avi_decoder.cpp
index c28a6342de..5eb4d3988f 100644
--- a/graphics/video/avi_decoder.cpp
+++ b/graphics/video/avi_decoder.cpp
@@ -39,7 +39,9 @@
namespace Graphics {
-AviDecoder::AviDecoder(Audio::Mixer *mixer) : _mixer(mixer) {
+AviDecoder::AviDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType) : _mixer(mixer) {
+ _soundType = soundType;
+
_videoCodec = NULL;
_decodedHeader = false;
_audStream = NULL;
@@ -241,7 +243,7 @@ bool AviDecoder::loadFile(const char *fileName) {
// Initialize the video stuff too
_audStream = createAudioStream();
if (_audStream)
- _mixer->playInputStream(Audio::Mixer::kPlainSoundType, _audHandle, _audStream);
+ _mixer->playInputStream(_soundType, _audHandle, _audStream);
debug (0, "Frames = %d, Dimensions = %d x %d", _header.totalFrames, _header.width, _header.height);
debug (0, "Frame Rate = %d", getFrameRate());
diff --git a/graphics/video/avi_decoder.h b/graphics/video/avi_decoder.h
index 25e13873b6..c4dbb0d41d 100644
--- a/graphics/video/avi_decoder.h
+++ b/graphics/video/avi_decoder.h
@@ -174,7 +174,8 @@ struct AVIStreamHeader {
class AviDecoder : public VideoDecoder {
public:
- AviDecoder(Audio::Mixer *mixer);
+ AviDecoder(Audio::Mixer *mixer,
+ Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
virtual ~AviDecoder();
/**
@@ -207,6 +208,8 @@ private:
Codec *_videoCodec;
Codec *createCodec();
+ Audio::Mixer::SoundType _soundType;
+
void runHandle(uint32 tag);
void handleList();
void handleStreamHeader();