diff options
author | Robin Gareus <robin@gareus.org> | 2017-09-30 02:45:13 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-09-30 02:45:13 +0200 |
commit | 72fb8a5342f19ccf88ff9e59de36c57e3f172a22 (patch) | |
tree | a5579668148700594e6cdc65bed1b09025d89f1c /libs/ardour/session.cc | |
parent | 915b308a88efc98ab1b2a58bed969bb7c41bea64 (diff) |
Align punch in/out recording with latency-compensation
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index ddf77831a1..aad0fefdd9 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1655,7 +1655,7 @@ Session::auto_punch_start_changed (Location* location) { replace_event (SessionEvent::PunchIn, location->start()); - if (get_record_enabled() && config.get_punch_in()) { + if (get_record_enabled() && config.get_punch_in() && !actively_recording ()) { /* capture start has been changed, so save new pending state */ save_state ("", true); } @@ -1664,19 +1664,14 @@ Session::auto_punch_start_changed (Location* location) void Session::auto_punch_end_changed (Location* location) { - samplepos_t when_to_stop = location->end(); - // when_to_stop += _worst_output_latency + _worst_input_latency; - replace_event (SessionEvent::PunchOut, when_to_stop); + replace_event (SessionEvent::PunchOut, location->end()); } void Session::auto_punch_changed (Location* location) { - samplepos_t when_to_stop = location->end(); - - replace_event (SessionEvent::PunchIn, location->start()); - //when_to_stop += _worst_output_latency + _worst_input_latency; - replace_event (SessionEvent::PunchOut, when_to_stop); + auto_punch_start_changed (location); + auto_punch_end_changed (location); } /** @param loc A loop location. @@ -1754,7 +1749,7 @@ Session::set_auto_punch_location (Location* location) if ((existing = _locations->auto_punch_location()) != 0 && existing != location) { punch_connections.drop_connections(); existing->set_auto_punch (false, this); - remove_event (existing->start(), SessionEvent::PunchIn); + clear_events (SessionEvent::PunchIn); clear_events (SessionEvent::PunchOut); auto_punch_location_changed (0); } |