1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-06 11:42:17 +01:00

I think this completes the refactoring for const-rate vs var-rate resampling.

This commit is contained in:
v.audacity
2012-11-04 04:44:10 +00:00
parent 1625b87aab
commit ce9bd9fa90
9 changed files with 46 additions and 33 deletions

View File

@@ -126,7 +126,6 @@
// variable-rate resampler(s)
#if USE_LIBRESAMPLE
#include "libresample.h"
@@ -138,7 +137,7 @@
else
mMethod = GetFastMethod();
mHandle = resample_open(mMethod, minFactor, maxFactor);
mHandle = resample_open(mMethod, dMinFactor, dMaxFactor);
}
VarRateResample::~VarRateResample()
@@ -265,12 +264,12 @@
}
int VarRateResample::Process(double factor,
float *inBuffer,
int inBufferLen,
bool lastFlag,
int *inBufferUsed,
float *outBuffer,
int outBufferLen)
float *inBuffer,
int inBufferLen,
bool lastFlag,
int *inBufferUsed,
float *outBuffer,
int outBufferLen)
{
if (mInitial) {
src_set_ratio((SRC_STATE *)mHandle, factor);
@@ -299,7 +298,7 @@
}
#else // no var-rate resampler
VarRateResample::VarRateResample(const bool useBestMethod, const double dFactor)
VarRateResample::VarRateResample(const bool useBestMethod, const double dMinFactor, const double dMaxFactor)
: Resample()
{
}