1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 09:18:54 -05:00

NCOF: fix null sample rate condition

This commit is contained in:
f4exb 2022-02-21 02:18:44 +01:00
parent 4c2ca8fa20
commit c678b40988

View File

@ -46,8 +46,8 @@ NCOF::NCOF()
void NCOF::setFreq(Real freq, Real sampleRate)
{
m_phaseIncrement = (freq * TableSize) / sampleRate;
qDebug("NCOF::setFreq: freq: %f m_phaseIncrement: %f", freq, m_phaseIncrement);
m_phaseIncrement = sampleRate == 0 ? 0 : (freq * TableSize) / sampleRate;
qDebug("NCOF::setFreq: freq: %f sr: %f m_phaseIncrement: %f", freq, sampleRate, m_phaseIncrement);
}
float NCOF::next()