summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 2bdcdc5a02..b6ded6d617 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -292,6 +292,11 @@ SndFileSource::read_unlocked (Sample *dst, jack_nframes_t start, jack_nframes_t
uint32_t real_cnt;
jack_nframes_t file_cnt;
+ //destructive (tape) tracks need to offset reads and writes by the timeline position
+ if (_flags && ARDOUR::Destructive == ARDOUR::Destructive) {
+ start -= timeline_position;
+ }
+
if (start > _length) {
/* read starts beyond end of data, just memset to zero */