Remove cruft
[ardour.git] / gtk2_ardour / editor_timefx.cc
index 932ca71b0e816d4c2a16fed0945f7384bb7848e3..39cda63517ebb6c58eafa088210b67f9472e90d0 100644 (file)
@@ -49,7 +49,7 @@
 using namespace RubberBand;
 #endif
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -105,7 +105,7 @@ Editor::time_stretch (RegionSelection& regions, float fraction)
                stretch.run (*i);
 
                playlist->replace_region (regions.front()->region(), stretch.results[0],
-                                         regions.front()->region()->position());
+                                         regions.front()->region()->position());
                midi_playlists_affected.insert (playlist);
        }
 
@@ -150,9 +150,9 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
                return 0;
        }
 
-       const framecnt_t oldlen = (framecnt_t) (regions.front()->length());
-       const framecnt_t newlen = (framecnt_t) (regions.front()->length() * val);
-       const framecnt_t pos = regions.front()->position ();
+       const samplecnt_t oldlen = (samplecnt_t) (regions.front()->length());
+       const samplecnt_t newlen = (samplecnt_t) (regions.front()->length() * val);
+       const samplecnt_t pos = regions.front()->position ();
 
        delete current_timefx;
        current_timefx = new TimeFXDialog (*this, pitching, oldlen, newlen, pos);
@@ -275,6 +275,8 @@ Editor::time_fx (RegionList& regions, float val, bool pitching)
        current_timefx->first_delete = current_timefx->signal_delete_event().connect
                (sigc::mem_fun (current_timefx, &TimeFXDialog::delete_in_progress));
 
+       current_timefx->start_updates ();
+
        if (pthread_create_and_store ("timefx", &current_timefx->request.thread, timefx_thread, current_timefx)) {
                current_timefx->hide ();
                error << _("timefx cannot be started - thread creation error") << endmsg;
@@ -376,16 +378,16 @@ Editor::timefx_thread (void *arg)
 
        tsd->editor.do_timefx ();
 
-        /* GACK! HACK! sleep for a bit so that our request buffer for the GUI
-           event loop doesn't die before any changes we made are processed
-           by the GUI ...
-        */
+       /* GACK! HACK! sleep for a bit so that our request buffer for the GUI
+          event loop doesn't die before any changes we made are processed
+          by the GUI ...
+       */
 
 #ifdef PLATFORM_WINDOWS
        Glib::usleep(2 * G_USEC_PER_SEC);
 #else
-        struct timespec t = { 2, 0 };
-        nanosleep (&t, 0);
+       struct timespec t = { 2, 0 };
+       nanosleep (&t, 0);
 #endif
        return 0;
 }