Stop player analysing audio even if it is configured automatically to happen.
[dcpomatic.git] / src / lib / audio_decoder.h
index 25d858681eea36e6e4ed0f6605526f88a37c49d2..19d10354351d0bef14461961b3758b56812fbd87 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -36,6 +36,7 @@ class AudioBuffers;
 class AudioContent;
 class AudioDecoderStream;
 class Log;
+class Resampler;
 
 /** @class AudioDecoder.
  *  @brief Parent class for audio decoders.
@@ -48,11 +49,19 @@ public:
        ContentTime position () const;
        void emit (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void seek ();
+       void flush ();
+
+       ContentTime stream_position (AudioStreamPtr stream) const;
 
        boost::signals2::signal<void (AudioStreamPtr, ContentAudio)> Data;
 
 private:
+       void silence (int milliseconds);
+
+       boost::shared_ptr<const AudioContent> _content;
+       /** Frame after the last one that was emitted from Data for each AudioStream */
        std::map<AudioStreamPtr, Frame> _positions;
+       std::map<AudioStreamPtr, boost::shared_ptr<Resampler> > _resamplers;
 };
 
 #endif