LimeSDR output: used fixed time length with minimum length for sample FIFO

pull/60/head
f4exb 2017-08-08 00:25:13 +02:00
rodzic ea4cb1bbfd
commit 3a84cd8526
3 zmienionych plików z 17 dodań i 1 usunięć

Wyświetl plik

@ -18,3 +18,6 @@
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgCrossReportToGUI, Message)
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
const float DeviceLimeSDRShared::m_sampleFifoLengthInSeconds = 0.25;
const int DeviceLimeSDRShared::m_sampleFifoMinSize = 48000;

Wyświetl plik

@ -82,6 +82,9 @@ public:
uint64_t m_centerFrequency;
uint32_t m_log2Soft;
static const float m_sampleFifoLengthInSeconds;
static const int m_sampleFifoMinSize;
DeviceLimeSDRShared() :
m_deviceParams(0),
m_channel(-1),

Wyświetl plik

@ -505,7 +505,8 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
(m_settings.m_lpfFIRBW != settings.m_lpfFIRBW) ||
(m_settings.m_lpfFIREnable != settings.m_lpfFIREnable) ||
(m_settings.m_ncoEnable != settings.m_ncoEnable) ||
(m_settings.m_ncoFrequency != settings.m_ncoFrequency) || force)
(m_settings.m_ncoFrequency != settings.m_ncoFrequency) ||
(m_settings.m_log2SoftInterp != settings.m_log2SoftInterp) || force)
{
suspendOwnThread = true;
}
@ -618,6 +619,15 @@ bool LimeSDROutput::applySettings(const LimeSDROutputSettings& settings, bool fo
}
}
if ((m_settings.m_devSampleRate != settings.m_devSampleRate)
|| (m_settings.m_log2SoftInterp != settings.m_log2SoftInterp) || force)
{
int fifoSize = std::max(
(int) ((settings.m_devSampleRate/(1<<settings.m_log2SoftInterp)) * DeviceLimeSDRShared::m_sampleFifoLengthInSeconds),
DeviceLimeSDRShared::m_sampleFifoMinSize);
m_sampleSourceFifo.resize(fifoSize);
}
if ((m_settings.m_lpfBW != settings.m_lpfBW) || force)
{
if (m_deviceShared.m_deviceParams->getDevice() != 0)