diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-03-15 23:39:25 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-04-19 23:04:32 +0100 |
| commit | fe99d14e3047e9302e94db372923c92291016f1c (patch) | |
| tree | 7a826e545927e576794af532fb403506f33603a7 /src/lib/butler.h | |
| parent | 81301e260bad6944a75b3d20c1be4f2ff9929db7 (diff) | |
First bits of audio support.
Diffstat (limited to 'src/lib/butler.h')
| -rw-r--r-- | src/lib/butler.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/butler.h b/src/lib/butler.h index e02351b0f..d6742dcfa 100644 --- a/src/lib/butler.h +++ b/src/lib/butler.h @@ -19,6 +19,8 @@ */ #include "video_ring_buffers.h" +#include "audio_ring_buffers.h" +#include "audio_mapping.h" #include <boost/shared_ptr.hpp> #include <boost/weak_ptr.hpp> #include <boost/thread.hpp> @@ -32,15 +34,17 @@ class PlayerVideo; class Butler : public boost::noncopyable { public: - Butler (boost::weak_ptr<const Film> film, boost::shared_ptr<Player> player); + Butler (boost::weak_ptr<const Film> film, boost::shared_ptr<Player> player, AudioMapping map, int audio_channels); ~Butler (); void seek (DCPTime position, bool accurate); std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get_video (); + void get_audio (float* out, Frame frames); private: void thread (); void video (boost::shared_ptr<PlayerVideo> video, DCPTime time); + void audio (boost::shared_ptr<AudioBuffers> audio, DCPTime time); void player_changed (); boost::weak_ptr<const Film> _film; @@ -48,6 +52,7 @@ private: boost::thread* _thread; VideoRingBuffers _video; + AudioRingBuffers _audio; boost::mutex _mutex; boost::condition _summon; @@ -57,6 +62,10 @@ private: bool _finished; + AudioMapping _audio_mapping; + int _audio_channels; + boost::signals2::scoped_connection _player_video_connection; + boost::signals2::scoped_connection _player_audio_connection; boost::signals2::scoped_connection _player_changed_connection; }; |
