From 8d045e15dcd4193b30b7eb3ff43de83e9b382593 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 6 Oct 2022 23:52:53 +0200 Subject: [PATCH] Do not add whole-file regions to playlists Various operations, notably time-stretch and other filters, directly added the generated whole-file region to the playlist. The editor has not listed the generated Region in the RegionList. --- libs/ardour/playlist.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index a2f0d3da93..6cb77fb4a8 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -680,6 +680,10 @@ Playlist::clear_pending () void Playlist::add_region (boost::shared_ptr region, timepos_t const & position, float times, bool auto_partition) { + if (region->whole_file ()) { + region = RegionFactory::create (region, region->derive_properties ()); + } + RegionWriteLock rlock (this); times = fabs (times); @@ -792,6 +796,10 @@ Playlist::add_region_internal (boost::shared_ptr region, timepos_t const void Playlist::replace_region (boost::shared_ptr old, boost::shared_ptr newr, timepos_t const & pos) { + if (newr->whole_file ()) { + newr = RegionFactory::create (newr, newr->derive_properties ()); + } + RegionWriteLock rlock (this); remove_region_internal (old, rlock.thawlist);