summaryrefslogtreecommitdiff
path: root/gtk2_ardour/strip_silence_dialog.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-04-30 17:07:57 +0000
committerCarl Hetherington <carl@carlh.net>2009-04-30 17:07:57 +0000
commit57e1c287509d9a6f1d8b3b64000625b68a8b997a (patch)
treef487f2a1bbf3236fdca0526c596aea3c0d91924b /gtk2_ardour/strip_silence_dialog.h
parent9ec372879601dc946b90ed5be8c426c06edc1d23 (diff)
Preview effect of strip silence within the dialog.
git-svn-id: svn://localhost/ardour2/branches/3.0@5017 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/strip_silence_dialog.h')
-rw-r--r--gtk2_ardour/strip_silence_dialog.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index faf52c268a..351fffa005 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -19,12 +19,18 @@
#include <gtkmm/spinbutton.h>
#include "ardour_dialog.h"
+#include "canvas.h"
+
+namespace ARDOUR {
+ class AudioRegion;
+}
/// Dialog box to set options for the `strip silence' filter
class StripSilenceDialog : public ArdourDialog
{
public:
- StripSilenceDialog ();
+ StripSilenceDialog (std::list<boost::shared_ptr<ARDOUR::AudioRegion> > const &);
+ ~StripSilenceDialog ();
double threshold () const {
return _threshold.get_value ();
@@ -39,7 +45,26 @@ public:
}
private:
+ void create_waves ();
+ void peaks_ready ();
+ void canvas_allocation (Gtk::Allocation &);
+ void update_silence_rects ();
+
Gtk::SpinButton _threshold;
Gtk::SpinButton _minimum_length;
Gtk::SpinButton _fade_length;
+
+ struct Wave {
+ boost::shared_ptr<ARDOUR::AudioRegion> region;
+ ArdourCanvas::WaveView* view;
+ std::list<ArdourCanvas::SimpleRect*> silence_rects;
+ double samples_per_unit;
+ };
+
+ ArdourCanvas::Canvas* _canvas;
+ std::list<Wave> _waves;
+ int _wave_width;
+ int _wave_height;
+
+ sigc::connection _peaks_ready_connection;
};