diff --git a/devices/limesdr/devicelimesdrshared.cpp b/devices/limesdr/devicelimesdrshared.cpp index 623ede860..ed445e271 100644 --- a/devices/limesdr/devicelimesdrshared.cpp +++ b/devices/limesdr/devicelimesdrshared.cpp @@ -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; diff --git a/devices/limesdr/devicelimesdrshared.h b/devices/limesdr/devicelimesdrshared.h index f480ce7dc..130f67cf3 100644 --- a/devices/limesdr/devicelimesdrshared.h +++ b/devices/limesdr/devicelimesdrshared.h @@ -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), diff --git a/plugins/samplesink/limesdroutput/limesdroutput.cpp b/plugins/samplesink/limesdroutput/limesdroutput.cpp index ff896a1fc..b1a4c5dc5 100644 --- a/plugins/samplesink/limesdroutput/limesdroutput.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutput.cpp @@ -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<getDevice() != 0)