X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=35d9f3560b7d55565ddc3eb8cf9b17e1bebe4ac7;hb=a4c19a34244aeaf183c25878933b570fc5c0ee34;hp=ddfb296c9a9b4fffbf8e2b94928594907566fb68;hpb=d39bfb9a1360a83f3451b79d01fdc4f465ef21d3;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index ddfb296c9..35d9f3560 100644 --- a/src/lib/audio_decoder.h +++ b/src/lib/audio_decoder.h @@ -26,8 +26,11 @@ #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); - - /** Emitted when some audio data is ready */ - boost::signals2::signal, AudioContent::Frame)> Audio; - + AudioDecoder (boost::shared_ptr); + + boost::shared_ptr audio_content () const { + return _audio_content; + } + + void seek (ContentTime time, bool accurate); + protected: - void audio (boost::shared_ptr, AudioContent::Frame); - 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