summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-02-27 02:36:16 +0100
committerRobin Gareus <robin@gareus.org>2020-02-27 02:36:16 +0100
commitbc2cbfc7ec044692e959d5d1e55f5ea4fc76fe85 (patch)
tree9f4ec69c6f2213b6031d55c8ff998c24bb866927 /libs/ardour/ardour
parentb10d9cf09bf6150f0ba0eae5dc34fd8db8b2fa91 (diff)
Prevent concurrent loop and punch recording (backend)
This also prevents switching between punch-in/out record and looping without transport-stop.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/session.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 6ab67fbd25..221a5ab6cc 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -1694,6 +1694,22 @@ private:
void flush_all_inserts ();
int micro_locate (samplecnt_t distance);
+ enum PunchLoopLock {
+ NoConstraint,
+ OnlyPunch,
+ OnlyLoop,
+ };
+
+ volatile guint _punch_or_loop; // enum PunchLoopLock
+
+ bool punch_is_possible () const;
+ bool loop_is_possible () const;
+
+ bool punch_active () const;
+ void unset_punch ();
+ bool maybe_allow_only_loop (bool play_loop = false);
+ bool maybe_allow_only_punch ();
+
void force_locate (samplepos_t sample, LocateTransportDisposition);
void realtime_stop (bool abort, bool clear_state);
void realtime_locate (bool);