Fix MIDI Capture alignment
When recording audio, simply not writing to the ringbuffer offsets the recording accordingly. When recording MIDI, absolute timestamps are used, so the recording has to be offset by the accumulated difference. Previously this went unnoticed because tests using the Dummy backend the accumulated offset never exceeded 1 cycle.
This commit is contained in:
@@ -484,6 +484,8 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user