Merge master.
[dcpomatic.git] / src / lib / audio_decoder.h
index ddfb296c9a9b4fffbf8e2b94928594907566fb68..35d9f3560b7d55565ddc3eb8cf9b17e1bebe4ac7 100644 (file)
 
 #include "decoder.h"
 #include "content.h"
+#include "audio_content.h"
+#include "decoded.h"
 
 class AudioBuffers;
+class Resampler;
 
 /** @class AudioDecoder.
  *  @brief Parent class for audio decoders.
@@ -35,15 +38,22 @@ class AudioBuffers;
 class AudioDecoder : public virtual Decoder
 {
 public:
-       AudioDecoder (boost::shared_ptr<const Film>);
-
-       /** Emitted when some audio data is ready */
-       boost::signals2::signal<void (boost::shared_ptr<const AudioBuffers>, AudioContent::Frame)> Audio;
-
+       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>, AudioContent::Frame);
-       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<ContentTime> _audio_position;
 };
 
 #endif