From 38dde7f81841fc065a580139b256000e73701bdf Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 16 May 2016 16:43:00 -0400 Subject: add Session::get_stripables() --- libs/ardour/ardour/session.h | 8 ++++++++ libs/ardour/session.cc | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 0dcad54b6c..eee58432f7 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -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 get_tracks() const; boost::shared_ptr get_routes_with_internal_returns() const; boost::shared_ptr get_routes_with_regions_at (framepos_t const) const; diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 5d452728ee..ad3b23b2af 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4013,6 +4013,16 @@ Session::update_route_solo_state (boost::shared_ptr r) something_soloed, listeners, isolated)); } +void +Session::get_stripables (StripableList& sl) const +{ + boost::shared_ptr 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 Session::get_routes_with_internal_returns() const { -- cgit v1.2.3