diff options
author | nick_m <mainsbridge@gmail.com> | 2015-03-11 00:40:02 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-03-11 00:40:02 +1100 |
commit | fb8bc4e8c97b4977b9698ba92b9ff7a8b9c54a5c (patch) | |
tree | 10cec936701106f107839422c446b3bf4ab92d39 /libs/ardour/ardour/audiosource.h | |
parent | 1199fe2f90d3b2b7361eff270ae3f3bd85f4af62 (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.h | 7 |
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; }; } |