1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-09-28 15:56:33 -04:00

Channel Analyzer NG: input and channel sample rate getters

This commit is contained in:
f4exb 2017-02-28 23:21:30 +01:00
parent 3a32d5aec3
commit 3d972e8565
2 changed files with 3 additions and 2 deletions

View File

@ -42,6 +42,7 @@ public:
bool ssb);
int getInputSampleRate() const { return m_running.m_inputSampleRate; }
int getChannelSampleRate() const { return m_running.m_channelSampleRate; }
Real getMagSq() const { return m_magsq; }
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly);

View File

@ -393,7 +393,7 @@ bool ChannelAnalyzerNGGUI::setNewRate(int spanLog2)
qDebug("ChannelAnalyzerNGGUI::setNewRate");
ui->channelSampleRate->setValueRange(7, 0, m_channelAnalyzer->getInputSampleRate());
ui->channelSampleRate->setValue(m_channelAnalyzer->getInputSampleRate());
ui->channelSampleRate->setValue(m_channelAnalyzer->getChannelSampleRate());
if ((spanLog2 < 0) || (spanLog2 > 6)) {
return false;
@ -401,7 +401,7 @@ bool ChannelAnalyzerNGGUI::setNewRate(int spanLog2)
m_spanLog2 = spanLog2;
//m_rate = 48000 / (1<<spanLog2);
m_rate = m_channelAnalyzer->getInputSampleRate() / (1<<spanLog2);
m_rate = m_channelAnalyzer->getChannelSampleRate() / (1<<spanLog2);
setFiltersUIBoundaries();