X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Faudio_decoder.h;h=5b68a51a17534d8f07f719927927bf022699f35b;hb=a79d78d8bb6d51f6662f1f63b9f8fd19e1a0c5f1;hp=e2d28d707908fd4d5b90eeeac6a73fc528c1054f;hpb=872557b0261c0daf2206a24e38f33b1c9871c8a3;p=dcpomatic.git diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h index e2d28d707..5b68a51a1 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,18 +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, ContentTime); void flush (); - void audio (boost::shared_ptr, AudioContent::Frame); - /** Frame index of next emission (post resampling) */ - AudioContent::Frame _audio_position; + boost::shared_ptr _audio_content; boost::shared_ptr _resampler; + boost::optional _audio_position; }; #endif