mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-31 15:07:12 -04:00
AMBE feature: cleanup of main application AMBE support
This commit is contained in:
parent
bd4c633e9d
commit
3880a0f98f
@ -92,7 +92,7 @@ void DSDDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
|
||||
|
||||
m_scopeSampleBuffer.clear();
|
||||
|
||||
m_dsdDecoder.enableMbelib(!DSPEngine::instance()->hasDVSerialSupport()); // disable mbelib if DV serial support is present and activated else enable it
|
||||
m_dsdDecoder.enableMbelib(!m_ambeFeature); // disable mbelib if DV serial support is present and activated else enable it
|
||||
|
||||
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
||||
{
|
||||
@ -281,7 +281,6 @@ void DSDDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
|
||||
}
|
||||
|
||||
if (!m_ambeFeature)
|
||||
// if (!DSPEngine::instance()->hasDVSerialSupport())
|
||||
{
|
||||
if (m_settings.m_slot1On)
|
||||
{
|
||||
|
@ -52,8 +52,6 @@ set(sdrbase_SERIALDV_LIB ${LIBSERIALDV_LIBRARY})
|
||||
|
||||
set(sdrbase_SOURCES
|
||||
${sdrbase_SOURCES}
|
||||
ambe/ambeengine.cpp
|
||||
ambe/ambeworker.cpp
|
||||
|
||||
audio/audiocompressor.cpp
|
||||
audio/audiocompressorsnd.cpp
|
||||
@ -227,8 +225,6 @@ set(sdrbase_SOURCES
|
||||
|
||||
set(sdrbase_HEADERS
|
||||
${sdrbase_HEADERS}
|
||||
ambe/ambeengine.h
|
||||
ambe/ambeworker.h
|
||||
|
||||
audio/audiocompressor.h
|
||||
audio/audiocompressorsnd.h
|
||||
|
@ -168,37 +168,6 @@ void DSPEngine::removeDeviceEngineAt(int deviceIndex)
|
||||
m_deviceEngineReferences.removeAt(deviceIndex);
|
||||
}
|
||||
|
||||
bool DSPEngine::hasDVSerialSupport()
|
||||
{
|
||||
return m_ambeEngine.getNbDevices() > 0;
|
||||
}
|
||||
|
||||
void DSPEngine::setDVSerialSupport(bool support)
|
||||
{ (void) support; }
|
||||
|
||||
void DSPEngine::getDVSerialNames(std::vector<std::string>& deviceNames)
|
||||
{
|
||||
std::vector<QString> qDeviceRefs;
|
||||
m_ambeEngine.getDeviceRefs(qDeviceRefs);
|
||||
deviceNames.clear();
|
||||
|
||||
for (std::vector<QString>::const_iterator it = qDeviceRefs.begin(); it != qDeviceRefs.end(); ++it) {
|
||||
deviceNames.push_back(it->toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
void DSPEngine::pushMbeFrame(
|
||||
const unsigned char *mbeFrame,
|
||||
int mbeRateIndex,
|
||||
int mbeVolumeIndex,
|
||||
unsigned char channels,
|
||||
bool useHP,
|
||||
int upsampling,
|
||||
AudioFifo *audioFifo)
|
||||
{
|
||||
m_ambeEngine.pushMbeFrame(mbeFrame, mbeRateIndex, mbeVolumeIndex, channels, useHP, upsampling, audioFifo);
|
||||
}
|
||||
|
||||
void DSPEngine::createFFTFactory(const QString& fftWisdomFileName)
|
||||
{
|
||||
m_fftFactory = new FFTFactory(fftWisdomFileName);
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "audio/audiodevicemanager.h"
|
||||
#include "audio/audiooutputdevice.h"
|
||||
#include "export.h"
|
||||
#include "ambe/ambeengine.h"
|
||||
|
||||
class DSPDeviceSourceEngine;
|
||||
class DSPDeviceSinkEngine;
|
||||
@ -55,7 +54,6 @@ public:
|
||||
void removeDeviceEngineAt(int deviceIndex);
|
||||
|
||||
AudioDeviceManager *getAudioDeviceManager() { return &m_audioDeviceManager; }
|
||||
AMBEEngine *getAMBEEngine() { return &m_ambeEngine; }
|
||||
|
||||
uint32_t getDeviceSourceEnginesNumber() const { return m_deviceSourceEngines.size(); }
|
||||
DSPDeviceSourceEngine *getDeviceSourceEngineByIndex(unsigned int deviceIndex) { return m_deviceSourceEngines[deviceIndex]; }
|
||||
@ -66,20 +64,6 @@ public:
|
||||
uint32_t getDeviceMIMOEnginesNumber() const { return m_deviceMIMOEngines.size(); }
|
||||
DSPDeviceMIMOEngine *getDeviceMIMOEngineByIndex(unsigned int deviceIndex) { return m_deviceMIMOEngines[deviceIndex]; }
|
||||
|
||||
// Serial DV methods:
|
||||
|
||||
bool hasDVSerialSupport();
|
||||
void setDVSerialSupport(bool support);
|
||||
void getDVSerialNames(std::vector<std::string>& deviceNames);
|
||||
void pushMbeFrame(
|
||||
const unsigned char *mbeFrame,
|
||||
int mbeRateIndex,
|
||||
int mbeVolumeIndex,
|
||||
unsigned char channels,
|
||||
bool useHP,
|
||||
int upsampling,
|
||||
AudioFifo *audioFifo);
|
||||
|
||||
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
||||
void setMIMOSupport(bool mimoSupport) { m_mimoSupport = mimoSupport; }
|
||||
bool getMIMOSupport() const { return m_mimoSupport; }
|
||||
@ -109,7 +93,6 @@ private:
|
||||
QTimer m_masterTimer;
|
||||
bool m_dvSerialSupport;
|
||||
bool m_mimoSupport;
|
||||
AMBEEngine m_ambeEngine;
|
||||
FFTFactory *m_fftFactory;
|
||||
};
|
||||
|
||||
|
@ -10,8 +10,7 @@
|
||||
#include "ambe/ambeengine.h"
|
||||
|
||||
MainSettings::MainSettings() :
|
||||
m_audioDeviceManager(nullptr),
|
||||
m_ambeEngine(nullptr)
|
||||
m_audioDeviceManager(nullptr)
|
||||
{
|
||||
resetToDefaults();
|
||||
qInfo("MainSettings::MainSettings: settings file: format: %d location: %s", getFileFormat(), qPrintable(getFileLocation()));
|
||||
@ -60,10 +59,6 @@ void MainSettings::load()
|
||||
m_audioDeviceManager->deserialize(qUncompress(QByteArray::fromBase64(s.value("audio").toByteArray())));
|
||||
}
|
||||
|
||||
if (m_ambeEngine) {
|
||||
m_ambeEngine->deserialize(qUncompress(QByteArray::fromBase64(s.value("ambe").toByteArray())));
|
||||
}
|
||||
|
||||
QStringList groups = s.childGroups();
|
||||
|
||||
for (int i = 0; i < groups.size(); ++i)
|
||||
@ -148,10 +143,6 @@ void MainSettings::save() const
|
||||
s.setValue("audio", qCompress(m_audioDeviceManager->serialize()).toBase64());
|
||||
}
|
||||
|
||||
if (m_ambeEngine) {
|
||||
s.setValue("ambe", qCompress(m_ambeEngine->serialize()).toBase64());
|
||||
}
|
||||
|
||||
QStringList groups = s.childGroups();
|
||||
|
||||
for(int i = 0; i < groups.size(); ++i)
|
||||
|
@ -13,7 +13,6 @@
|
||||
|
||||
class Command;
|
||||
class AudioDeviceManager;
|
||||
class AMBEEngine;
|
||||
|
||||
|
||||
class SDRBASE_API MainSettings : public QObject {
|
||||
@ -183,7 +182,6 @@ public:
|
||||
DeviceUserArgs& getDeviceUserArgs() { return m_hardwareDeviceUserArgs; }
|
||||
const AudioDeviceManager *getAudioDeviceManager() const { return m_audioDeviceManager; }
|
||||
void setAudioDeviceManager(AudioDeviceManager *audioDeviceManager) { m_audioDeviceManager = audioDeviceManager; }
|
||||
void setAMBEEngine(AMBEEngine *ambeEngine) { m_ambeEngine = ambeEngine; }
|
||||
|
||||
signals:
|
||||
void preferenceChanged(int);
|
||||
@ -203,7 +201,6 @@ protected:
|
||||
typedef QList<Configuration*> Configurations;
|
||||
Configurations m_configurations;
|
||||
DeviceUserArgs m_hardwareDeviceUserArgs;
|
||||
AMBEEngine *m_ambeEngine;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SETTINGS_H
|
||||
|
@ -62,8 +62,6 @@ void MainBench::run()
|
||||
testDecimateFI();
|
||||
} else if (m_parser.getTestType() == ParserBench::TestDecimatorsFF) {
|
||||
testDecimateFF();
|
||||
} else if (m_parser.getTestType() == ParserBench::TestAMBE) {
|
||||
testAMBE();
|
||||
} else if (m_parser.getTestType() == ParserBench::TestGolay2312) {
|
||||
testGolay2312();
|
||||
} else {
|
||||
@ -197,19 +195,6 @@ void MainBench::testDecimateFF()
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
void MainBench::testAMBE()
|
||||
{
|
||||
qDebug() << "MainBench::testAMBE";
|
||||
AMBEEngine ambeEngine;
|
||||
std::vector<QString> ambeDevices;
|
||||
ambeEngine.scan(ambeDevices);
|
||||
|
||||
for (std::vector<QString>::const_iterator it = ambeDevices.begin(); it != ambeDevices.end(); ++it) {
|
||||
qDebug("MainBench::testAMBE: detected AMBE device %s", qPrintable(*it));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MainBench::decimateII(const qint16* buf, int len)
|
||||
{
|
||||
SampleVector::iterator it = m_convertBuffer.begin();
|
||||
|
@ -53,7 +53,6 @@ private:
|
||||
void testDecimateIF();
|
||||
void testDecimateFI();
|
||||
void testDecimateFF();
|
||||
void testAMBE();
|
||||
void testGolay2312();
|
||||
void decimateII(const qint16 *buf, int len);
|
||||
void decimateInfII(const qint16 *buf, int len);
|
||||
|
@ -125,8 +125,6 @@ ParserBench::TestType ParserBench::getTestType() const
|
||||
return TestDecimatorsInfII;
|
||||
} else if (m_testStr == "decimatesupii") {
|
||||
return TestDecimatorsSupII;
|
||||
} else if (m_testStr == "ambe") {
|
||||
return TestAMBE;
|
||||
} else if (m_testStr == "golay2312") {
|
||||
return TestGolay2312;
|
||||
} else {
|
||||
|
@ -35,7 +35,6 @@ public:
|
||||
TestDecimatorsFF,
|
||||
TestDecimatorsInfII,
|
||||
TestDecimatorsSupII,
|
||||
TestAMBE,
|
||||
TestGolay2312
|
||||
} TestType;
|
||||
|
||||
|
@ -8,7 +8,6 @@ set(sdrgui_SOURCES
|
||||
mainwindow.cpp
|
||||
gui/aboutdialog.cpp
|
||||
gui/addpresetdialog.cpp
|
||||
gui/ambedevicesdialog.cpp
|
||||
gui/audiodialog.cpp
|
||||
gui/audioselectdialog.cpp
|
||||
gui/basicchannelsettingsdialog.cpp
|
||||
@ -108,7 +107,6 @@ set(sdrgui_HEADERS
|
||||
mainwindow.h
|
||||
gui/aboutdialog.h
|
||||
gui/addpresetdialog.h
|
||||
gui/ambedevicesdialog.h
|
||||
gui/audiodialog.h
|
||||
gui/audioselectdialog.h
|
||||
gui/basicchannelsettingsdialog.h
|
||||
|
@ -116,7 +116,6 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||
m_mainCore->m_masterTabIndex = 0;
|
||||
m_mainCore->m_mainMessageQueue = &m_inputMessageQueue;
|
||||
m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager());
|
||||
m_mainCore->m_settings.setAMBEEngine(m_dspEngine->getAMBEEngine());
|
||||
|
||||
QFontDatabase::addApplicationFont(":/LiberationSans-Regular.ttf");
|
||||
QFontDatabase::addApplicationFont(":/LiberationMono-Regular.ttf");
|
||||
@ -1466,11 +1465,6 @@ void MainWindow::createMenuBar()
|
||||
QAction *fftAction = preferencesMenu->addAction("&FFT...");
|
||||
fftAction->setToolTip("Set FFT cache");
|
||||
QObject::connect(fftAction, &QAction::triggered, this, &MainWindow::on_action_FFT_triggered);
|
||||
#ifndef __APPLE__
|
||||
QAction *ambeAction = preferencesMenu->addAction("A&MBE...");
|
||||
ambeAction->setToolTip("AMBE options");
|
||||
QObject::connect(ambeAction, &QAction::triggered, this, &MainWindow::on_action_AMBE_triggered);
|
||||
#endif
|
||||
QMenu *devicesMenu = preferencesMenu->addMenu("&Devices");
|
||||
QAction *userArgumentsAction = devicesMenu->addAction("&User arguments...");
|
||||
userArgumentsAction->setToolTip("Device custom user arguments");
|
||||
@ -2118,15 +2112,6 @@ void MainWindow::fftWisdomProcessFinished(int exitCode, QProcess::ExitStatus exi
|
||||
m_fftWisdomProcess = nullptr;
|
||||
}
|
||||
|
||||
void MainWindow::on_action_AMBE_triggered()
|
||||
{
|
||||
qDebug("MainWindow::on_action_AMBE_triggered");
|
||||
#ifndef __APPLE__
|
||||
AMBEDevicesDialog ambeDevicesDialog(m_dspEngine->getAMBEEngine(), this);
|
||||
ambeDevicesDialog.exec();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::samplingDeviceChangeHandler(DeviceGUI *deviceGUI, int newDeviceIndex)
|
||||
{
|
||||
int deviceType = (int) deviceGUI->getDeviceType();
|
||||
|
@ -181,7 +181,6 @@ private slots:
|
||||
void on_action_Audio_triggered();
|
||||
void on_action_Logging_triggered();
|
||||
void on_action_FFT_triggered();
|
||||
void on_action_AMBE_triggered();
|
||||
void on_action_My_Position_triggered();
|
||||
void on_action_DeviceUserArguments_triggered();
|
||||
void on_action_commands_triggered();
|
||||
|
@ -51,7 +51,6 @@ MainServer::MainServer(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||
m_mainCore->m_logger = logger;
|
||||
m_mainCore->m_mainMessageQueue = &m_inputMessageQueue;
|
||||
m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager());
|
||||
m_mainCore->m_settings.setAMBEEngine(m_dspEngine->getAMBEEngine());
|
||||
m_mainCore->m_masterTabIndex = -1;
|
||||
|
||||
qDebug() << "MainServer::MainServer: create FFT factory...";
|
||||
|
Loading…
Reference in New Issue
Block a user