Skip to content

Commit

Permalink
Channel analyzer: engage rational down sampler also when no channel d…
Browse files Browse the repository at this point in the history
…ecimation takes place. Fixes #1622
  • Loading branch information
f4exb committed Apr 2, 2023
1 parent c9fd5b8 commit 084fd7b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion plugins/channelrx/chanalyzer/chanalyzersink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -311,6 +324,9 @@ void ChannelAnalyzerSink::applySettings(const ChannelAnalyzerSettings& settings,

m_settings = settings;

qDebug() << "ChannelAnalyzerSink::applySettings:"
<< " m_rationalDownSample: " << settings.m_rationalDownSample;

if (doApplySampleRate) {
applySampleRate();
}
Expand Down

0 comments on commit 084fd7b

Please sign in to comment.