summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_timefx.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-01-24 17:04:15 +0000
committerCarl Hetherington <carl@carlh.net>2012-01-24 17:04:15 +0000
commitddd162bdb050558f93222800ebd57d737f2c9e0d (patch)
tree6b2f9e0f9a5f7f9c4aa9f9d44163e8aabe59980a /gtk2_ardour/editor_timefx.cc
parentf3624c18748f2a07d6be16558ce069e6f1366569 (diff)
Make time stretch respect edit groups (#4615).
git-svn-id: svn://localhost/ardour2/branches/3.0@11334 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_timefx.cc')
-rw-r--r--gtk2_ardour/editor_timefx.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc
index 1c4162eda2..830d8999a4 100644
--- a/gtk2_ardour/editor_timefx.cc
+++ b/gtk2_ardour/editor_timefx.cc
@@ -107,8 +107,6 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
current_timefx = new TimeFXDialog (*this, pitching);
- current_timefx->progress_bar.set_fraction (0.0f);
-
switch (current_timefx->run ()) {
case RESPONSE_ACCEPT:
break;
@@ -234,7 +232,6 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
current_timefx->request.quick_seek = current_timefx->quick_button.get_active();
current_timefx->request.antialias = !current_timefx->antialias_button.get_active();
#endif
- current_timefx->request.progress = 0.0f;
current_timefx->request.done = false;
current_timefx->request.cancel = false;
@@ -256,14 +253,10 @@ Editor::time_fx (RegionSelection& regions, float val, bool pitching)
pthread_detach (current_timefx->request.thread);
- sigc::connection c = Glib::signal_timeout().connect (sigc::mem_fun (current_timefx, &TimeFXDialog::update_progress), 100);
-
while (!current_timefx->request.done && !current_timefx->request.cancel) {
gtk_main_iteration ();
}
- c.disconnect ();
-
current_timefx->hide ();
return current_timefx->status;
}
@@ -276,6 +269,8 @@ Editor::do_timefx (TimeFXDialog& dialog)
boost::shared_ptr<Region> new_region;
bool in_command = false;
+ uint32_t const N = dialog.regions.size ();
+
for (RegionSelection::iterator i = dialog.regions.begin(); i != dialog.regions.end(); ) {
AudioRegionView* arv = dynamic_cast<AudioRegionView*>(*i);
@@ -324,7 +319,9 @@ Editor::do_timefx (TimeFXDialog& dialog)
#endif
}
- if (fx->run (region)) {
+ current_timefx->descend (1.0 / N);
+
+ if (fx->run (region, current_timefx)) {
dialog.status = -1;
dialog.request.done = true;
delete fx;
@@ -344,6 +341,8 @@ Editor::do_timefx (TimeFXDialog& dialog)
_session->add_command (new StatefulDiffCommand (playlist));
}
+ current_timefx->ascend ();
+
i = tmp;
delete fx;
}