Resampler code pulled back in from bqresample, with safer api

This commit is contained in:
Chris Cannam
2020-10-21 15:05:14 +01:00
parent 81629cf714
commit 3ddc35f7ae
5 changed files with 443 additions and 359 deletions

View File

@@ -217,8 +217,9 @@ RubberBandStretcher::Impl::consumeChannel(size_t c,
input = inputs[c] + offset;
}
toWrite = cd.resampler->resample(&input,
&cd.resamplebuf,
toWrite = cd.resampler->resample(&cd.resamplebuf,
cd.resamplebufSize,
&input,
samples,
1.0 / m_pitchScale,
final);
@@ -1090,8 +1091,9 @@ RubberBandStretcher::Impl::writeChunk(size_t channel, size_t shiftIncrement, boo
#endif
#endif
size_t outframes = cd.resampler->resample(&cd.accumulator,
&cd.resamplebuf,
size_t outframes = cd.resampler->resample(&cd.resamplebuf,
cd.resamplebufSize,
&cd.accumulator,
si,
1.0 / m_pitchScale,
last);