- void reset_decoded_audio ();
-
- boost::shared_ptr<const AudioContent> _audio_content;
- boost::shared_ptr<Resampler> _resampler;
- boost::optional<AudioFrame> _audio_position;
- /** Currently-available decoded audio data */
- ContentAudio _decoded_audio;
- /** The time of an accurate seek after which we have not yet received any actual
- data at the seek time.
- */
- boost::optional<ContentTime> _seek_reference;
+
+ dcpomatic::ContentTime stream_position (std::shared_ptr<const Film> film, AudioStreamPtr stream) const;
+
+ boost::signals2::signal<void (AudioStreamPtr, ContentAudio)> Data;
+
+private:
+ void silence (AudioStreamPtr stream, int milliseconds);
+
+ std::shared_ptr<const AudioContent> _content;
+ /** Frame after the last one that was emitted from Data (i.e. at the resampled rate, if applicable)
+ * for each AudioStream.
+ */
+ typedef std::map<AudioStreamPtr, Frame> PositionMap;
+ PositionMap _positions;
+ typedef std::map<AudioStreamPtr, std::shared_ptr<Resampler>> ResamplerMap;
+ ResamplerMap _resamplers;
+
+ bool _fast;