From bc89fe0147c04b67141936d109c00dfd4d69cc4b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 12 Dec 2008 14:43:24 +0000 Subject: 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 --- libs/ardour/reverse.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libs/ardour/reverse.cc') 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 r) } fpos = max (fstart, (fstart + region->length() - blocksize)); + buf = new Sample[blocksize]; to_read = blocksize; @@ -81,7 +82,7 @@ Reverse::run (boost::shared_ptr 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 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 asrc(boost::dynamic_pointer_cast(*si)); -- cgit v1.2.3