From 361727716f873d1642adb9c5dfc7b882bd599b1f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 20 Sep 2019 13:02:46 -0600 Subject: [PATCH] do not abort in the event that we cannot internal-seek to align with the playhead. There are no good options here, but treating it like a regular underrun seems as good as anything --- libs/ardour/disk_reader.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 0128fb7e62..083704d3d7 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -343,22 +343,17 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp AudioBuffer& disk_buf ((ms & MonitoringInput) ? scratch_bufs.get_audio(n) : output); if (start_sample != playback_sample && target_gain != 0) { -#ifndef NDEBUG - cerr << owner()->name() << " playback @ " << start_sample << " not aligned with " << playback_sample << " jump " << (start_sample - playback_sample) << endl; -#endif if (can_internal_playback_seek (start_sample - playback_sample)) { internal_playback_seek (start_sample - playback_sample); } else { - cerr << owner()->name() << " playback at " << speed << " not possible: ss = " << start_sample << " ps = " << playback_sample << endl; - // XXX -- now what? - abort (); /*NOTREACHED*/ + disk_samples_to_consume = 0; /* will force an underrun below */ } } if (!declick_out) { const samplecnt_t total = chaninfo->rbuf->read (disk_buf.data(), disk_samples_to_consume); if (disk_samples_to_consume > total) { - cerr << _name << " Need " << disk_samples_to_consume << " total = " << total << endl; + cerr << _name << " Need " << total << " have only " << disk_samples_to_consume << endl; cerr << "underrun for " << _name << endl; DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 underrun in %2, total space = %3\n", DEBUG_THREAD_SELF, name(), total));