1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

Add explicit typecasting that was missing

This commit is contained in:
Arne Jünemann 2023-10-24 06:11:15 +02:00
parent 277b2b4d18
commit 7f9ed6df6d
2 changed files with 3 additions and 3 deletions

View File

@ -864,7 +864,7 @@ void GLSpectrumGUI::setAveragingToolitp()
{
QString s;
int averagingIndex = m_settings.m_averagingMode == SpectrumSettings::AvgModeNone ? 0 : m_settings.m_averagingIndex;
float overlapFactor = (m_settings.m_fftSize - m_settings.m_fftOverlap) / m_settings.m_fftSize;
float overlapFactor = (m_settings.m_fftSize - m_settings.m_fftOverlap) / (float)m_settings.m_fftSize;
float averagingTime = (m_settings.m_fftSize * (SpectrumSettings::getAveragingValue(averagingIndex, m_settings.m_averagingMode) == 0 ?
1 :
SpectrumSettings::getAveragingValue(averagingIndex, m_settings.m_averagingMode))) / (float) m_glSpectrum->getSampleRate();

View File

@ -2735,7 +2735,7 @@ void GLSpectrumView::applyChanges()
float timeScaleDiv = ((float)m_sampleRate / (float)m_timingRate);
if (m_fftSize > m_fftOverlap) {
timeScaleDiv *= m_fftSize / (m_fftSize - m_fftOverlap);
timeScaleDiv *= m_fftSize / (float)(m_fftSize - m_fftOverlap);
}
if (!m_invertedWaterfall) {
@ -2828,7 +2828,7 @@ void GLSpectrumView::applyChanges()
float timeScaleDiv = ((float)m_sampleRate / (float)m_timingRate);
if (m_fftSize > m_fftOverlap) {
timeScaleDiv *= m_fftSize / (m_fftSize - m_fftOverlap);
timeScaleDiv *= m_fftSize / (float)(m_fftSize - m_fftOverlap);
}
if (!m_invertedWaterfall) {