summaryrefslogtreecommitdiff
path: root/gtk2_ardour/strip_silence_dialog.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-12-09 18:17:36 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-12-09 18:17:36 +0000
commitebf3762fa91d911af411f1b5c68e3c67f2c47170 (patch)
treea39eacadb7c1010354ad6776a75d93cee4580c71 /gtk2_ardour/strip_silence_dialog.cc
parent0a62044c2c51b38c900ed75d4037e6093901f387 (diff)
fix computation of silence text, and its display. it is still not on top of the canvas, which is a small problem
git-svn-id: svn://localhost/ardour2/branches/3.0@8227 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/strip_silence_dialog.cc')
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 3e62e4247a..daa540d039 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -84,9 +84,12 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
_minimum_length.set_mode (AudioClock::Frames);
_minimum_length.set (1000, true);
+ /* Add this back when we finally do something with it */
+ /*
table->attach (*Gtk::manage (new Gtk::Label (_("Fade length"), 1, 0.5)), 0, 1, n, n + 1, Gtk::FILL);
table->attach (_fade_length, 1, 2, n, n + 1, Gtk::FILL);
++n;
+ */
_fade_length.set_session (s);
_fade_length.set_mode (AudioClock::Frames);
@@ -133,17 +136,13 @@ StripSilenceDialog::~StripSilenceDialog ()
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);
m.insert (newpair);
}
-
- return m;
}
void
@@ -188,8 +187,10 @@ StripSilenceDialog::update_silence_rects ()
{
/* 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);
}
}