summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audiosource.h
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2015-03-11 00:40:02 +1100
committernick_m <mainsbridge@gmail.com>2015-03-11 00:40:02 +1100
commitfb8bc4e8c97b4977b9698ba92b9ff7a8b9c54a5c (patch)
tree10cec936701106f107839422c446b3bf4ab92d39 /libs/ardour/ardour/audiosource.h
parent1199fe2f90d3b2b7361eff270ae3f3bd85f4af62 (diff)
Manual merge of the backend (peakfile reading) part of waveview branch.
Summary: * use mmap() for the whole peakfile instead of lots of small seek/reads * cache the computed peaks * where possible, open files with O_NOATIME.
Diffstat (limited to 'libs/ardour/ardour/audiosource.h')
-rw-r--r--libs/ardour/ardour/audiosource.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h
index 622bc6052a..095d9d2169 100644
--- a/libs/ardour/ardour/audiosource.h
+++ b/libs/ardour/ardour/audiosource.h
@@ -28,6 +28,7 @@
#include <glibmm/threads.h>
#include <boost/function.hpp>
+#include <boost/scoped_array.hpp>
#include "ardour/source.h"
#include "ardour/ardour.h"
@@ -164,6 +165,12 @@ class LIBARDOUR_API AudioSource : virtual public Source,
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;
};
}