From c2c224727eee4c16bd64ca4a5b5bb2d276f5afe3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 3 Mar 2010 23:39:26 +0000 Subject: changes to help strp silence git-svn-id: svn://localhost/ardour2/branches/3.0@6725 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/strip_silence.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'libs/ardour/strip_silence.cc') diff --git a/libs/ardour/strip_silence.cc b/libs/ardour/strip_silence.cc index 0f58ccf9a3..ae35eebd8f 100644 --- a/libs/ardour/strip_silence.cc +++ b/libs/ardour/strip_silence.cc @@ -46,14 +46,25 @@ StripSilence::run (boost::shared_ptr r) /* we only operate on AudioRegions, for now, though this could be adapted to MIDI as well I guess */ boost::shared_ptr region = boost::dynamic_pointer_cast (r); + InterThreadInfo itt; + if (!region) { results.push_back (r); return -1; } + /* we don't care about this but we need to fill out the fields + anyway. XXX should really be a default constructor for ITT + */ + + itt.done = false; + itt.cancel = false; + itt.progress = 0.0; + itt.thread = 0; + /* find periods of silence in the region */ std::list > const silence = - region->find_silence (dB_to_coefficient (_threshold), _minimum_length); + region->find_silence (dB_to_coefficient (_threshold), _minimum_length, itt); if (silence.size () == 1 && silence.front().first == 0 && silence.front().second == region->length() - 1) { /* the region is all silence, so just return with nothing */ -- cgit v1.2.3