#include <glibmm/threads.h>
#include <boost/function.hpp>
+#include <boost/scoped_array.hpp>
#include "ardour/source.h"
#include "ardour/ardour.h"
#include "ardour/readable.h"
-#include "pbd/file_manager.h"
#include "pbd/stateful.h"
#include "pbd/xml++.h"
virtual float sample_rate () const = 0;
- virtual void mark_streaming_write_completed ();
+ virtual void mark_streaming_write_completed (const Lock& lock);
virtual bool can_truncate_peaks() const { return true; }
static bool _build_missing_peakfiles;
static bool _build_peakfiles;
- static size_t _working_buffers_size;
-
/* these collections of working buffers for supporting
playlist's reading from potentially nested/recursive
sources assume SINGLE THREADED reads by the butler
*/
mutable Glib::Threads::Mutex _peaks_ready_lock;
- PBD::FdFileDescriptor* _peakfile_descriptor;
int _peakfile_fd;
framecnt_t peak_leftover_cnt;
framecnt_t peak_leftover_size;
Sample* peak_leftovers;
framepos_t peak_leftover_frame;
+
+ mutable bool _first_run;
+ mutable double _last_scale;
+ mutable off_t _last_map_off;
+ mutable size_t _last_raw_map_length;
+ mutable boost::scoped_array<PeakData> peak_cache;
};
}