From 7c8072b0b7500bd8b1dc75dd42142bb76a51ea89 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 18 Jan 2020 15:49:22 +0100 Subject: [PATCH] Zero capture-offset regardless of data-type _accumulated_capture_offset is only used for MIDI, however this is helpful when debugging. Previously audio kept accumulating the offset indefinitely. --- libs/ardour/disk_writer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/disk_writer.cc b/libs/ardour/disk_writer.cc index ca5a72c844..a7ab0fd0c8 100644 --- a/libs/ardour/disk_writer.cc +++ b/libs/ardour/disk_writer.cc @@ -1082,9 +1082,9 @@ DiskWriter::reset_write_sources (bool mark_write_complete, bool /*force*/) int DiskWriter::use_new_write_source (DataType dt, uint32_t n) { - if (dt == DataType::MIDI) { + _accumulated_capture_offset = 0; - _accumulated_capture_offset = 0; + if (dt == DataType::MIDI) { _midi_write_source.reset(); try {