Merge master.
[dcpomatic.git] / src / lib / audio_decoder.h
index a295df0ccbbf9d770b7f60afb0926ec99c56f659..35d9f3560b7d55565ddc3eb8cf9b17e1bebe4ac7 100644 (file)
@@ -38,12 +38,14 @@ class Resampler;
 class AudioDecoder : public virtual Decoder
 {
 public:
-       AudioDecoder (boost::shared_ptr<const Film>, boost::shared_ptr<const AudioContent>);
+       AudioDecoder (boost::shared_ptr<const AudioContent>);
        
        boost::shared_ptr<const AudioContent> audio_content () const {
                return _audio_content;
        }
 
+       void seek (ContentTime time, bool accurate);
+       
 protected:
 
        void audio (boost::shared_ptr<const AudioBuffers>, ContentTime);
@@ -51,8 +53,7 @@ protected:
 
        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;
+       boost::optional<ContentTime> _audio_position;
 };
 
 #endif