13
0

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
This commit is contained in:
Paul Davis 2020-03-13 13:40:06 -06:00
parent cf15b6ad7a
commit cc43ec3ef6

View File

@ -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);