mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-25 20:07:51 +02:00
DSP performance upgrades + bugfix
This commit is contained in:
@ -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; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user