1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-19 17:40:15 +02:00

LIBSAMPLERATE needs to update the factor each time. Thanks to Rob Sykes.

This commit is contained in:
martynshaw99 2012-11-20 00:16:58 +00:00
parent 4b9a934ab4
commit 8b6a9ca3d7
2 changed files with 1 additions and 7 deletions

View File

@ -206,7 +206,6 @@
int err;
SRC_STATE *state = src_new(mMethod, 1, &err);
mHandle = (void *)state;
mInitial = true;
}
VarRateResample::~VarRateResample()
@ -263,10 +262,7 @@
float *outBuffer,
int outBufferLen)
{
if (mInitial) {
src_set_ratio((SRC_STATE *)mHandle, factor);
mInitial = false;
}
src_set_ratio((SRC_STATE *)mHandle, factor);
SRC_DATA data;

View File

@ -39,7 +39,6 @@ class Resample
mMethod = GetFastMethod();
mHandle = NULL;
mInitial = false;
};
virtual ~Resample() {};
@ -116,7 +115,6 @@ class Resample
protected:
int mMethod; // resampler-specific enum for resampling method
void* mHandle; // constant-rate or variable-rate resampler (XOR per instance)
bool mInitial;
};
class ConstRateResample : public Resample