mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-19 09:30:06 +02:00
LIBSAMPLERATE needs to update the factor each time. Thanks to Rob Sykes.
This commit is contained in:
parent
4b9a934ab4
commit
8b6a9ca3d7
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user