mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-01-24 00:34:44 +01:00
More fixes to wfù
This commit is contained in:
parent
5aa9359236
commit
91176c9291
@ -103,35 +103,35 @@ namespace dsp {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
generic_block<PolyphaseResampler<T>>::ctrlMtx.lock();
|
{
|
||||||
|
std::lock_guard<std::mutex> lck(ctrlMtx);
|
||||||
|
int outCount = calcOutSize(count);
|
||||||
|
memcpy(&buffer[tapsPerPhase], _in->readBuf, count * sizeof(T));
|
||||||
|
_in->flush();
|
||||||
|
|
||||||
int outCount = calcOutSize(count);
|
// Write to output
|
||||||
|
int outIndex = 0;
|
||||||
memcpy(&buffer[tapsPerPhase], _in->readBuf, count * sizeof(T));
|
int _interp_m_1 = _interp - 1;
|
||||||
_in->flush();
|
if constexpr (std::is_same_v<T, float>) {
|
||||||
|
for (int i = 0; outIndex < outCount; i += _decim) {
|
||||||
// Write to output
|
int phase = i % _interp;
|
||||||
int outIndex = 0;
|
volk_32f_x2_dot_prod_32f(&out.writeBuf[outIndex], &buffer[i / _interp], tapPhases[phase], tapsPerPhase);
|
||||||
int _interp_m_1 = _interp - 1;
|
outIndex++;
|
||||||
if constexpr (std::is_same_v<T, float>) {
|
}
|
||||||
for (int i = 0; outIndex < outCount; i += _decim) {
|
|
||||||
int phase = i % _interp;
|
|
||||||
volk_32f_x2_dot_prod_32f(&out.writeBuf[outIndex], &buffer[i / _interp], tapPhases[phase], tapsPerPhase);
|
|
||||||
outIndex++;
|
|
||||||
}
|
}
|
||||||
}
|
if constexpr (std::is_same_v<T, complex_t> || std::is_same_v<T, stereo_t>) {
|
||||||
if constexpr (std::is_same_v<T, complex_t> || std::is_same_v<T, stereo_t>) {
|
for (int i = 0; outIndex < outCount; i += _decim) {
|
||||||
for (int i = 0; outIndex < outCount; i += _decim) {
|
int phase = i % _interp;
|
||||||
int phase = i % _interp;
|
volk_32fc_32f_dot_prod_32fc((lv_32fc_t*)&out.writeBuf[outIndex], (lv_32fc_t*)&buffer[(i / _interp)], tapPhases[phase], tapsPerPhase);
|
||||||
volk_32fc_32f_dot_prod_32fc((lv_32fc_t*)&out.writeBuf[outIndex], (lv_32fc_t*)&buffer[(i / _interp)], tapPhases[phase], tapsPerPhase);
|
outIndex++;
|
||||||
outIndex++;
|
}
|
||||||
}
|
}
|
||||||
|
if (!out.swap(outCount)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
memmove(buffer, &buffer[count], tapsPerPhase * sizeof(T));
|
||||||
}
|
}
|
||||||
if (!out.swap(outCount)) { return -1; }
|
|
||||||
|
|
||||||
memmove(buffer, &buffer[count], tapsPerPhase * sizeof(T));
|
|
||||||
|
|
||||||
generic_block<PolyphaseResampler<T>>::ctrlMtx.unlock();
|
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,8 @@ namespace ImGui {
|
|||||||
|
|
||||||
// If a vfo border is selected, resize VFO accordingly
|
// If a vfo border is selected, resize VFO accordingly
|
||||||
if (vfoBorderSelect) {
|
if (vfoBorderSelect) {
|
||||||
double dist = fabsf(mousePos.x - relatedVfo->lineMin.x);
|
double dist = (relatedVfo->reference == REF_CENTER) ? fabsf(mousePos.x - relatedVfo->lineMin.x) : (mousePos.x - relatedVfo->lineMin.x);
|
||||||
|
if (relatedVfo->reference == REF_UPPER) { dist = -dist; }
|
||||||
double hzDist = dist * (viewBandwidth / (double)dataWidth);
|
double hzDist = dist * (viewBandwidth / (double)dataWidth);
|
||||||
if (relatedVfo->reference == REF_CENTER) {
|
if (relatedVfo->reference == REF_CENTER) {
|
||||||
hzDist *= 2.0;
|
hzDist *= 2.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user