diff options
author | Eugene Sandulenko | 2010-08-04 21:13:43 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2010-10-12 22:22:56 +0000 |
commit | 1e3b3af5c09ef5b9168436b2276bce612f74c0d2 (patch) | |
tree | fc92c6af12f6b358eff1889be86e7945adffe968 /engines/sword25/fmv/theora_decoder.h | |
parent | 9b3e26e7a29756848395d7a12928efdb60b8ff21 (diff) | |
download | scummvm-rg350-1e3b3af5c09ef5b9168436b2276bce612f74c0d2.tar.gz scummvm-rg350-1e3b3af5c09ef5b9168436b2276bce612f74c0d2.tar.bz2 scummvm-rg350-1e3b3af5c09ef5b9168436b2276bce612f74c0d2.zip |
SWORD25: Start of plugging audio to Theora decoder
svn-id: r53207
Diffstat (limited to 'engines/sword25/fmv/theora_decoder.h')
-rwxr-xr-x | engines/sword25/fmv/theora_decoder.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/sword25/fmv/theora_decoder.h b/engines/sword25/fmv/theora_decoder.h index cda1c8a6cb..cd526b6ba0 100755 --- a/engines/sword25/fmv/theora_decoder.h +++ b/engines/sword25/fmv/theora_decoder.h @@ -27,6 +27,8 @@ #define SWORD25_THEORADECODER_H #include "graphics/video/video_decoder.h" +#include "sound/audiostream.h" +#include "sound/mixer.h" #include <theora/theoradec.h> #include <vorbis/codec.h> @@ -45,7 +47,7 @@ namespace Sword25 { */ class TheoraDecoder : public Graphics::FixedRateVideoDecoder { public: - TheoraDecoder(); + TheoraDecoder(Audio::Mixer *mixer, Audio::Mixer::SoundType soundType); virtual ~TheoraDecoder(); /** @@ -68,6 +70,8 @@ public: uint32 getFrameCount() const { return _frameCount; } Graphics::PixelFormat getPixelFormat() const { return Graphics::PixelFormat(3, 8, 8, 8, 0, 0, 0, 0, 0); } + uint32 getElapsedTime() const; + protected: Common::Rational getFrameRate() const { return _frameRate; } @@ -81,6 +85,12 @@ private: Common::Rational _frameRate; uint32 _frameCount; + Audio::Mixer *_mixer; + Audio::Mixer::SoundType _soundType; + Audio::SoundHandle *_audHandle; + Audio::QueuingAudioStream *_audStream; + Audio::QueuingAudioStream *createAudioStream(); + ogg_sync_state _oggSync; ogg_page _oggPage; ogg_packet _oggPacket; @@ -97,20 +107,20 @@ private: int _theoraPacket; int _vorbisPacket; - int _stateFlag; + bool _stateFlag; int _ppLevelMax; int _ppLevel; int _ppInc; // single frame video buffering - int _videobufReady; + bool _videobufReady; ogg_int64_t _videobufGranulePos; double _videobufTime; // single audio fragment audio buffering int _audiobufFill; - int _audiobufReady; + bool _audiobufReady; ogg_int16_t *_audiobuf; ogg_int64_t _audiobufGranulePos; // time position of last sample }; |