From b8a6f7b05213b3c5546b9930968783720bfe3b78 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 26 Feb 2019 03:07:49 +0100 Subject: [PATCH] TimeFx-Filter: do not create a region when operation is canceled --- libs/ardour/rb_effect.cc | 6 ++++-- libs/ardour/st_stretch.cc | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/ardour/rb_effect.cc b/libs/ardour/rb_effect.cc index 70053a3225..f4f7649146 100644 --- a/libs/ardour/rb_effect.cc +++ b/libs/ardour/rb_effect.cc @@ -340,7 +340,9 @@ RBEffect::run (boost::shared_ptr r, Progress* progress) new_name += suffix; - ret = finish (region, nsrcs, new_name); + if (!tsr.cancel) { + ret = finish (region, nsrcs, new_name); + } /* now reset ancestral data for each new region */ @@ -360,7 +362,7 @@ RBEffect::run (boost::shared_ptr r, Progress* progress) /* stretch region gain envelope */ /* XXX: assuming we've only processed one input region into one result here */ - if (tsr.time_fraction != 1) { + if (ret == 0 && tsr.time_fraction != 1) { result = boost::dynamic_pointer_cast (results.front()); assert (result); result->envelope()->x_scale (tsr.time_fraction); diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc index 70d7ca1fc7..7f48524cde 100644 --- a/libs/ardour/st_stretch.cc +++ b/libs/ardour/st_stretch.cc @@ -171,7 +171,9 @@ STStretch::run (boost::shared_ptr a_region, Progress* progress) new_name += suffix; - ret = finish (region, nsrcs, new_name); + if (!tsr.cancel) { + ret = finish (region, nsrcs, new_name); + } /* now reset ancestral data for each new region */