diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 23:43:55 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 23:43:55 +0000 |
| commit | 0b2223212b20910717d63d65517b4a8abe5d2bd4 (patch) | |
| tree | eeddca28e61a4836f207bff404a4244dfadabfa2 /src/lib/audio_decoder.h | |
| parent | ff1ab29c3ea270061a54bde529270953e14b9adc (diff) | |
Attempt to move resampling into AudioDecoder.
Diffstat (limited to 'src/lib/audio_decoder.h')
| -rw-r--r-- | src/lib/audio_decoder.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index 0cd0e9754..a295df0cc 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -30,6 +30,7 @@ #include "decoded.h" class AudioBuffers; +class Resampler; /** @class AudioDecoder. * @brief Parent class for audio decoders. @@ -38,7 +39,7 @@ class AudioDecoder : public virtual Decoder { public: AudioDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const AudioContent>); - + boost::shared_ptr<const AudioContent> audio_content () const { return _audio_content; } @@ -46,8 +47,12 @@ public: protected: void audio (boost::shared_ptr<const AudioBuffers>, ContentTime); - - boost::shared_ptr<const AudioContent> _audio_content; + void flush (); + + boost::shared_ptr<const AudioContent> _audio_content; + boost::shared_ptr<Resampler> _resampler; + /* End time of last audio that we wrote to _pending; only used for flushing the resampler */ + ContentTime _last_audio; }; #endif |
