From 0b2223212b20910717d63d65517b4a8abe5d2bd4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Dec 2013 23:43:55 +0000 Subject: Attempt to move resampling into AudioDecoder. --- src/lib/audio_decoder.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/lib/audio_decoder.h') 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, boost::shared_ptr); - + boost::shared_ptr audio_content () const { return _audio_content; } @@ -46,8 +47,12 @@ public: protected: void audio (boost::shared_ptr, ContentTime); - - boost::shared_ptr _audio_content; + void flush (); + + boost::shared_ptr _audio_content; + boost::shared_ptr _resampler; + /* End time of last audio that we wrote to _pending; only used for flushing the resampler */ + ContentTime _last_audio; }; #endif -- cgit v1.2.3