Merge master; specify libdcp-1.0.
[dcpomatic.git] / src / lib / audio_decoder.h
index b1ec54a7b40fa5683a9ac75f20366db70bc34690..bb3aafccd6a8982824f890fa05907ea8def66b96 100644 (file)
@@ -27,6 +27,7 @@
 #include "decoder.h"
 #include "content.h"
 #include "audio_content.h"
+#include "decoded.h"
 
 class AudioBuffers;
 class Resampler;
@@ -38,16 +39,21 @@ 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;
+       }
 
-       /** Emitted when some audio data is ready */
-       boost::signals2::signal<void (boost::shared_ptr<const AudioBuffers>, AudioContent::Frame)> Audio;
-
+       void seek (ContentTime time, bool accurate);
+       
 protected:
 
-       void audio (boost::shared_ptr<const AudioBuffers>, AudioContent::Frame);
-       /** Frame index of next emission (post resampling) */
-       AudioContent::Frame _audio_position;
+       void audio (boost::shared_ptr<const AudioBuffers>, ContentTime);
+       void flush ();
+
+       boost::shared_ptr<const AudioContent> _audio_content;
        boost::shared_ptr<Resampler> _resampler;
+       boost::optional<AudioFrame> _audio_position;
 };
 
 #endif