diff options
author | Robin Gareus <robin@gareus.org> | 2020-01-18 15:52:28 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-01-18 15:52:28 +0100 |
commit | 3fe87b9fa1417cfcf6636ff9bf4c8c2abcb6f796 (patch) | |
tree | 4d08b4a509f4259835549e524fee4f40df7547dc /libs | |
parent | 7c8072b0b7500bd8b1dc75dd42142bb76a51ea89 (diff) |
Fix MIDI capture alignment
This fixes Audio/MIDI alignment when recording normally.
Loop and/or Punch-in recording is still not aligned properly
(both audio and MIDI).
_accumulated_capture_offset is initialized once, accumulated
offsets (rec_nframes) are kept, even when ::check_record_status()
is called multiple times.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/disk_writer.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/disk_writer.cc b/libs/ardour/disk_writer.cc index a7ab0fd0c8..cb62f932b6 100644 --- a/libs/ardour/disk_writer.cc +++ b/libs/ardour/disk_writer.cc @@ -150,6 +150,9 @@ DiskWriter::check_record_status (samplepos_t transport_sample, double speed, boo if (_alignment_style == ExistingMaterial) { _first_recordable_sample += _capture_offset + _playback_offset; + if (_accumulated_capture_offset == 0) { + _accumulated_capture_offset = _playback_offset; + } } if (_session.config.get_punch_out () && 0 != (loc = _session.locations()->auto_punch_location ())) { |