diff options
Diffstat (limited to 'libs/ardour/reverse.cc')
-rw-r--r-- | libs/ardour/reverse.cc | 5 |
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)); |