From fb8bc4e8c97b4977b9698ba92b9ff7a8b9c54a5c Mon Sep 17 00:00:00 2001 From: nick_m Date: Wed, 11 Mar 2015 00:40:02 +1100 Subject: 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. --- libs/ardour/ardour/audiosource.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/ardour/ardour') 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 #include +#include #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 peak_cache; }; } -- cgit v1.2.3