/*
- Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
*/
+#include "audio_buffers.h"
+#include "dcpomatic_time.h"
#include "util.h"
-class AudioBuffers;
-
class AudioMerger
{
public:
/** Pull audio up to a given time; after this call, no more data can be pushed
* before the specified time.
*/
- TimedAudioBuffers pull (DCPTime time);
+ std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> pull (DCPTime time);
void push (boost::shared_ptr<const AudioBuffers> audio, DCPTime time);
- TimedAudioBuffers flush ();
- void clear (DCPTime t);
-
+ DCPTime last_pull () const {
+ return _last_pull;
+ }
+
private:
boost::shared_ptr<AudioBuffers> _buffers;
- int _frame_rate;
DCPTime _last_pull;
+ int _frame_rate;
};