Zero capture-offset regardless of data-type
authorRobin Gareus <robin@gareus.org>
Sat, 18 Jan 2020 14:49:22 +0000 (15:49 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 18 Jan 2020 14:49:22 +0000 (15:49 +0100)
_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

index ca5a72c8443045f58de6817572ad7b4c94c7826e..a7ab0fd0c8870ef8b8d8ac151a54d7bddb2ee618 100644 (file)
@@ -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 {