DSP performance upgrades + bugfix

This commit is contained in:
Ryzerth
2021-03-29 21:53:43 +02:00
parent b72246d769
commit 27394a091f
29 changed files with 942 additions and 355 deletions

View File

@ -427,11 +427,10 @@ private:
static void asyncHandler(unsigned char *buf, uint32_t len, void *ctx) {
RTLSDRSourceModule* _this = (RTLSDRSourceModule*)ctx;
int sampCount = len / 2;
for (int i = 0; i < sampCount; i++) {
_this->stream.writeBuf[i].i = (float)(buf[(i * 2) + 1] - 127) / 128.0f;
_this->stream.writeBuf[i].q = (float)(buf[i * 2] - 127) / 128.0f;
_this->stream.writeBuf[i].re = (float)(buf[i * 2] - 127) / 128.0f;
_this->stream.writeBuf[i].im = (float)(buf[(i * 2) + 1] - 127) / 128.0f;
}
if (!_this->stream.swap(sampCount)) { return; }
}