From b13b2040c4070b68f079c2ef2a9c70b350978b3f Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 30 Sep 2018 00:21:24 +0200 Subject: [PATCH] BladeRF2 input: fixed read size in MI mode --- plugins/samplesource/bladerf2input/bladerf2inputthread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/samplesource/bladerf2input/bladerf2inputthread.cpp b/plugins/samplesource/bladerf2input/bladerf2inputthread.cpp index d4d10e512..1b9ebc63f 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputthread.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputthread.cpp @@ -92,7 +92,11 @@ void BladeRF2InputThread::run() qDebug("BladeRF2InputThread::run: start running loop"); while (m_running) { - res = bladerf_sync_rx(m_dev, m_buf, DeviceBladeRF2::blockSize, NULL, 10000); + if (m_nbChannels > 1) { + res = bladerf_sync_rx(m_dev, m_buf, DeviceBladeRF2::blockSize*m_nbChannels, NULL, 10000); + } else { + res = bladerf_sync_rx(m_dev, m_buf, DeviceBladeRF2::blockSize, NULL, 10000); + } if (res < 0) {