Small cleanup: add constructor to InterThreadInfo.
authorCarl Hetherington <carl@carlh.net>
Sun, 2 May 2010 19:08:30 +0000 (19:08 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 2 May 2010 19:08:30 +0000 (19:08 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7044 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_export_audio.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/strip_silence_dialog.cc
libs/ardour/ardour/types.h
libs/ardour/strip_silence.cc

index 1af4fc47647c08abd39883c157dfc3c0b3621483..51c2ef072a7d6b6f29e9ce0737760e01329c78ae 100644 (file)
@@ -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()
index 464c540bfba41c2908d3e2ed47810358d5f9439a..8aa9489497d376d4f29f5405810b55bfe405d1f6 100644 (file)
@@ -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);
 
index 6aa0236a8863fb6659931c95d5336e06a7b072f4..d69e1ac21b056f5cf3d3c4478c97c129439ddb84 100644 (file)
@@ -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;
        }
index 2bd08cbcdfb27f2900f46dc25aa72cd12b6ac4a1..39b763a41d53b005c510238d6bc975fdbe2a341c 100644 (file)
@@ -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;
index 3952311aa22449e38fc46596a3124c7704fd6b3e..21faeded6840e16e3b79efc7f2eaaadd8934f00f 100644 (file)
@@ -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);