1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-16 13:21:50 -05:00

LimeSDR output: try to minimize latency

This commit is contained in:
f4exb 2017-09-20 00:21:06 +02:00
parent e4c1892930
commit 10b8f786b1

View File

@ -31,8 +31,8 @@ MESSAGE_CLASS_DEFINITION(PlutoSDROutput::MsgConfigurePlutoSDR, Message)
PlutoSDROutput::PlutoSDROutput(DeviceSinkAPI *deviceAPI) : PlutoSDROutput::PlutoSDROutput(DeviceSinkAPI *deviceAPI) :
m_deviceAPI(deviceAPI), m_deviceAPI(deviceAPI),
m_settings(),
m_deviceDescription("PlutoSDROutput"), m_deviceDescription("PlutoSDROutput"),
m_settings(),
m_running(false), m_running(false),
m_plutoTxBuffer(0), m_plutoTxBuffer(0),
m_plutoSDROutputThread(0) m_plutoSDROutputThread(0)
@ -136,7 +136,8 @@ bool PlutoSDROutput::handleMessage(const Message& message)
bool PlutoSDROutput::openDevice() bool PlutoSDROutput::openDevice()
{ {
m_sampleSourceFifo.resize(m_settings.m_devSampleRate/(1<<(m_settings.m_log2Interp <= 4 ? m_settings.m_log2Interp : 4))); //m_sampleSourceFifo.resize(m_settings.m_devSampleRate/(1<<(m_settings.m_log2Interp <= 4 ? m_settings.m_log2Interp : 4)));
m_sampleSourceFifo.resize(32*PLUTOSDR_BLOCKSIZE_SAMPLES);
// look for Rx buddy and get reference to common parameters // look for Rx buddy and get reference to common parameters
if (m_deviceAPI->getSourceBuddies().size() > 0) // then sink if (m_deviceAPI->getSourceBuddies().size() > 0) // then sink
@ -309,10 +310,12 @@ bool PlutoSDROutput::applySettings(const PlutoSDROutputSettings& settings, bool
if ((m_settings.m_log2Interp != settings.m_log2Interp) || force) if ((m_settings.m_log2Interp != settings.m_log2Interp) || force)
{ {
m_sampleSourceFifo.resize((32*PLUTOSDR_BLOCKSIZE_SAMPLES)/(1<<settings.m_log2Interp));
if (m_plutoSDROutputThread != 0) if (m_plutoSDROutputThread != 0)
{ {
m_plutoSDROutputThread->setLog2Interpolation(settings.m_log2Interp); m_plutoSDROutputThread->setLog2Interpolation(settings.m_log2Interp);
qDebug() << "PlutoSDROutput::applySettings: set soft interpolation to " << (1<<settings.m_log2Interp); qDebug() << "PlutoSDROutput::applySettings: set soft interpolation in thread to " << (1<<settings.m_log2Interp);
} }
forwardChangeOwnDSP = true; forwardChangeOwnDSP = true;