projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rationale pathways that add notes to Sequence<T> so that there is only final insertio...
[ardour.git]
/
libs
/
ardour
/
reverse.cc
diff --git
a/libs/ardour/reverse.cc
b/libs/ardour/reverse.cc
index ed3970bdfce7d454e9d96edee352ec6c216363bf..10fce584423b22f8b3edc7ef252cd9a49c1e5d7f 100644
(file)
--- a/
libs/ardour/reverse.cc
+++ b/
libs/ardour/reverse.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-46,11
+46,11
@@
Reverse::run (boost::shared_ptr<Region> r)
{
SourceList nsrcs;
SourceList::iterator si;
{
SourceList nsrcs;
SourceList::iterator si;
-
nframes
_t blocksize = 256 * 1024;
+
framecnt
_t blocksize = 256 * 1024;
Sample* buf = 0;
Sample* buf = 0;
-
nframe
s_t fpos;
-
nframe
s_t fstart;
-
nframes
_t to_read;
+
framepo
s_t fpos;
+
framepo
s_t fstart;
+
framecnt
_t to_read;
int ret = -1;
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion>(r);
int ret = -1;
boost::shared_ptr<AudioRegion> region = boost::dynamic_pointer_cast<AudioRegion>(r);
@@
-83,13
+83,13
@@
Reverse::run (boost::shared_ptr<Region> r)
for (n = 0, si = nsrcs.begin(); n < region->n_channels(); ++n, ++si) {
/* read it in directly from the source */
for (n = 0, si = nsrcs.begin(); n < region->n_channels(); ++n, ++si) {
/* read it in directly from the source */
-
+
if (region->audio_source (n)->read (buf, fpos, to_read) != to_read) {
goto out;
}
/* swap memory order */
if (region->audio_source (n)->read (buf, fpos, to_read) != to_read) {
goto out;
}
/* swap memory order */
-
+
for (nframes_t i = 0; i < to_read/2; ++i) {
swap (buf[i],buf[to_read-1-i]);
}
for (nframes_t i = 0; i < to_read/2; ++i) {
swap (buf[i],buf[to_read-1-i]);
}
@@
-124,6
+124,6
@@
Reverse::run (boost::shared_ptr<Region> r)
asrc->mark_for_remove ();
}
}
asrc->mark_for_remove ();
}
}
-
+
return ret;
}
return ret;
}