summaryrefslogtreecommitdiff
path: root/gtk2_ardour/strip_silence_dialog.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-12-08 21:02:37 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-12-08 21:02:37 +0000
commitf17661208686f7237efc902c61028462af75a240 (patch)
tree0443d126054643c476b63a8be4722c13320d3ce4 /gtk2_ardour/strip_silence_dialog.h
parent32ac2049fe5a873853ac3c3b6dcb682150222dd3 (diff)
move display of silence for strip-silence into regionviews, along with text to describe impact on the region. this doesn't actually make strip-silence work any better, but the display is improving
git-svn-id: svn://localhost/ardour2/branches/3.0@8224 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/strip_silence_dialog.h')
-rw-r--r--gtk2_ardour/strip_silence_dialog.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h
index 625e9b65fd..62e58e7db5 100644
--- a/gtk2_ardour/strip_silence_dialog.h
+++ b/gtk2_ardour/strip_silence_dialog.h
@@ -26,15 +26,16 @@
#include "progress_reporter.h"
namespace ARDOUR {
- class AudioRegion;
class Session;
}
+class RegionView;
+
/// Dialog box to set options for the `strip silence' filter
class StripSilenceDialog : public ArdourDialog, public ProgressReporter
{
public:
- StripSilenceDialog (ARDOUR::Session*, std::list<boost::shared_ptr<ARDOUR::AudioRegion> > const &);
+ StripSilenceDialog (ARDOUR::Session*, std::list<RegionView*> const &);
~StripSilenceDialog ();
double threshold () const {
@@ -45,8 +46,6 @@ public:
ARDOUR::framecnt_t fade_length () const;
private:
- typedef std::list<std::pair<ARDOUR::frameoffset_t,ARDOUR::framecnt_t> > SilenceResult;
-
void create_waves ();
void peaks_ready ();
void canvas_allocation (Gtk::Allocation &);
@@ -54,7 +53,7 @@ private:
void resize_silence_rects ();
void update ();
void update_threshold_line ();
- void update_stats (SilenceResult const &);
+ void update_stats (ARDOUR::AudioIntervalResult const &);
void threshold_changed ();
void update_progress_gui (float);
void restart_thread ();
@@ -67,22 +66,14 @@ private:
Gtk::Label _shortest_audible_label;
Gtk::ProgressBar _progress_bar;
- struct Wave {
- boost::shared_ptr<ARDOUR::AudioRegion> region;
- ArdourCanvas::WaveView* view;
- std::list<ArdourCanvas::SimpleRect*> silence_rects;
- ArdourCanvas::SimpleLine* threshold_line;
- double samples_per_unit;
- SilenceResult silence;
-
- Wave (ArdourCanvas::Group *, boost::shared_ptr<ARDOUR::AudioRegion>);
- ~Wave ();
- };
-
- ArdourCanvas::Canvas* _canvas;
- std::list<Wave*> _waves;
- int _wave_width;
- int _wave_height;
+ struct ViewInterval {
+ RegionView* view;
+ ARDOUR::AudioIntervalResult intervals;
+
+ ViewInterval (RegionView* rv) : view (rv) {}
+ };
+
+ std::list<ViewInterval> views;
ARDOUR::framecnt_t max_audible;
ARDOUR::framecnt_t min_audible;