summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-02 19:08:30 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-02 19:08:30 +0000
commitceb1025c2c8ab1246a51c3967ee5a79773a4e008 (patch)
tree385091c0b89ef1b3ed54c7b8ccc13c83a59a7bec
parent0cb4160ce771b87b2826452132bb1a6de447515f (diff)
Small cleanup: add constructor to InterThreadInfo.
git-svn-id: svn://localhost/ardour2/branches/3.0@7044 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/editor_export_audio.cc4
-rw-r--r--gtk2_ardour/editor_ops.cc8
-rw-r--r--gtk2_ardour/strip_silence_dialog.cc2
-rw-r--r--libs/ardour/ardour/types.h2
-rw-r--r--libs/ardour/strip_silence.cc9
5 files changed, 2 insertions, 23 deletions
diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc
index 1af4fc4764..51c2ef072a 100644
--- a/gtk2_ardour/editor_export_audio.cc
+++ b/gtk2_ardour/editor_export_audio.cc
@@ -146,10 +146,6 @@ Editor::bounce_region_selection ()
InterThreadInfo itt;
- itt.done = false;
- itt.cancel = false;
- itt.progress = 0.0f;
-
boost::shared_ptr<Region> r = track->bounce_range (region->position(), region->position() + region->length(), itt);
cerr << "Result of bounce of "
<< region->name() << " len = " << region->length()
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 464c540bfb..8aa9489497 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -3613,10 +3613,6 @@ Editor::freeze_route ()
InterthreadProgressWindow ipw (current_interthread_info, _("Freeze"), _("Cancel Freeze"));
- itt.done = false;
- itt.cancel = false;
- itt.progress = 0.0f;
-
pthread_create_and_store (X_("freezer"), &itt.thread, _freeze_thread, this);
track_canvas->get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH));
@@ -3660,10 +3656,6 @@ Editor::bounce_range_selection (bool replace, bool enable_processing)
InterThreadInfo itt;
- itt.done = false;
- itt.cancel = false;
- itt.progress = false;
-
playlist->clear_history ();
boost::shared_ptr<Region> r = rtv->track()->bounce_range (start, start+cnt, itt, enable_processing);
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc
index 6aa0236a88..d69e1ac21b 100644
--- a/gtk2_ardour/strip_silence_dialog.cc
+++ b/gtk2_ardour/strip_silence_dialog.cc
@@ -267,8 +267,6 @@ StripSilenceDialog::update_threshold_line ()
double const y = alt_log_meter (_threshold.get_value());
- cout << "thresh " << _threshold.get_value() << " alt log " << alt_log_meter (_threshold.get_value()) << "\n";
-
(*i)->threshold_line->property_y1() = (n + 1 - y) * _wave_height;
(*i)->threshold_line->property_y2() = (n + 1 - y) * _wave_height;
}
diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h
index 2bd08cbcdf..39b763a41d 100644
--- a/libs/ardour/ardour/types.h
+++ b/libs/ardour/ardour/types.h
@@ -320,6 +320,8 @@ namespace ARDOUR {
};
struct InterThreadInfo {
+ InterThreadInfo () : done (false), cancel (false), progress (0), thread (0) {}
+
volatile bool done;
volatile bool cancel;
volatile float progress;
diff --git a/libs/ardour/strip_silence.cc b/libs/ardour/strip_silence.cc
index 3952311aa2..21faeded68 100644
--- a/libs/ardour/strip_silence.cc
+++ b/libs/ardour/strip_silence.cc
@@ -56,15 +56,6 @@ StripSilence::run (boost::shared_ptr<Region> r)
return -1;
}
- /* we don't care about this but we need to fill out the fields
- anyway. XXX should really be a default constructor for ITT
- */
-
- itt.done = false;
- itt.cancel = false;
- itt.progress = 0.0;
- itt.thread = 0;
-
/* find periods of silence in the region */
std::list<std::pair<frameoffset_t, framecnt_t> > const silence =
region->find_silence (dB_to_coefficient (_threshold), _minimum_length, itt);