pothosware / SoapyRTLSDR

SoapySDR RTL-SDR Support Module
https://github.com/pothosware/SoapyRTLSDR/wiki
MIT License
124 stars 29 forks source link

Fix #28: bad handing of bufflen and asyncBuff (origin of CubicSDR slowdown) #29

Closed vsonnier closed 7 years ago

vsonnier commented 7 years ago

@guruofquality @cjcliffe Greetings ! I've found the definitive cause of #28, and it is entirely SoapyRTLSDR fault :) This PR fixes 2 things:

Now the source of slowdown in CubicSDR is that bufflen was used indirectly through a getStreamMTU() call, which finally dimension array-like incoming buffers handled with memcpy, memove and such.

So after fixing the bufflen handing, I experimented on my machine (Core i7-2630QM Sandy-Bridge laptop, was high-end in 2011)

On one side maybe CubicSDR should be smarter in buffer handling instead of relying on CPU cache, and memove, memcpy but on the other side now bufflen will have to be set carefully depending on the current machine because of its much higher value.