Alexey Kruglov wrote:
Every time we get any status other than LIBUSB_TRANSFER_COMPLETED (including LIBUSB_TRANSFER_ERROR) the code doesn't resubmit current buffer
That may not be a problem, depending on what assumptions librtlsdr makes.. Also note that a transfer with an error may also have successfully transfered some data, but not all that was requested before the error occurred.
2. maybe resubmit some kinds of the failed buffers other than LIBUSB_TRANSFER_COMPLETED, if it makes sense.
Only librtlsdr knows if it makes sense or not.
I am not a libusb guru and it's not well documented in this part, so I am not sure about my second point.
I know libusb well but I don't know the librtlsdr model by heart. Naïvely I might think that once a single transfer fails then all other transfers should be cancelled - at the very least if the failure is because of the device disappearing. //Peter