summaryrefslogtreecommitdiff
path: root/libs/ardour/region_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/region_factory.cc')
-rw-r--r--libs/ardour/region_factory.cc12
1 files changed, 12 insertions, 0 deletions
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<Region>
+RegionFactory::get_whole_region_for_source (boost::shared_ptr<Source> 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<Source> s, std::set<boost::shared_ptr<Region> >& r)
{