1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-25 11:34:09 -04:00

FFT factory: implementation base

This commit is contained in:
f4exb
2020-03-12 06:27:38 +01:00
parent 495ffda42c
commit 39128c089c
14 changed files with 244 additions and 12 deletions
+17 -1
View File
@@ -23,13 +23,15 @@
#include "dsp/dspdevicesourceengine.h"
#include "dsp/dspdevicesinkengine.h"
#include "dsp/dspdevicemimoengine.h"
#include "dsp/fftfactory.h"
DSPEngine::DSPEngine() :
m_deviceSourceEnginesUIDSequence(0),
m_deviceSinkEnginesUIDSequence(0),
m_deviceMIMOEnginesUIDSequence(0),
m_audioInputDeviceIndex(-1), // default device
m_audioOutputDeviceIndex(-1) // default device
m_audioOutputDeviceIndex(-1), // default device
m_fftFactory(nullptr)
{
m_dvSerialSupport = false;
m_mimoSupport = false;
@@ -45,6 +47,10 @@ DSPEngine::~DSPEngine()
delete *it;
++it;
}
if (m_fftFactory) {
delete m_fftFactory;
}
}
Q_GLOBAL_STATIC(DSPEngine, dspEngine)
@@ -185,3 +191,13 @@ void DSPEngine::pushMbeFrame(
{
m_ambeEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, useHP, upsampling, audioFifo);
}
void DSPEngine::createFFTFactory(const QString& fftWisdomFileName)
{
m_fftFactory = new FFTFactory(fftWisdomFileName);
}
void DSPEngine::preAllocateFFTs()
{
m_fftFactory->preallocate(7, 12, 1, 0); // pre-acllocate forward FFT only 1 per size from 128 to 4096
}