X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fst_stretch.cc;h=3660ff34d385431923e5932b8f472958242b63ab;hb=ecbd2ebb7446f9f3069145ea8b233e30a9218060;hp=369ed95279a5f9aa94aaf30adf05fe1e0beeee18;hpb=bb9cc45cd22af67ac275a5e73accbe14fee664d8;p=ardour.git diff --git a/libs/ardour/st_stretch.cc b/libs/ardour/st_stretch.cc index 369ed95279..3660ff34d3 100644 --- a/libs/ardour/st_stretch.cc +++ b/libs/ardour/st_stretch.cc @@ -67,10 +67,10 @@ int STStretch::run (boost::shared_ptr 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 a_region) boost::shared_ptr asrc = boost::dynamic_pointer_cast(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); @@ -177,18 +177,18 @@ STStretch::run (boost::shared_ptr a_region) /* now reset ancestral data for each new region */ for (vector >::iterator x = results.begin(); x != results.end(); ++x) { - nframes64_t astart = (*x)->ancestral_start(); - nframes64_t alength = (*x)->ancestral_length(); - nframes_t start; - nframes_t length; + framepos_t astart = (*x)->ancestral_start(); + framepos_t alength = (*x)->ancestral_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()); }