mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-12-24 01:48:28 +01:00
hackrf code cleanup
This commit is contained in:
parent
fb85177987
commit
ad36ede26b
@ -379,10 +379,8 @@ private:
|
||||
|
||||
static int callback(hackrf_transfer* transfer) {
|
||||
HackRFSourceModule* _this = (HackRFSourceModule*)transfer->rx_ctx;
|
||||
int count = transfer->valid_length / 2;
|
||||
int8_t* buffer = (int8_t*)transfer->buffer;
|
||||
volk_8i_s32f_convert_32f((float*)_this->stream.writeBuf, buffer, 128.0f, count * 2);
|
||||
if (!_this->stream.swap(count)) { return -1; }
|
||||
volk_8i_s32f_convert_32f((float*)_this->stream.writeBuf, (int8_t*)transfer->buffer, 128.0f, transfer->valid_length);
|
||||
if (!_this->stream.swap(transfer->valid_length / 2)) { return -1; }
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user