diff options
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 1fd81f9a4b..eba237d0d2 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -549,3 +549,15 @@ RegionFactory::get_regions_using_source (boost::shared_ptr<Source> s, std::set<b } } } + +void +RegionFactory::remove_regions_using_source (boost::shared_ptr<Source> src) +{ + Glib::Mutex::Lock lm (region_map_lock); + + for (RegionMap::iterator i = region_map.begin(); i != region_map.end(); ++i) { + if (i->second->uses_source (src)) { + region_map.erase (i); + } + } +} |