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.
This commit is contained in:
Robin Gareus 2020-01-18 15:52:28 +01:00
parent 7c8072b0b7
commit 3fe87b9fa1
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -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 ())) {