diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2018-10-16 17:44:11 -0500 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2019-08-01 12:11:31 -0500 |
commit | 3e6ce20fd71022dad54508b652e851148ae4a4c4 (patch) | |
tree | fc3486a324501c295e563151bea904b88637a3fe /libs/ardour/region_factory.cc | |
parent | 90962d342614e4b817b17bb833e3418df76ab4cb (diff) |
(Source List) Region List rewrite (libardour part)
Diffstat (limited to 'libs/ardour/region_factory.cc')
-rw-r--r-- | libs/ardour/region_factory.cc | 12 |
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) { |