Fix pitch-shift producing partially silent regions
It can happen that with a scaling factor of 1.0, rubberband produces slightly fewer samples than the original. Region::set_length (region->length * 1.0) is idempotent and does not shorten it as appropriate to the longest source via Region::verify_length(), which leads to various issues.
This commit is contained in:
parent
396013bf5a
commit
392210270c
|
@ -360,7 +360,7 @@ RBEffect::run (boost::shared_ptr<Region> r, Progress* progress)
|
|||
/* multiply the old (possibly previously stretched) region length by the extra
|
||||
* stretch this time around to get its new length. this is a non-music based edit atm.
|
||||
*/
|
||||
(*x)->set_length ((*x)->length ().scale (tsr.time_fraction));
|
||||
(*x)->set_length_unchecked ((*x)->length ().scale (tsr.time_fraction));
|
||||
(*x)->set_whole_file (true);
|
||||
}
|
||||
|
||||
|
|
|
@ -304,7 +304,7 @@ STStretch::run (boost::shared_ptr<Region> r, Progress* progress)
|
|||
/* multiply the old (possibly previously stretched) region length by the extra
|
||||
* stretch this time around to get its new length. this is a non-music based edit atm.
|
||||
*/
|
||||
(*x)->set_length ((*x)->length ().scale (tsr.time_fraction));
|
||||
(*x)->set_length_unchecked ((*x)->length ().scale (tsr.time_fraction));
|
||||
(*x)->set_whole_file (true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user