diff options
author | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
commit | bb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch) | |
tree | e52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/interpolation.cc | |
parent | 8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff) |
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent...
git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/interpolation.cc')
-rw-r--r-- | libs/ardour/interpolation.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libs/ardour/interpolation.cc b/libs/ardour/interpolation.cc index 9a45d560c0..79ec82b482 100644 --- a/libs/ardour/interpolation.cc +++ b/libs/ardour/interpolation.cc @@ -11,16 +11,16 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, { // index in the input buffers nframes_t i = 0; - + double acceleration; double distance = 0.0; - + if (_speed != _target_speed) { acceleration = _target_speed - _speed; } else { acceleration = 0.0; } - + distance = phase[channel]; for (nframes_t outsample = 0; outsample < nframes; ++outsample) { i = floor(distance); @@ -29,19 +29,19 @@ LinearInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, fractional_phase_part -= 1.0; i++; } - + if (input && output) { // Linearly interpolate into the output buffer - output[outsample] = + output[outsample] = input[i] * (1.0f - fractional_phase_part) + input[i+1] * fractional_phase_part; } distance += _speed + acceleration; } - + i = floor(distance); phase[channel] = distance - floor(distance); - + return i; } @@ -50,16 +50,16 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, { // index in the input buffers nframes_t i = 0; - + double acceleration; double distance = 0.0; - + if (_speed != _target_speed) { acceleration = _target_speed - _speed; } else { acceleration = 0.0; } - + distance = phase[channel]; for (nframes_t outsample = 0; outsample < nframes; ++outsample) { i = floor(distance); @@ -68,16 +68,16 @@ CubicInterpolation::interpolate (int channel, nframes_t nframes, Sample *input, fractional_phase_part -= 1.0; i++; } - + if (input && output) { // Cubically interpolate into the output buffer output[outsample] = cube_interp(fractional_phase_part, input[i-1], input[i], input[i+1], input[i+2]); } distance += _speed + acceleration; } - + i = floor(distance); phase[channel] = distance - floor(distance); - + return i; } |