diff --git a/core/src/dsp/resampling.h b/core/src/dsp/resampling.h index a1e6ac44..09eeb020 100644 --- a/core/src/dsp/resampling.h +++ b/core/src/dsp/resampling.h @@ -40,6 +40,8 @@ namespace dsp { buffer = (T*)volk_malloc(STREAM_BUFFER_SIZE * sizeof(T) * 2, volk_get_alignment()); memset(buffer, 0, STREAM_BUFFER_SIZE * sizeof(T) * 2); + counter = 0; + offset = 0; generic_block>::registerInput(_in); generic_block>::registerOutput(&out); generic_block>::_block_init = true; @@ -51,6 +53,8 @@ namespace dsp { generic_block>::tempStop(); generic_block>::unregisterInput(_in); _in = in; + counter = 0; + offset = 0; generic_block>::registerInput(_in); generic_block>::tempStart(); } @@ -64,6 +68,8 @@ namespace dsp { _interp = _outSampleRate / _gcd; _decim = _inSampleRate / _gcd; buildTapPhases(); + counter = 0; + offset = 0; generic_block>::tempStart(); } @@ -76,6 +82,8 @@ namespace dsp { _interp = _outSampleRate / _gcd; _decim = _inSampleRate / _gcd; buildTapPhases(); + counter = 0; + offset = 0; generic_block>::tempStart(); } @@ -99,6 +107,8 @@ namespace dsp { taps = (float*)volk_malloc(tapCount * sizeof(float), volk_get_alignment()); window->createTaps(taps, tapCount, _interp); buildTapPhases(); + counter = 0; + offset = 0; generic_block>::tempStart(); }