mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-03-30 03:55:40 +02:00
Rollback of changes to resampler
This commit is contained in:
parent
cf4cfb50fc
commit
ba25eee09a
@ -83,14 +83,14 @@ namespace dsp {
|
|||||||
|
|
||||||
void updateWindow(dsp::filter_window::generic_window* window) {
|
void updateWindow(dsp::filter_window::generic_window* window) {
|
||||||
std::lock_guard<std::mutex> lck(generic_block<PolyphaseResampler<T>>::ctrlMtx);
|
std::lock_guard<std::mutex> lck(generic_block<PolyphaseResampler<T>>::ctrlMtx);
|
||||||
//generic_block<PolyphaseResampler<T>>::tempStop();
|
generic_block<PolyphaseResampler<T>>::tempStop();
|
||||||
_window = window;
|
_window = window;
|
||||||
volk_free(taps);
|
volk_free(taps);
|
||||||
tapCount = window->getTapCount();
|
tapCount = window->getTapCount();
|
||||||
taps = (float*)volk_malloc(tapCount * sizeof(float), volk_get_alignment());
|
taps = (float*)volk_malloc(tapCount * sizeof(float), volk_get_alignment());
|
||||||
window->createTaps(taps, tapCount, _interp);
|
window->createTaps(taps, tapCount, _interp);
|
||||||
buildTapPhases();
|
buildTapPhases();
|
||||||
//generic_block<PolyphaseResampler<T>>::tempStart();
|
generic_block<PolyphaseResampler<T>>::tempStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
int calcOutSize(int in) {
|
int calcOutSize(int in) {
|
||||||
@ -103,8 +103,6 @@ namespace dsp {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
std::lock_guard<std::mutex> lck(generic_block<PolyphaseResampler<T>>::ctrlMtx);
|
|
||||||
int outCount = calcOutSize(count);
|
int outCount = calcOutSize(count);
|
||||||
memcpy(&buffer[tapsPerPhase], _in->readBuf, count * sizeof(T));
|
memcpy(&buffer[tapsPerPhase], _in->readBuf, count * sizeof(T));
|
||||||
_in->flush();
|
_in->flush();
|
||||||
@ -126,12 +124,9 @@ namespace dsp {
|
|||||||
outIndex++;
|
outIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!out.swap(outCount)) {
|
if (!out.swap(outCount)) { return -1; }
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
memmove(buffer, &buffer[count], tapsPerPhase * sizeof(T));
|
memmove(buffer, &buffer[count], tapsPerPhase * sizeof(T));
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user