summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-03 14:25:54 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-03 14:25:54 +0000
commit975e44f92480f8ce170637d6b58b48a06e34ca7c (patch)
tree11b00236fe62ab2b93e03382264f2b8c14ea9e11 /libs/ardour/sndfilesource.cc
parentd2d243ad08cb9588411ea85c8d08f1d19f427dc3 (diff)
new tape tracks ended up with non-destructive sources, fixed
git-svn-id: svn://localhost/ardour2/trunk@1067 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc
index 378b62ea04..2ebd27e637 100644
--- a/libs/ardour/sndfilesource.cc
+++ b/libs/ardour/sndfilesource.cc
@@ -805,7 +805,7 @@ SndFileSource::crossfade (Sample* data, nframes_t cnt, int fade_in)
}
}
- } else if (xfade) {
+ } else if (xfade < xfade_frames) {
gain_t in[xfade];
gain_t out[xfade];
@@ -817,6 +817,11 @@ SndFileSource::crossfade (Sample* data, nframes_t cnt, int fade_in)
for (nframes_t n = 0; n < xfade; ++n) {
xfade_buf[n] = (xfade_buf[n] * out[n]) + (fade_data[n] * in[n]);
}
+
+ } else if (xfade) {
+
+ /* long xfade length, has to be computed across several calls */
+
}
if (xfade) {
@@ -865,8 +870,6 @@ SndFileSource::setup_standard_crossfades (nframes_t rate)
xfade_frames = (nframes_t) floor ((Config->get_destructive_xfade_msecs () / 1000.0) * rate);
- cerr << "based on " << Config->get_destructive_xfade_msecs() << " msecs, xfade_frames = " << xfade_frames << endl;
-
if (out_coefficient) {
delete [] out_coefficient;
}