diff --git a/plugins/channel/chanalyzer/chanalyzer.cpp b/plugins/channel/chanalyzer/chanalyzer.cpp index 38e88fb49..e1f234d4d 100644 --- a/plugins/channel/chanalyzer/chanalyzer.cpp +++ b/plugins/channel/chanalyzer/chanalyzer.cpp @@ -71,7 +71,7 @@ void ChannelAnalyzer::feed(const SampleVector::const_iterator& begin, const Samp for(SampleVector::const_iterator it = begin; it < end; ++it) { - Complex c(it->real() / 32768.0, it->imag() / 32768.0); + Complex c(it->real() / 32768.0f, it->imag() / 32768.0f); c *= m_nco.nextIQ(); if (m_ssb) diff --git a/plugins/channel/lora/lorademod.cpp b/plugins/channel/lora/lorademod.cpp index 61f0ca1d7..f2d6a23a5 100644 --- a/plugins/channel/lora/lorademod.cpp +++ b/plugins/channel/lora/lorademod.cpp @@ -247,7 +247,7 @@ void LoRaDemod::feed(const SampleVector::const_iterator& begin, const SampleVect for(SampleVector::const_iterator it = begin; it < end; ++it) { - Complex c(it->real() / 32768.0, it->imag() / 32768.0); + Complex c(it->real() / 32768.0f, it->imag() / 32768.0f); c *= m_nco.nextIQ(); if(m_interpolator.interpolate(&m_sampleDistanceRemain, c, &ci)) diff --git a/plugins/channel/tcpsrc/tcpsrc.cpp b/plugins/channel/tcpsrc/tcpsrc.cpp index 3b953a83a..5e4438d35 100644 --- a/plugins/channel/tcpsrc/tcpsrc.cpp +++ b/plugins/channel/tcpsrc/tcpsrc.cpp @@ -85,7 +85,7 @@ void TCPSrc::feed(const SampleVector::const_iterator& begin, const SampleVector: int rescale = 30000 * (1 << m_boost); for(SampleVector::const_iterator it = begin; it < end; ++it) { - Complex c(it->real() / 32768.0, it->imag() / 32768.0); + Complex c(it->real() / 32768.0f, it->imag() / 32768.0f); c *= m_nco.nextIQ(); if(m_interpolator.interpolate(&m_sampleDistanceRemain, c, &ci)) { diff --git a/plugins/channel/wfm/wfmdemod.cpp b/plugins/channel/wfm/wfmdemod.cpp index 57a550de0..9c224d4ee 100644 --- a/plugins/channel/wfm/wfmdemod.cpp +++ b/plugins/channel/wfm/wfmdemod.cpp @@ -80,7 +80,7 @@ void WFMDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto for (SampleVector::const_iterator it = begin; it != end; ++it) { - Complex c(it->real() / 32768.0, it->imag() / 32768.0); + Complex c(it->real() / 32768.0f, it->imag() / 32768.0f); c *= m_nco.nextIQ(); rf_out = m_rfFilter->runFilt(c, &rf); // filter RF before demod diff --git a/sdrbase/dsp/scopevis.cpp b/sdrbase/dsp/scopevis.cpp index 115979833..9bab9af68 100644 --- a/sdrbase/dsp/scopevis.cpp +++ b/sdrbase/dsp/scopevis.cpp @@ -90,7 +90,7 @@ void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVect for(int i = 0; i < count; ++i) { - *it++ = Complex(begin->real() / 32768.0, begin->imag() / 32768.0); + *it++ = Complex(begin->real() / 32768.0f, begin->imag() / 32768.0f); ++begin; } diff --git a/sdrbase/dsp/spectrumvis.cpp b/sdrbase/dsp/spectrumvis.cpp index 3f34dfecc..b8b90763a 100644 --- a/sdrbase/dsp/spectrumvis.cpp +++ b/sdrbase/dsp/spectrumvis.cpp @@ -82,7 +82,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV for (std::size_t i = 0; i < samplesNeeded; ++i, ++begin) { - *it++ = Complex(begin->real() / 32768.0, begin->imag() / 32768.0); + *it++ = Complex(begin->real() / 32768.0f, begin->imag() / 32768.0f); } // apply fft window (and copy from m_fftBuffer to m_fftIn) @@ -141,7 +141,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV // not enough samples for FFT - just fill in new data and return for(std::vector::iterator it = m_fftBuffer.begin() + m_fftBufferFill; begin < end; ++begin) { - *it++ = Complex(begin->real() / 32768.0, begin->imag() / 32768.0); + *it++ = Complex(begin->real() / 32768.0f, begin->imag() / 32768.0f); } m_fftBufferFill += todo; diff --git a/sdrbase/gui/glspectrum.cpp b/sdrbase/gui/glspectrum.cpp index ceda6182a..928f2be10 100644 --- a/sdrbase/gui/glspectrum.cpp +++ b/sdrbase/gui/glspectrum.cpp @@ -353,14 +353,15 @@ void GLSpectrum::updateHistogram(const std::vector& spectrum) quint8* b = m_histogram; quint8* h = m_histogramHoldoff; int sub = 1; + int fftMulSize = 100 * m_fftSize; if(m_decay > 0) sub += m_decay; m_histogramHoldoffCount--; if(m_histogramHoldoffCount <= 0) { - for(int i = 0; i < 100 * m_fftSize; i++) { - if(*b > 20) { + for(int i = 0; i < fftMulSize; i++) { + if((*b>>4) > 0) { // *b > 16 *b = *b - sub; } else if(*b > 0) { if(*h >= sub) {