sdr_rf_to_baseband() processes samples in blocks of size SDR_OVERSAMPLING. If
the total number of samples does not align with this block size, the leftover
samples are lost and phase and timing glitches result.
To mitigate this, sdr_receive() now has an additional parameter that specifies
the alignment of the returned data. The number of samples returned is always a
multiple of this alignment factor. This feature is used to ensure that the
number of returned samples is a multiple of SDR_OVERSAMPLING and therefore no
samples are lost in sdr_rf_to_baseband().
sdr_rf_to_baseband() now has an additional check that makes the function fail
if the alignment is incorrect.
- (only) time-based end-of-transmission tracking
- removed tx_done flag
- count zero-buffers correctly in time-tracking
- add 10 ms of headroom so the transmission does not stop before buffer was
completely transmitted (race condition)
- fix race condition with tx_start_time in sdr_start_tx()
- simplified packet queuing (no chunking)
- read multiple packets before starting transmission (to fill buffers initially)
Thanks to rudi_s!