From 73192bc1a7ea55fa1864dc3826845b15c00dd2ec Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 3 Dec 2010 22:26:29 +0000 Subject: Remove all use of nframes_t. git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/interpolation.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libs/ardour/interpolation.cc') diff --git a/libs/ardour/interpolation.cc b/libs/ardour/interpolation.cc index 1393d8aae8..0a9bbc3a7d 100644 --- a/libs/ardour/interpolation.cc +++ b/libs/ardour/interpolation.cc @@ -6,11 +6,11 @@ using namespace ARDOUR; -nframes_t -LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, Sample *output) +framecnt_t +LinearInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input, Sample *output) { // index in the input buffers - nframes_t i = 0; + framecnt_t i = 0; double acceleration; double distance = 0.0; @@ -22,7 +22,7 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, } distance = phase[channel]; - for (nframes_t outsample = 0; outsample < nframes; ++outsample) { + for (framecnt_t outsample = 0; outsample < nframes; ++outsample) { i = floor(distance); Sample fractional_phase_part = distance - i; if (fractional_phase_part >= 1.0) { @@ -45,11 +45,11 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, return i; } -nframes_t -CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, Sample *output) +framecnt_t +CubicInterpolation::interpolate (int channel, framecnt_t nframes, Sample *input, Sample *output) { // index in the input buffers - nframes_t i = 0; + framecnt_t i = 0; double acceleration; double distance = 0.0; @@ -87,7 +87,7 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, inm1 = input[i-1]; } - for (nframes_t outsample = 0; outsample < nframes; ++outsample) { + for (framecnt_t outsample = 0; outsample < nframes; ++outsample) { float f = floor (distance); float fractional_phase_part = distance - f; @@ -124,7 +124,7 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, /* not sure that this is ever utilized - it implies that one of the input/output buffers is missing */ - for (nframes_t outsample = 0; outsample < nframes; ++outsample) { + for (framecnt_t outsample = 0; outsample < nframes; ++outsample) { distance += _speed + acceleration; } } -- cgit v1.2.3