summaryrefslogtreecommitdiff
path: root/libs/ardour/auditioner.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-11-03 04:26:33 +0100
committerRobin Gareus <robin@gareus.org>2017-11-03 04:26:33 +0100
commitedff34a59b2bbe0b61d3be309450aef58299049c (patch)
treeba575b7dc656bf6e0ce1096b840ffa8363f4061d /libs/ardour/auditioner.cc
parentc63f7f775d221359815b9b687a912e16c5645583 (diff)
Auditioner, silence buffer at end.
Diffstat (limited to 'libs/ardour/auditioner.cc')
-rw-r--r--libs/ardour/auditioner.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc
index 080a11703b..1dd9022ca9 100644
--- a/libs/ardour/auditioner.cc
+++ b/libs/ardour/auditioner.cc
@@ -425,13 +425,20 @@ Auditioner::play_audition (samplecnt_t nframes)
/* process audio */
this_nframes = min (nframes, length - current_sample + _import_position);
- if ((ret = roll (this_nframes, current_sample, current_sample + nframes, false, need_butler)) != 0) {
+ if (this_nframes > 0 && 0 != (ret = roll (this_nframes, current_sample, current_sample + this_nframes, false, need_butler))) {
silence (nframes);
return ret;
}
current_sample += this_nframes;
+ if (this_nframes < nframes) {
+ if (this_nframes > 0) {
+ _session.engine().split_cycle (this_nframes);
+ }
+ silence (nframes - this_nframes);
+ }
+
} else {
silence (nframes);
}