summaryrefslogtreecommitdiff
path: root/libs/ardour/st_stretch.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-12-03 22:26:29 +0000
committerCarl Hetherington <carl@carlh.net>2010-12-03 22:26:29 +0000
commit73192bc1a7ea55fa1864dc3826845b15c00dd2ec (patch)
treec0039f3f5a848aed6e880abf11519dad855fa899 /libs/ardour/st_stretch.cc
parent74b4a3c77b08dc1e58274875604eb73e8492fa93 (diff)
Remove all use of nframes_t.
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/st_stretch.cc')
-rw-r--r--libs/ardour/st_stretch.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc
index 748c854daf..3660ff34d3 100644
--- a/libs/ardour/st_stretch.cc
+++ b/libs/ardour/st_stretch.cc
@@ -67,10 +67,10 @@ int
STStretch::run (boost::shared_ptr<Region> a_region)
{
SourceList nsrcs;
- nframes_t total_frames;
- nframes_t done;
+ framecnt_t total_frames;
+ framecnt_t done;
int ret = -1;
- const nframes_t bufsize = 16384;
+ const framecnt_t bufsize = 16384;
gain_t *gain_buffer = 0;
Sample *buffer = 0;
char suffix[32];
@@ -108,13 +108,13 @@ STStretch::run (boost::shared_ptr<Region> a_region)
boost::shared_ptr<AudioSource> asrc
= boost::dynamic_pointer_cast<AudioSource>(nsrcs[i]);
- nframes_t pos = 0;
- nframes_t this_read = 0;
+ framepos_t pos = 0;
+ framecnt_t this_read = 0;
st.clear();
while (!tsr.cancel && pos < region->length()) {
- nframes_t this_time;
+ framecnt_t this_time;
this_time = min (bufsize, region->length() - pos);
@@ -179,16 +179,16 @@ STStretch::run (boost::shared_ptr<Region> a_region)
for (vector<boost::shared_ptr<Region> >::iterator x = results.begin(); x != results.end(); ++x) {
framepos_t astart = (*x)->ancestral_start();
framepos_t alength = (*x)->ancestral_length();
- nframes_t start;
- nframes_t length;
+ framepos_t start;
+ framecnt_t length;
// note: tsr.fraction is a percentage of original length. 100 = no change,
// 50 is half as long, 200 is twice as long, etc.
float stretch = (*x)->stretch() * (tsr.time_fraction/100.0);
- start = (nframes_t) floor (astart + ((astart - (*x)->start()) / stretch));
- length = (nframes_t) floor (alength / stretch);
+ start = (framepos_t) floor (astart + ((astart - (*x)->start()) / stretch));
+ length = (framecnt_t) floor (alength / stretch);
(*x)->set_ancestral_data (start, length, stretch, (*x)->shift());
}