fix silence-strip process report
[ardour.git] / libs / ardour / strip_silence.cc
index a5b115205a750fc55d7ae2606e164aa740e8706a..ff79371b966551bbc54fcd2dc1ce6751316e04f6 100644 (file)
@@ -22,8 +22,6 @@
 #include "ardour/strip_silence.h"
 #include "ardour/audioregion.h"
 #include "ardour/region_factory.h"
-#include "ardour/session.h"
-#include "ardour/dB.h"
 #include "ardour/progress.h"
 
 using namespace ARDOUR;
@@ -102,14 +100,14 @@ StripSilence::run (boost::shared_ptr<Region> r, Progress* progress)
 
        frameoffset_t const end_of_region = r->start() + r->length();
 
-       if (last_silence->second != end_of_region - 1) {
+       if (last_silence->second < end_of_region - 1) {
                audible.push_back (std::make_pair (last_silence->second, end_of_region - 1));
        }
 
        int n = 0;
        int const N = audible.size ();
 
-       for (AudioIntervalResult::const_iterator i = audible.begin(); i != audible.end(); ++i) {
+       for (AudioIntervalResult::const_iterator i = audible.begin(); i != audible.end(); ++i, ++n) {
 
                PBD::PropertyList plist;
                boost::shared_ptr<AudioRegion> copy;