X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Faudiosource.h;h=c02310ea288b3fdb7273998ca2fa5e6b56ee52b9;hb=46c83693284ece4a732d26e62113ea4ac584d539;hp=910e03170d37832b5550d8e75de39f5238c52bc3;hpb=59076a7e4c66db12bbbfbf01f012ca2f6ba4bf56;p=ardour.git diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 910e03170d..c02310ea28 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -28,11 +28,11 @@ #include #include +#include #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" @@ -61,7 +61,7 @@ class LIBARDOUR_API AudioSource : virtual public Source, 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; } @@ -109,8 +109,6 @@ class LIBARDOUR_API AudioSource : virtual public Source, 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 @@ -160,12 +158,17 @@ class LIBARDOUR_API AudioSource : virtual public Source, */ 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 peak_cache; }; }