Towards fixing MIDI capture alignment
authorRobin Gareus <robin@gareus.org>
Thu, 9 Jan 2020 02:37:21 +0000 (03:37 +0100)
committerRobin Gareus <robin@gareus.org>
Thu, 9 Jan 2020 02:37:21 +0000 (03:37 +0100)
When there is no overlap (Evoral::OverlapNone) of local transport
position and the record-range, MIDI data does not need to be
offset.

This matches audio recording: Only write to the capture ringbuffer
when there is an overlap.

(There is still some unknown, unresolved discrepancy remaining
to be tracked down)

libs/ardour/disk_writer.cc

index 3e09a243f614b85800255fc8ef559ff999dcab43..f6ccf560ec387c6c580f8f60268204fdbb4ea495 100644 (file)
@@ -463,8 +463,6 @@ DiskWriter::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
                 */
                if (rec_nframes) {
                        _accumulated_capture_offset += rec_offset;
-               } else {
-                       _accumulated_capture_offset += nframes;
                }
 
        }