summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-07 21:37:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-07 21:37:35 +0000
commit9686f8097d45c306168d1a5220d9c8bf225edb8c (patch)
tree274d7f7d8a549f96a5459d9be257581980906be3 /libs/ardour/session.cc
parentdc86434283718b7c4a4ed6af52a950e6cfc5e86f (diff)
first pass at end-to-end RT operation request (GUI->session->RT thread->GUI), just for rec-enable
git-svn-id: svn://localhost/ardour2/branches/3.0@6324 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc20
1 files changed, 12 insertions, 8 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index f113bf4ebc..5c8c2254f9 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -3605,27 +3605,27 @@ Session::graph_reordered ()
}
void
-Session::record_disenable_all ()
+Session::record_disenable_all (sigc::slot<void,SessionEvent*> callback)
{
if (!writable()) {
return;
}
- record_enable_change_all (false);
+ record_enable_change_all (false, callback);
}
void
-Session::record_enable_all ()
+Session::record_enable_all (sigc::slot<void,SessionEvent*> callback)
{
if (!writable()) {
return;
}
- record_enable_change_all (true);
+ record_enable_change_all (true, callback);
}
void
-Session::record_enable_change_all (bool yn)
+Session::record_enable_change_all (bool yn, sigc::slot<void,SessionEvent*> callback)
{
shared_ptr<RouteList> r = routes.reader ();
RouteList* tracks = new RouteList;
@@ -3637,11 +3637,15 @@ Session::record_enable_change_all (bool yn)
tracks->push_back (*i);
}
}
+
+ sigc::slot<void> rt_op = bind (sigc::mem_fun (*this, &Session::do_record_enable_change_all), tracks, yn);
+
+ SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0);
- SessionEvent* ev = new SessionEvent (SessionEvent::SetRecordEnable, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0, yn);
+ ev->routes = tracks; // set here so that callback can delete it
+ ev->rt_slot = rt_op;
+ ev->rt_return = callback;
- ev->routes = tracks;
- ev->Complete.connect (mem_fun (*this, &Session::cleanup_event));
queue_event (ev);
}