summaryrefslogtreecommitdiff
path: root/libs/ardour/session_rtevents.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-12-07 15:48:38 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-12-07 15:48:38 +0000
commit8ca9061b308238ba80d82b6960e79fa1ea5cda92 (patch)
tree299b123786e43f41bbfa6659b7efbd050dafab06 /libs/ardour/session_rtevents.cc
parenteacba74649e961508fb85eddb1e8dd51d8c61be5 (diff)
fix issues with rec-enabling being done in RT context by splitting it into two parts, an RT-safe and RT-unsafe part. along the way, remove "do not record plugins" option which is just so 1999 and creates problems for various (all?) plugin APIs
git-svn-id: svn://localhost/ardour2/branches/3.0@13613 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_rtevents.cc')
-rw-r--r--libs/ardour/session_rtevents.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc
index b5328a1548..4af06fa9a8 100644
--- a/libs/ardour/session_rtevents.cc
+++ b/libs/ardour/session_rtevents.cc
@@ -183,6 +183,25 @@ Session::set_record_enabled (boost::shared_ptr<RouteList> rl, bool yn, SessionEv
return;
}
+ /* do the non-RT part of rec-enabling first - the RT part will be done
+ * on the next process cycle. This does mean that theoretically we are
+ * doing things provisionally on the assumption that the rec-enable
+ * change will work, but this had better be a solid assumption for
+ * other reasons.
+ */
+
+ for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
+ if ((*i)->is_hidden()) {
+ continue;
+ }
+
+ boost::shared_ptr<Track> t;
+
+ if ((t = boost::dynamic_pointer_cast<Track>(*i)) != 0) {
+ t->prep_record_enabled (yn, (group_override ? (void*) t->route_group() : (void *) this));
+ }
+ }
+
queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_record_enabled));
}