summaryrefslogtreecommitdiff
path: root/libs/ardour/record_enable_control.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-07-04 09:25:31 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-07-04 09:27:33 -0400
commit2e3c25eca709b734297edc3f4487264cbf6c1a58 (patch)
treeebdcf68070779ca7f3d99b690cd9e3e48ac5a2e3 /libs/ardour/record_enable_control.cc
parentd2f20120b762b1ad6bd19efaa66579e80ab387ca (diff)
make sure that rec-enable changes get to do their non-RT stuff before being queued for RT-context execution
Diffstat (limited to 'libs/ardour/record_enable_control.cc')
-rw-r--r--libs/ardour/record_enable_control.cc32
1 files changed, 17 insertions, 15 deletions
diff --git a/libs/ardour/record_enable_control.cc b/libs/ardour/record_enable_control.cc
index f71fd5034b..67375e7431 100644
--- a/libs/ardour/record_enable_control.cc
+++ b/libs/ardour/record_enable_control.cc
@@ -39,21 +39,6 @@ RecordEnableControl::RecordEnableControl (Session& session, std::string const &
void
RecordEnableControl::set_value (double val, Controllable::GroupControlDisposition gcd)
{
- /* 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.
- */
-
- if (!AudioEngine::instance()->in_process_thread()) {
- if (_recordable.prep_record_enabled (val)) {
- /* failed */
- std::cerr << "Prep rec-enable failed\n";
- return;
- }
- }
-
/* Because we are marked as a RealTime control, this will queue
up the control change to be executed in a realtime context.
*/
@@ -71,3 +56,20 @@ RecordEnableControl::actually_set_value (double val, Controllable::GroupControlD
SlavableAutomationControl::actually_set_value (val, gcd);
}
+void
+RecordEnableControl::do_pre_realtime_queue_stuff (double newval)
+{
+ /* 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.
+ *
+ * this is guaranteed to be called from a non-process thread.
+ */
+
+ if (_recordable.prep_record_enabled (newval)) {
+ /* failed */
+ std::cerr << "Prep rec-enable failed\n";
+ }
+}