diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-27 02:36:16 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-27 02:36:16 +0100 |
commit | bc2cbfc7ec044692e959d5d1e55f5ea4fc76fe85 (patch) | |
tree | 9f4ec69c6f2213b6031d55c8ff998c24bb866927 /libs/ardour/session_state.cc | |
parent | b10d9cf09bf6150f0ba0eae5dc34fd8db8b2fa91 (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/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 0e0f5eb109..a7de032375 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -4006,8 +4006,15 @@ Session::config_changed (std::string p, bool ours) } else if (p == "punch-in") { - Location* location; + if (!punch_is_possible ()) { + if (config.get_punch_in ()) { + /* force off */ + config.set_punch_in (false); + return; + } + } + Location* location; if ((location = _locations->auto_punch_location()) != 0) { if (config.get_punch_in ()) { @@ -4019,8 +4026,15 @@ Session::config_changed (std::string p, bool ours) } else if (p == "punch-out") { - Location* location; + if (!punch_is_possible ()) { + if (config.get_punch_out ()) { + /* force off */ + config.set_punch_out (false); + return; + } + } + Location* location; if ((location = _locations->auto_punch_location()) != 0) { if (config.get_punch_out()) { |