From 0a9cef7720ed9bd83442d284d18831437b80a482 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 16 May 2011 02:17:58 +0000 Subject: very basic Join (regions) editing operation. not finished yet, no undoable, no sensible name for new region, etc. etc git-svn-id: svn://localhost/ardour2/branches/3.0@9518 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/audiosource.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'libs/ardour/ardour/audiosource.h') diff --git a/libs/ardour/ardour/audiosource.h b/libs/ardour/ardour/audiosource.h index 5f06d3ee09..d0d34a55c4 100644 --- a/libs/ardour/ardour/audiosource.h +++ b/libs/ardour/ardour/audiosource.h @@ -106,10 +106,26 @@ class AudioSource : virtual public Source, /** @return true if the each source sample s must be clamped to -1 < s < 1 */ virtual bool clamped_at_unity () const = 0; + static void allocate_working_buffers (); + protected: 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 + thread, or a lock around calls that use them. + */ + + static std::vector _mixdown_buffers; + static std::vector _gain_buffers; + static Glib::StaticMutex _level_buffer_lock; + + static void ensure_buffers_for_level (uint32_t); + framecnt_t _length; std::string peakpath; std::string _captured_for; @@ -129,7 +145,7 @@ class AudioSource : virtual public Source, virtual framecnt_t write_unlocked (Sample *dst, framecnt_t cnt) = 0; virtual std::string peak_path(std::string audio_path) = 0; virtual std::string find_broken_peakfile (std::string missing_peak_path, - std::string audio_path) { return std::string(); } + std::string audio_path) { return peak_path (audio_path); } virtual int read_peaks_with_fpp (PeakData *peaks, framecnt_t npeaks, framepos_t start, framecnt_t cnt, -- cgit v1.2.3