delete _peaks_ready_connection;
}
-AudioIntervalMap
-StripSilenceDialog::silences ()
+void
+StripSilenceDialog::silences (AudioIntervalMap& m)
{
- AudioIntervalMap m;
-
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- pair<boost::shared_ptr<Region>,AudioIntervalResult> newpair ((*v).view->region(), (*v).intervals);
+ pair<boost::shared_ptr<Region>,AudioIntervalResult> newpair (v->view->region(), v->intervals);
m.insert (newpair);
}
-
- return m;
}
void
StripSilenceDialog::drop_rects ()
{
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- (*v).view->drop_silent_frames ();
+ v->view->drop_silent_frames ();
}
}
{
/* Lock so that we don't contend with the detection thread for access to the silence regions */
Glib::Mutex::Lock lm (_lock);
+ double const y = _threshold.get_value();
+
for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) {
- (*v).view->set_silent_frames ((*v).intervals);
+ v->view->set_silent_frames (v->intervals, y);
}
}
boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> ((*i).view->region());
if (ar) {
- (*i).intervals = ar->find_silence (dB_to_coefficient (threshold ()), minimum_length (), _interthread_info);
+ i->intervals = ar->find_silence (dB_to_coefficient (threshold ()), minimum_length (), _interthread_info);
}
if (_interthread_info.cancel) {
framecnt_t
StripSilenceDialog::fade_length () const
{
- return _minimum_length.current_duration (views.front().view->region()->position());
+ return _fade_length.current_duration (views.front().view->region()->position());
}
void