path: root/libs/ardour/ardour/session.h
diff options
authorPaul Davis <>2020-05-07 12:38:09 -0600
committerPaul Davis <>2020-05-07 17:40:20 -0600
commit490fac163211d71ca640da1d072de888f380e643 (patch)
tree95a1f6958fe63c1a493ca30c58ec431b33ae1c24 /libs/ardour/ardour/session.h
parent95d9f600355b494a982ba3e4f6fe87e70c01f12e (diff)
add new template methods for "foreach {route,track}" and use them
Also remove redundant double call to Track::set_block_size(). This dates back to 2010 when there used be an additional traversal of the Diskstream RCU-managed list, before they became owned by Tracks
Diffstat (limited to 'libs/ardour/ardour/session.h')
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 52a752d601..86822f3adc 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -350,6 +350,12 @@ public:
template<class T> void foreach_route (T *obj, void (T::*func)(boost::shared_ptr<Route>), bool sort = true);
template<class T, class A> void foreach_route (T *obj, void (T::*func)(Route&, A), A arg, bool sort = true);
+ template<class A> void foreach_track (void (Track::*method)(A), A arg);
+ template<class A1, class A2> void foreach_track (void (Track::*method)(A1, A2), A1 arg1, A2 arg2);
+ template<class A> void foreach_route (void (Route::*method)(A), A arg);
+ template<class A1, class A2> void foreach_route (void (Route::*method)(A1, A2), A1 arg1, A2 arg2);
static char session_name_is_legal (const std::string&);
bool io_name_is_legal (const std::string&) const;
boost::shared_ptr<Route> route_by_name (std::string) const;