mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-20 04:37:26 -05:00
rtl_sdr_fm: initialize async buffer length and consider buffer count
This commit is contained in:
@@ -1297,6 +1297,8 @@ void open_rtlsdr_stream(dsd_opts *opts)
|
|||||||
if (controller.freq_len > 1) demod.terminate_on_squelch = 0;
|
if (controller.freq_len > 1) demod.terminate_on_squelch = 0;
|
||||||
|
|
||||||
ACTUAL_BUF_LENGTH = lcm_post[demod.post_downsample] * DEFAULT_BUF_LENGTH;
|
ACTUAL_BUF_LENGTH = lcm_post[demod.post_downsample] * DEFAULT_BUF_LENGTH;
|
||||||
|
/* Ensure async read uses a valid, explicit buffer length */
|
||||||
|
dongle.buf_len = (uint32_t)ACTUAL_BUF_LENGTH;
|
||||||
|
|
||||||
r = rtlsdr_open(&dongle.dev, (uint32_t)dongle.dev_index);
|
r = rtlsdr_open(&dongle.dev, (uint32_t)dongle.dev_index);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user