From 7921f6dc4d59f31d111afaf2150d1be128818b22 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 2 Oct 2017 12:41:42 -0400 Subject: [PATCH] DiskReader should do nothing at all if there are no channels --- libs/ardour/disk_reader.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 4c2ff1e2c1..4c5667b9db 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -251,12 +251,14 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp } } - if (speed == 0.0) { - /* Nothing to do here. - * - * Do not clear input buffers here when (ms == MonitoringDisk) - * we need to allow out-of-band data to pass thru from the input. - * (e.g. MIDI immediate events) + if (c->empty()) { + /* do nothing */ + return; + } + + if ((speed == 0.0) && (ms == MonitoringDisk)) { + /* no channels, or stopped. Don't accidentally pass any data + * from disk into our outputs (e.g. via interpolation) */ return; }