diff options
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/video/avi_decoder.cpp | 6 | ||||
-rw-r--r-- | graphics/video/avi_decoder.h | 5 |
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(); |