diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-04 00:01:30 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-04 00:01:30 +0100 |
| commit | 54e6f206305d4275808cfce36987edcc61a6a779 (patch) | |
| tree | ba403ce56da8c5ce5a4a1652e83bd18855a41c01 /src/lib/audio_ring_buffers.h | |
| parent | 4fe1a062eb31d680b8b4ac0191b9e2fc2d6aaec3 (diff) | |
Timestamp audio emissions from butler and hence discard very late
audio in FilmViewer. This should help with the case where lots
of video frames are rapidly discarded when they are late but the
corresponding audio is not, hence audio buffers get overfilled.
Diffstat (limited to 'src/lib/audio_ring_buffers.h')
| -rw-r--r-- | src/lib/audio_ring_buffers.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/audio_ring_buffers.h b/src/lib/audio_ring_buffers.h index 3c726425c..53236cb32 100644 --- a/src/lib/audio_ring_buffers.h +++ b/src/lib/audio_ring_buffers.h @@ -33,15 +33,15 @@ class AudioRingBuffers : public boost::noncopyable public: AudioRingBuffers (); - void put (boost::shared_ptr<const AudioBuffers> data); - bool get (float* out, int channels, int frames); + void put (boost::shared_ptr<const AudioBuffers> data, DCPTime time); + boost::optional<DCPTime> get (float* out, int channels, int frames); void clear (); Frame size () const; private: mutable boost::mutex _mutex; - std::list<boost::shared_ptr<const AudioBuffers> > _buffers; + std::list<std::pair<boost::shared_ptr<const AudioBuffers>, DCPTime> > _buffers; int _used_in_head; }; |
