summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-13 13:40:06 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-13 13:52:38 -0600
commitcc43ec3ef6ad782eab6dd71c285e2c4da70e990b (patch)
tree71ecfab01dc90987561daea87ec2d20f8b153a58 /libs/ardour
parentcf15b6ad7a76a90d86571c220531f3d946b8c481 (diff)
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
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/transport_fsm.cc18
1 files changed, 18 insertions, 0 deletions
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);