add Session::get_stripables()
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 16 May 2016 20:43:00 +0000 (16:43 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:42 +0000 (15:30 -0400)
libs/ardour/ardour/session.h
libs/ardour/session.cc

index 0dcad54b6c166d09f6b6ba01e04093c880e6050b..eee58432f77cdd9e418848794e3700b840104bbe 100644 (file)
@@ -277,6 +277,14 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
                return routes.reader ();
        }
 
+       /* because the set of Stripables consists of objects managed
+        * independently, in multiple containers within the Session (or objects
+        * owned by the session), we fill out a list in-place rather than
+        * return a pointer to a copy of the (RCU) managed list, as happens
+        * with get_routes()
+        */
+
+       void get_stripables (StripableList&) const;
        boost::shared_ptr<RouteList> get_tracks() const;
        boost::shared_ptr<RouteList> get_routes_with_internal_returns() const;
        boost::shared_ptr<RouteList> get_routes_with_regions_at (framepos_t const) const;
index 5d452728eed14373cee7b3a84541409ba9624a2b..ad3b23b2afd5ff331a338a1ac93af1d98518b067 100644 (file)
@@ -4013,6 +4013,16 @@ Session::update_route_solo_state (boost::shared_ptr<RouteList> r)
                                                  something_soloed, listeners, isolated));
 }
 
+void
+Session::get_stripables (StripableList& sl) const
+{
+       boost::shared_ptr<RouteList> r = routes.reader ();
+       sl.insert (sl.end(), r->begin(), r->end());
+
+       VCAList v = _vca_manager->vcas ();
+       sl.insert (sl.end(), v.begin(), v.end());
+}
+
 boost::shared_ptr<RouteList>
 Session::get_routes_with_internal_returns() const
 {