mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-29 03:09:14 -05:00
HackRF output: set FIFO size to 0.25s or 150 kS whichever is larger (600kS/s knee)
This commit is contained in:
parent
7b851e8326
commit
3a9eec8463
@ -18,4 +18,5 @@
|
|||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(DeviceHackRFShared::MsgConfigureFrequencyDelta, Message)
|
MESSAGE_CLASS_DEFINITION(DeviceHackRFShared::MsgConfigureFrequencyDelta, Message)
|
||||||
|
|
||||||
|
const float DeviceHackRFShared::m_sampleFifoLengthInSeconds = 0.25;
|
||||||
|
const int DeviceHackRFShared::m_sampleFifoMinSize = 150000; // 600kS/s knee
|
||||||
|
@ -42,6 +42,9 @@ public:
|
|||||||
m_frequencyDelta(frequencyDelta)
|
m_frequencyDelta(frequencyDelta)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const float m_sampleFifoLengthInSeconds;
|
||||||
|
static const int m_sampleFifoMinSize;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,4 +20,4 @@ MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgCrossReportToGUI, Message)
|
|||||||
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
|
MESSAGE_CLASS_DEFINITION(DeviceLimeSDRShared::MsgReportDeviceInfo, Message)
|
||||||
|
|
||||||
const float DeviceLimeSDRShared::m_sampleFifoLengthInSeconds = 0.25;
|
const float DeviceLimeSDRShared::m_sampleFifoLengthInSeconds = 0.25;
|
||||||
const int DeviceLimeSDRShared::m_sampleFifoMinSize = 48000;
|
const int DeviceLimeSDRShared::m_sampleFifoMinSize = 48000; // 192kS/s knee
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include "dsp/dspengine.h"
|
#include "dsp/dspengine.h"
|
||||||
#include "device/devicesourceapi.h"
|
#include "device/devicesourceapi.h"
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "hackrf/devicehackrfshared.h"
|
||||||
|
|
||||||
#include "hackrfoutputgui.h"
|
#include "hackrfoutputgui.h"
|
||||||
#include "hackrfoutputthread.h"
|
#include "hackrfoutputthread.h"
|
||||||
@ -242,11 +242,10 @@ bool HackRFOutput::applySettings(const HackRFOutputSettings& settings, bool forc
|
|||||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || (m_settings.m_log2Interp != settings.m_log2Interp) || force)
|
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || (m_settings.m_log2Interp != settings.m_log2Interp) || force)
|
||||||
{
|
{
|
||||||
forwardChange = true;
|
forwardChange = true;
|
||||||
|
int fifoSize = std::max(
|
||||||
// FIFO size:
|
(int) ((settings.m_devSampleRate/(1<<settings.m_log2Interp)) * DeviceHackRFShared::m_sampleFifoLengthInSeconds),
|
||||||
// 1 s length up to interpolation by 16
|
DeviceHackRFShared::m_sampleFifoMinSize);
|
||||||
// 2 s for interpolation by 32
|
m_sampleSourceFifo.resize(fifoSize);
|
||||||
m_sampleSourceFifo.resize(settings.m_devSampleRate/(1<<(settings.m_log2Interp <= 4 ? settings.m_log2Interp : 4)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || force)
|
if ((m_settings.m_devSampleRate != settings.m_devSampleRate) || force)
|
||||||
|
Loading…
Reference in New Issue
Block a user