summaryrefslogtreecommitdiff
path: root/libs/ardour/reverse.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-12-12 14:43:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-12-12 14:43:24 +0000
commitbc89fe0147c04b67141936d109c00dfd4d69cc4b (patch)
tree544ff450c40fe1f43853a8420228a26f27f1eafb /libs/ardour/reverse.cc
parent30daaebaa2d90d6b0e8673143ccc3cacd7bd1753 (diff)
most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet
git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/reverse.cc')
-rw-r--r--libs/ardour/reverse.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/reverse.cc b/libs/ardour/reverse.cc
index 02ec2924b0..9c15b1e4d9 100644
--- a/libs/ardour/reverse.cc
+++ b/libs/ardour/reverse.cc
@@ -70,6 +70,7 @@ Reverse::run (boost::shared_ptr<Region> r)
}
fpos = max (fstart, (fstart + region->length() - blocksize));
+
buf = new Sample[blocksize];
to_read = blocksize;
@@ -81,7 +82,7 @@ Reverse::run (boost::shared_ptr<Region> r)
for (n = 0, si = nsrcs.begin(); n < region->n_channels(); ++n, ++si) {
- /* read it in */
+ /* read it in directly from the source */
if (region->audio_source (n)->read (buf, fpos, to_read) != to_read) {
goto out;
@@ -92,7 +93,7 @@ Reverse::run (boost::shared_ptr<Region> r)
for (nframes_t i = 0; i < to_read/2; ++i) {
swap (buf[i],buf[to_read-1-i]);
}
-
+
/* write it out */
boost::shared_ptr<AudioSource> asrc(boost::dynamic_pointer_cast<AudioSource>(*si));