summaryrefslogtreecommitdiff
path: root/libs/ardour/session_click.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-03-08 03:50:57 +0100
committerRobin Gareus <robin@gareus.org>2020-03-08 03:51:04 +0100
commit82c8e6c9d0344360e763f696c2b6bf4aef589074 (patch)
tree275ea80fa4f01e3da08be2418d8ffbb8e905d867 /libs/ardour/session_click.cc
parentf265bbbf82e9cbd6403a1e6a94bc8a8544638775 (diff)
Fix count-in and loop-as-mode metronome clicks
Diffstat (limited to 'libs/ardour/session_click.cc')
-rw-r--r--libs/ardour/session_click.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc
index c31636f7fa..3a0d50ff65 100644
--- a/libs/ardour/session_click.cc
+++ b/libs/ardour/session_click.cc
@@ -174,6 +174,9 @@ Session::run_click (samplepos_t start, samplepos_t nframes)
/* given a large output latency, `start' can be offset by by > 1 cycle.
* and needs to be mapped back into the loop-range */
Location* loop_location = get_play_loop () ? locations()->auto_loop_location () : NULL;
+ if (_count_in_samples > 0) {
+ loop_location = NULL;
+ }
bool crossloop = false;
samplecnt_t span = nframes;
if (loop_location) {
@@ -216,6 +219,9 @@ Session::run_click (samplepos_t start, samplepos_t nframes)
* clicks at loop-start into account */
const samplepos_t loop_start = loop_location->start ();
internal_offset = clk->start - loop_start + span;
+ } else if (_count_in_samples > 0) {
+ ++i;
+ continue;
} else {
/* this can happen when locating
* with an active click */