X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Faudio_decoder.h;h=bb3aafccd6a8982824f890fa05907ea8def66b96;hb=85c65bd422742813992686c17a5e1b718cc3c449;hp=b1ec54a7b40fa5683a9ac75f20366db70bc34690;hpb=d9362bdd24f01e4c833e89d63ac3816f36eae36e;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index b1ec54a7b..bb3aafccd 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -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, boost::shared_ptr); + + boost::shared_ptr audio_content () const { + return _audio_content; + } - /** Emitted when some audio data is ready */ - boost::signals2::signal, AudioContent::Frame)> Audio; - + void seek (ContentTime time, bool accurate); + protected: - void audio (boost::shared_ptr, AudioContent::Frame); - /** Frame index of next emission (post resampling) */ - AudioContent::Frame _audio_position; + void audio (boost::shared_ptr, ContentTime); + void flush (); + + boost::shared_ptr _audio_content; boost::shared_ptr _resampler; + boost::optional _audio_position; }; #endif