1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-05-23 16:46:55 -04:00

Merge pull request #2662 from srcejon/acars

NCO: Fix negative phase increments on ARM CPUs.
This commit is contained in:
Edouard Griffiths 2026-03-08 20:55:23 +01:00 committed by GitHub
commit e94e35bf75
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,7 +52,7 @@ uint64_t NCO::prsg63()
void NCO::setFreq(Real freq, Real sampleRate, bool integerPhase, int ditherBits)
{
m_phaseIncrement = (Phase) std::round((freq * pow(2.0, PhaseBits)) / sampleRate);
m_phaseIncrement = (Phase) (qint64) std::round((freq * pow(2.0, PhaseBits)) / sampleRate);
if (integerPhase) {
m_phaseIncrement &= ~FracMask;
}