diff options
-rw-r--r-- | video/avi_decoder.cpp | 6 | ||||
-rw-r--r-- | video/avi_decoder.h | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/video/avi_decoder.cpp b/video/avi_decoder.cpp index 92a60fcccf..ff41099e69 100644 --- a/video/avi_decoder.cpp +++ b/video/avi_decoder.cpp @@ -93,6 +93,10 @@ AVIDecoder::~AVIDecoder() { close(); } +AVIDecoder::AVIAudioTrack *AVIDecoder::createAudioTrack(AVIStreamHeader sHeader, PCMWaveFormat wvInfo) { + return new AVIAudioTrack(sHeader, wvInfo, _soundType); +} + void AVIDecoder::initCommon() { _decodedHeader = false; _foundMovieList = false; @@ -268,7 +272,7 @@ void AVIDecoder::handleStreamHeader(uint32 size) { if (wvInfo.channels == 2) sHeader.sampleSize /= 2; - addTrack(new AVIAudioTrack(sHeader, wvInfo, _soundType)); + addTrack(createAudioTrack(sHeader, wvInfo)); } // Ensure that we're at the end of the chunk diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 5d52c7c797..f7259bf030 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -69,7 +69,6 @@ public: protected: void readNextPacket(); -private: struct BitmapInfoHeader { uint32 size; uint32 width; @@ -192,13 +191,12 @@ private: AVIAudioTrack(const AVIStreamHeader &streamHeader, const PCMWaveFormat &waveFormat, Audio::Mixer::SoundType soundType); ~AVIAudioTrack(); - void queueSound(Common::SeekableReadStream *stream); + virtual void queueSound(Common::SeekableReadStream *stream); Audio::Mixer::SoundType getSoundType() const { return _soundType; } protected: Audio::AudioStream *getAudioStream() const; - private: // Audio Codecs enum { kWaveFormatNone = 0, @@ -233,6 +231,9 @@ private: void handleStreamHeader(uint32 size); uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; } byte getStreamIndex(uint32 tag) const; + +public: + virtual AVIAudioTrack *createAudioTrack(AVIStreamHeader sHeader, PCMWaveFormat wvInfo); }; } // End of namespace Video |