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:
parent
4c2ca8fa20
commit
c678b40988
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user