From 57e1c287509d9a6f1d8b3b64000625b68a8b997a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 30 Apr 2009 17:07:57 +0000 Subject: Preview effect of strip silence within the dialog. git-svn-id: svn://localhost/ardour2/branches/3.0@5017 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/strip_silence_dialog.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/strip_silence_dialog.h') 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 #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 > 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 region; + ArdourCanvas::WaveView* view; + std::list silence_rects; + double samples_per_unit; + }; + + ArdourCanvas::Canvas* _canvas; + std::list _waves; + int _wave_width; + int _wave_height; + + sigc::connection _peaks_ready_connection; }; -- cgit v1.2.3