diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index e28ff8e966..a3e3529854 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -916,6 +916,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop /* Controllables */ + boost::shared_ptr processor_by_id (PBD::ID) const; + boost::shared_ptr controllable_by_id (const PBD::ID&); boost::shared_ptr controllable_by_descriptor (const PBD::ControllableDescriptor&); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 75547b5348..725d94c3cc 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4016,6 +4016,21 @@ Session::route_by_id (PBD::ID id) return boost::shared_ptr ((Route*) 0); } +boost::shared_ptr +Session::processor_by_id (PBD::ID id) const +{ + boost::shared_ptr r = routes.reader (); + + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + boost::shared_ptr p = (*i)->Route::processor_by_id (id); + if (p) { + return p; + } + } + + return boost::shared_ptr (); +} + boost::shared_ptr Session::track_by_diskstream_id (PBD::ID id) {