diff --git a/plugins/samplesource/airspy/airspyinput.cpp b/plugins/samplesource/airspy/airspyinput.cpp index 782a74e10..b7fc7f7ec 100644 --- a/plugins/samplesource/airspy/airspyinput.cpp +++ b/plugins/samplesource/airspy/airspyinput.cpp @@ -266,7 +266,8 @@ bool AirspyInput::handleMessage(const Message& message) void AirspyInput::setCenterFrequency(quint64 freq_hz) { - freq_hz += (freq_hz * m_settings.m_LOppmTenths) / 10000000ULL; + qint64 df = ((qint64)freq_hz * m_settings.m_LOppmTenths) / 10000000LL; + freq_hz += df; airspy_error rc = (airspy_error) airspy_set_freq(m_dev, static_cast(freq_hz)); diff --git a/plugins/samplesource/hackrf/hackrfinput.cpp b/plugins/samplesource/hackrf/hackrfinput.cpp index 3c3907914..84c47c096 100644 --- a/plugins/samplesource/hackrf/hackrfinput.cpp +++ b/plugins/samplesource/hackrf/hackrfinput.cpp @@ -227,7 +227,8 @@ bool HackRFInput::handleMessage(const Message& message) void HackRFInput::setCenterFrequency(quint64 freq_hz) { - freq_hz += (freq_hz * m_settings.m_LOppmTenths) / 10000000ULL; + qint64 df = ((qint64)freq_hz * m_settings.m_LOppmTenths) / 10000000LL; + freq_hz += df; hackrf_error rc = (hackrf_error) hackrf_set_freq(m_dev, static_cast(freq_hz));