1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-12 11:26:11 -05:00

Channel analyzer: engage rational down sampler also when no channel decimation takes place. Fixes #1622

This commit is contained in:
f4exb 2023-04-02 03:39:39 +02:00
parent c9fd5b8468
commit 084fd7b0e9

View File

@ -66,7 +66,20 @@ void ChannelAnalyzerSink::feed(const SampleVector::const_iterator& begin, const
if (m_decimator.getDecim() == 1)
{
processOneSample(c, sideband);
if (m_settings.m_rationalDownSample)
{
Complex cj;
if (m_interpolator.decimate(&m_interpolatorDistanceRemain, c, &cj))
{
processOneSample(cj, sideband);
m_interpolatorDistanceRemain += m_interpolatorDistance;
}
}
else
{
processOneSample(c, sideband);
}
}
else
{
@ -311,6 +324,9 @@ void ChannelAnalyzerSink::applySettings(const ChannelAnalyzerSettings& settings,
m_settings = settings;
qDebug() << "ChannelAnalyzerSink::applySettings:"
<< " m_rationalDownSample: " << settings.m_rationalDownSample;
if (doApplySampleRate) {
applySampleRate();
}