mirror of https://github.com/f4exb/sdrangel.git
SpectrumVis: release previous FFT engine allocation from FFT factory only if allocated once. Fixes issue #515
This commit is contained in:
parent
42d6732147
commit
cf2c04214b
|
@ -699,7 +699,12 @@ void SpectrumVis::applySettings(const GLSpectrumSettings& settings, bool force)
|
||||||
if ((fftSize != m_settings.m_fftSize) || force)
|
if ((fftSize != m_settings.m_fftSize) || force)
|
||||||
{
|
{
|
||||||
FFTFactory *fftFactory = DSPEngine::instance()->getFFTFactory();
|
FFTFactory *fftFactory = DSPEngine::instance()->getFFTFactory();
|
||||||
|
|
||||||
|
// release previous engine allocation if any
|
||||||
|
if (m_fft) {
|
||||||
fftFactory->releaseEngine(m_settings.m_fftSize, false, m_fftEngineSequence);
|
fftFactory->releaseEngine(m_settings.m_fftSize, false, m_fftEngineSequence);
|
||||||
|
}
|
||||||
|
|
||||||
m_fftEngineSequence = fftFactory->getEngine(fftSize, false, &m_fft);
|
m_fftEngineSequence = fftFactory->getEngine(fftSize, false, &m_fft);
|
||||||
m_ofs = 20.0f * log10f(1.0f / fftSize);
|
m_ofs = 20.0f * log10f(1.0f / fftSize);
|
||||||
m_powFFTDiv = fftSize * fftSize;
|
m_powFFTDiv = fftSize * fftSize;
|
||||||
|
|
Loading…
Reference in New Issue