From f17661208686f7237efc902c61028462af75a240 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 8 Dec 2010 21:02:37 +0000 Subject: move display of silence for strip-silence into regionviews, along with text to describe impact on the region. this doesn't actually make strip-silence work any better, but the display is improving git-svn-id: svn://localhost/ardour2/branches/3.0@8224 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/audioregion.h | 2 +- libs/ardour/ardour/types.h | 3 +++ libs/ardour/audioregion.cc | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h index a5791c8b30..80a725f771 100644 --- a/libs/ardour/ardour/audioregion.h +++ b/libs/ardour/ardour/audioregion.h @@ -176,7 +176,7 @@ class AudioRegion : public Region int update_transient (framepos_t old_position, framepos_t new_position); int adjust_transients (framepos_t delta); - std::list > find_silence (Sample, framecnt_t, InterThreadInfo&) const; + AudioIntervalResult find_silence (Sample, framecnt_t, InterThreadInfo&) const; private: friend class RegionFactory; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 1f16ce6313..cae2d5bcf7 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -72,6 +72,9 @@ namespace ARDOUR { static const framepos_t max_framepos = INT64_MAX; static const framecnt_t max_framecnt = INT64_MAX; + // a set of (time) intervals: first of pair is the offset within the region, second is the length of the interval + typedef std::list > AudioIntervalResult; + struct IOChange { enum Type { diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index f3ae05f1b1..84709d7bb2 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1498,10 +1498,10 @@ in this and future transient-detection operations.\n\ * * @param threshold Threshold below which signal is considered silence (as a sample value) * @param min_length Minimum length of silent period to be reported. - * @return Silent periods; first of pair is the offset within the region, second is the length of the period + * @return Silent intervals */ -std::list > +AudioIntervalResult AudioRegion::find_silence (Sample threshold, framecnt_t min_length, InterThreadInfo& itt) const { framecnt_t const block_size = 64 * 1024; @@ -1510,8 +1510,8 @@ AudioRegion::find_silence (Sample threshold, framecnt_t min_length, InterThreadI framepos_t pos = _start; framepos_t const end = _start + _length - 1; - - std::list > silent_periods; + + AudioIntervalResult silent_periods; bool in_silence = false; frameoffset_t silence_start = 0; -- cgit v1.2.3