Set new region length correctly after stretch (part of
authorCarl Hetherington <carl@carlh.net>
Mon, 8 Aug 2011 15:36:16 +0000 (15:36 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 8 Aug 2011 15:36:16 +0000 (15:36 +0000)
#3908).

git-svn-id: svn://localhost/ardour2/branches/3.0@9963 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/rb_effect.cc

index bc040709f4fbd3a76f9fe6283c22797650dc144f..e90149926c86bbdd0f69aad65ea93b9670af00c0 100644 (file)
@@ -355,7 +355,10 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress*)
                                          stretch,
                                          shift);
                (*x)->set_master_sources (region->master_sources());
-               (*x)->set_length( (*x)->length() * stretch);
+               /* multiply the old (possibly previously stretched) region length by the extra
+                  stretch this time around to get its new length
+               */
+               (*x)->set_length ((*x)->length() * tsr.time_fraction);
        }
 
        /* stretch region gain envelope */