+ /* Add audible sections in the middle of the region */
+ for (AudioIntervalResult::const_iterator i = silence.begin (); i != silence.end(); ++i) {
+ AudioIntervalResult::const_iterator j = i;
+ ++j;
+
+ if (j != silence.end ()) {
+ audible.push_back (std::make_pair (i->second, j->first));
+ }
+ }
+
+ /* Add the possible audible section at the end of the region */
+ AudioIntervalResult::const_iterator last_silence = silence.end ();
+ --last_silence;
+
+ frameoffset_t const end_of_region = r->start() + r->length();
+
+ if (last_silence->second < end_of_region - 1) {
+ audible.push_back (std::make_pair (last_silence->second, end_of_region - 1));
+ }