From cc43ec3ef6ad782eab6dd71c285e2c4da70e990b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 13 Mar 2020 13:40:06 -0600 Subject: adjust TransportFSM to avoid declick to locate if DiskReader::_no_disk_output is set Under those conditions, the DR will not execute a code path that will cause the declick to take place and therefore the declick will never finish --- libs/ardour/transport_fsm.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'libs') diff --git a/libs/ardour/transport_fsm.cc b/libs/ardour/transport_fsm.cc index 403bef07bd..39d726175c 100644 --- a/libs/ardour/transport_fsm.cc +++ b/libs/ardour/transport_fsm.cc @@ -27,6 +27,7 @@ #include "pbd/stacktrace.h" #include "ardour/debug.h" +#include "ardour/disk_reader.h" #include "ardour/session.h" #include "ardour/transport_fsm.h" @@ -307,6 +308,23 @@ TransportFSM::process_event (Event& ev, bool already_deferred, bool& deferred) */ transition (WaitingForLocate); locate_for_loop (ev); + } else if (DiskReader::no_disk_output()) { + + /* separate clause to allow a comment that is + case specific. Logically this condition + could be bundled into first if() above. + */ + + /* this can occur when locating to catch up + with a transport master. no_disk_output was + set to prevent playback until we're synced + and locked with the master. If we locate + during this process, we're not producing any + audio from disk, and so there is no need to + declick. + */ + transition (WaitingForLocate); + locate_for_loop (ev); } else { transition (DeclickToLocate); start_declick_for_locate (ev); -- cgit v1.2.3