From 3e6ce20fd71022dad54508b652e851148ae4a4c4 Mon Sep 17 00:00:00 2001 From: Ben Loftis Date: Tue, 16 Oct 2018 17:44:11 -0500 Subject: (Source List) Region List rewrite (libardour part) --- libs/ardour/region_factory.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libs/ardour/region_factory.cc') diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index 9ecc6e10da..e7d0528b96 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -629,6 +629,18 @@ RegionFactory::new_region_name (string old) return old; } +boost::shared_ptr +RegionFactory::get_whole_region_for_source (boost::shared_ptr s) +{ + Glib::Threads::Mutex::Lock lm (region_map_lock); + + for (RegionMap::const_iterator i = region_map.begin(); i != region_map.end(); ++i) { + if (i->second->uses_source (s) && i->second->whole_file()) { + return (i->second); + } + } +} + void RegionFactory::get_regions_using_source (boost::shared_ptr s, std::set >& r) { -- cgit v1.2.3