summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-10-10 16:57:20 +0200
committerRobin Gareus <robin@gareus.org>2016-10-10 17:34:18 +0200
commit4f8fdf0af7272cfcf62f40229db35b86fe9a32e0 (patch)
treeb2054c231f27f48c642f4cc510f9f74f23cb4431 /libs/ardour/route.cc
parent8d710a5f8a30ebf32d68b487a2bf20e2c8e534ce (diff)
Allow to get a route reference from SessionObject*
The motivation is to allow a Processor (here Lua) to get a pointer to the owning Route without resorting to iterative lookup.
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 3d34b92d2c..c15877b28b 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -117,6 +117,11 @@ Route::Route (Session& sess, string name, PresentationInfo::Flag flag, DataType
processor_max_streams.reset();
}
+boost::weak_ptr<Route>
+Route::weakroute () {
+ return boost::weak_ptr<Route> (shared_from_this ());
+}
+
int
Route::init ()
{