1
0
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:
f4exb 2022-05-25 00:13:40 +02:00
parent bd4c633e9d
commit 3880a0f98f
14 changed files with 2 additions and 105 deletions

View File

@ -92,7 +92,7 @@ void DSDDemodSink::feed(const SampleVector::const_iterator& begin, const SampleV
m_scopeSampleBuffer.clear(); 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) 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 (!m_ambeFeature)
// if (!DSPEngine::instance()->hasDVSerialSupport())
{ {
if (m_settings.m_slot1On) if (m_settings.m_slot1On)
{ {

View File

@ -52,8 +52,6 @@ set(sdrbase_SERIALDV_LIB ${LIBSERIALDV_LIBRARY})
set(sdrbase_SOURCES set(sdrbase_SOURCES
${sdrbase_SOURCES} ${sdrbase_SOURCES}
ambe/ambeengine.cpp
ambe/ambeworker.cpp
audio/audiocompressor.cpp audio/audiocompressor.cpp
audio/audiocompressorsnd.cpp audio/audiocompressorsnd.cpp
@ -227,8 +225,6 @@ set(sdrbase_SOURCES
set(sdrbase_HEADERS set(sdrbase_HEADERS
${sdrbase_HEADERS} ${sdrbase_HEADERS}
ambe/ambeengine.h
ambe/ambeworker.h
audio/audiocompressor.h audio/audiocompressor.h
audio/audiocompressorsnd.h audio/audiocompressorsnd.h

View File

@ -168,37 +168,6 @@ void DSPEngine::removeDeviceEngineAt(int deviceIndex)
m_deviceEngineReferences.removeAt(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) void DSPEngine::createFFTFactory(const QString& fftWisdomFileName)
{ {
m_fftFactory = new FFTFactory(fftWisdomFileName); m_fftFactory = new FFTFactory(fftWisdomFileName);

View File

@ -26,7 +26,6 @@
#include "audio/audiodevicemanager.h" #include "audio/audiodevicemanager.h"
#include "audio/audiooutputdevice.h" #include "audio/audiooutputdevice.h"
#include "export.h" #include "export.h"
#include "ambe/ambeengine.h"
class DSPDeviceSourceEngine; class DSPDeviceSourceEngine;
class DSPDeviceSinkEngine; class DSPDeviceSinkEngine;
@ -55,7 +54,6 @@ public:
void removeDeviceEngineAt(int deviceIndex); void removeDeviceEngineAt(int deviceIndex);
AudioDeviceManager *getAudioDeviceManager() { return &m_audioDeviceManager; } AudioDeviceManager *getAudioDeviceManager() { return &m_audioDeviceManager; }
AMBEEngine *getAMBEEngine() { return &m_ambeEngine; }
uint32_t getDeviceSourceEnginesNumber() const { return m_deviceSourceEngines.size(); } uint32_t getDeviceSourceEnginesNumber() const { return m_deviceSourceEngines.size(); }
DSPDeviceSourceEngine *getDeviceSourceEngineByIndex(unsigned int deviceIndex) { return m_deviceSourceEngines[deviceIndex]; } DSPDeviceSourceEngine *getDeviceSourceEngineByIndex(unsigned int deviceIndex) { return m_deviceSourceEngines[deviceIndex]; }
@ -66,20 +64,6 @@ public:
uint32_t getDeviceMIMOEnginesNumber() const { return m_deviceMIMOEngines.size(); } uint32_t getDeviceMIMOEnginesNumber() const { return m_deviceMIMOEngines.size(); }
DSPDeviceMIMOEngine *getDeviceMIMOEngineByIndex(unsigned int deviceIndex) { return m_deviceMIMOEngines[deviceIndex]; } 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; } const QTimer& getMasterTimer() const { return m_masterTimer; }
void setMIMOSupport(bool mimoSupport) { m_mimoSupport = mimoSupport; } void setMIMOSupport(bool mimoSupport) { m_mimoSupport = mimoSupport; }
bool getMIMOSupport() const { return m_mimoSupport; } bool getMIMOSupport() const { return m_mimoSupport; }
@ -109,7 +93,6 @@ private:
QTimer m_masterTimer; QTimer m_masterTimer;
bool m_dvSerialSupport; bool m_dvSerialSupport;
bool m_mimoSupport; bool m_mimoSupport;
AMBEEngine m_ambeEngine;
FFTFactory *m_fftFactory; FFTFactory *m_fftFactory;
}; };

View File

@ -10,8 +10,7 @@
#include "ambe/ambeengine.h" #include "ambe/ambeengine.h"
MainSettings::MainSettings() : MainSettings::MainSettings() :
m_audioDeviceManager(nullptr), m_audioDeviceManager(nullptr)
m_ambeEngine(nullptr)
{ {
resetToDefaults(); resetToDefaults();
qInfo("MainSettings::MainSettings: settings file: format: %d location: %s", getFileFormat(), qPrintable(getFileLocation())); 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()))); 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(); QStringList groups = s.childGroups();
for (int i = 0; i < groups.size(); ++i) for (int i = 0; i < groups.size(); ++i)
@ -148,10 +143,6 @@ void MainSettings::save() const
s.setValue("audio", qCompress(m_audioDeviceManager->serialize()).toBase64()); s.setValue("audio", qCompress(m_audioDeviceManager->serialize()).toBase64());
} }
if (m_ambeEngine) {
s.setValue("ambe", qCompress(m_ambeEngine->serialize()).toBase64());
}
QStringList groups = s.childGroups(); QStringList groups = s.childGroups();
for(int i = 0; i < groups.size(); ++i) for(int i = 0; i < groups.size(); ++i)

View File

@ -13,7 +13,6 @@
class Command; class Command;
class AudioDeviceManager; class AudioDeviceManager;
class AMBEEngine;
class SDRBASE_API MainSettings : public QObject { class SDRBASE_API MainSettings : public QObject {
@ -183,7 +182,6 @@ public:
DeviceUserArgs& getDeviceUserArgs() { return m_hardwareDeviceUserArgs; } DeviceUserArgs& getDeviceUserArgs() { return m_hardwareDeviceUserArgs; }
const AudioDeviceManager *getAudioDeviceManager() const { return m_audioDeviceManager; } const AudioDeviceManager *getAudioDeviceManager() const { return m_audioDeviceManager; }
void setAudioDeviceManager(AudioDeviceManager *audioDeviceManager) { m_audioDeviceManager = audioDeviceManager; } void setAudioDeviceManager(AudioDeviceManager *audioDeviceManager) { m_audioDeviceManager = audioDeviceManager; }
void setAMBEEngine(AMBEEngine *ambeEngine) { m_ambeEngine = ambeEngine; }
signals: signals:
void preferenceChanged(int); void preferenceChanged(int);
@ -203,7 +201,6 @@ protected:
typedef QList<Configuration*> Configurations; typedef QList<Configuration*> Configurations;
Configurations m_configurations; Configurations m_configurations;
DeviceUserArgs m_hardwareDeviceUserArgs; DeviceUserArgs m_hardwareDeviceUserArgs;
AMBEEngine *m_ambeEngine;
}; };
#endif // INCLUDE_SETTINGS_H #endif // INCLUDE_SETTINGS_H

View File

@ -62,8 +62,6 @@ void MainBench::run()
testDecimateFI(); testDecimateFI();
} else if (m_parser.getTestType() == ParserBench::TestDecimatorsFF) { } else if (m_parser.getTestType() == ParserBench::TestDecimatorsFF) {
testDecimateFF(); testDecimateFF();
} else if (m_parser.getTestType() == ParserBench::TestAMBE) {
testAMBE();
} else if (m_parser.getTestType() == ParserBench::TestGolay2312) { } else if (m_parser.getTestType() == ParserBench::TestGolay2312) {
testGolay2312(); testGolay2312();
} else { } else {
@ -197,19 +195,6 @@ void MainBench::testDecimateFF()
delete[] buf; 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) void MainBench::decimateII(const qint16* buf, int len)
{ {
SampleVector::iterator it = m_convertBuffer.begin(); SampleVector::iterator it = m_convertBuffer.begin();

View File

@ -53,7 +53,6 @@ private:
void testDecimateIF(); void testDecimateIF();
void testDecimateFI(); void testDecimateFI();
void testDecimateFF(); void testDecimateFF();
void testAMBE();
void testGolay2312(); void testGolay2312();
void decimateII(const qint16 *buf, int len); void decimateII(const qint16 *buf, int len);
void decimateInfII(const qint16 *buf, int len); void decimateInfII(const qint16 *buf, int len);

View File

@ -125,8 +125,6 @@ ParserBench::TestType ParserBench::getTestType() const
return TestDecimatorsInfII; return TestDecimatorsInfII;
} else if (m_testStr == "decimatesupii") { } else if (m_testStr == "decimatesupii") {
return TestDecimatorsSupII; return TestDecimatorsSupII;
} else if (m_testStr == "ambe") {
return TestAMBE;
} else if (m_testStr == "golay2312") { } else if (m_testStr == "golay2312") {
return TestGolay2312; return TestGolay2312;
} else { } else {

View File

@ -35,7 +35,6 @@ public:
TestDecimatorsFF, TestDecimatorsFF,
TestDecimatorsInfII, TestDecimatorsInfII,
TestDecimatorsSupII, TestDecimatorsSupII,
TestAMBE,
TestGolay2312 TestGolay2312
} TestType; } TestType;

View File

@ -8,7 +8,6 @@ set(sdrgui_SOURCES
mainwindow.cpp mainwindow.cpp
gui/aboutdialog.cpp gui/aboutdialog.cpp
gui/addpresetdialog.cpp gui/addpresetdialog.cpp
gui/ambedevicesdialog.cpp
gui/audiodialog.cpp gui/audiodialog.cpp
gui/audioselectdialog.cpp gui/audioselectdialog.cpp
gui/basicchannelsettingsdialog.cpp gui/basicchannelsettingsdialog.cpp
@ -108,7 +107,6 @@ set(sdrgui_HEADERS
mainwindow.h mainwindow.h
gui/aboutdialog.h gui/aboutdialog.h
gui/addpresetdialog.h gui/addpresetdialog.h
gui/ambedevicesdialog.h
gui/audiodialog.h gui/audiodialog.h
gui/audioselectdialog.h gui/audioselectdialog.h
gui/basicchannelsettingsdialog.h gui/basicchannelsettingsdialog.h

View File

@ -116,7 +116,6 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
m_mainCore->m_masterTabIndex = 0; m_mainCore->m_masterTabIndex = 0;
m_mainCore->m_mainMessageQueue = &m_inputMessageQueue; m_mainCore->m_mainMessageQueue = &m_inputMessageQueue;
m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager()); m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager());
m_mainCore->m_settings.setAMBEEngine(m_dspEngine->getAMBEEngine());
QFontDatabase::addApplicationFont(":/LiberationSans-Regular.ttf"); QFontDatabase::addApplicationFont(":/LiberationSans-Regular.ttf");
QFontDatabase::addApplicationFont(":/LiberationMono-Regular.ttf"); QFontDatabase::addApplicationFont(":/LiberationMono-Regular.ttf");
@ -1466,11 +1465,6 @@ void MainWindow::createMenuBar()
QAction *fftAction = preferencesMenu->addAction("&FFT..."); QAction *fftAction = preferencesMenu->addAction("&FFT...");
fftAction->setToolTip("Set FFT cache"); fftAction->setToolTip("Set FFT cache");
QObject::connect(fftAction, &QAction::triggered, this, &MainWindow::on_action_FFT_triggered); 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"); QMenu *devicesMenu = preferencesMenu->addMenu("&Devices");
QAction *userArgumentsAction = devicesMenu->addAction("&User arguments..."); QAction *userArgumentsAction = devicesMenu->addAction("&User arguments...");
userArgumentsAction->setToolTip("Device custom user arguments"); userArgumentsAction->setToolTip("Device custom user arguments");
@ -2118,15 +2112,6 @@ void MainWindow::fftWisdomProcessFinished(int exitCode, QProcess::ExitStatus exi
m_fftWisdomProcess = nullptr; 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) void MainWindow::samplingDeviceChangeHandler(DeviceGUI *deviceGUI, int newDeviceIndex)
{ {
int deviceType = (int) deviceGUI->getDeviceType(); int deviceType = (int) deviceGUI->getDeviceType();

View File

@ -181,7 +181,6 @@ private slots:
void on_action_Audio_triggered(); void on_action_Audio_triggered();
void on_action_Logging_triggered(); void on_action_Logging_triggered();
void on_action_FFT_triggered(); void on_action_FFT_triggered();
void on_action_AMBE_triggered();
void on_action_My_Position_triggered(); void on_action_My_Position_triggered();
void on_action_DeviceUserArguments_triggered(); void on_action_DeviceUserArguments_triggered();
void on_action_commands_triggered(); void on_action_commands_triggered();

View File

@ -51,7 +51,6 @@ MainServer::MainServer(qtwebapp::LoggerWithFile *logger, const MainParser& parse
m_mainCore->m_logger = logger; m_mainCore->m_logger = logger;
m_mainCore->m_mainMessageQueue = &m_inputMessageQueue; m_mainCore->m_mainMessageQueue = &m_inputMessageQueue;
m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager()); m_mainCore->m_settings.setAudioDeviceManager(m_dspEngine->getAudioDeviceManager());
m_mainCore->m_settings.setAMBEEngine(m_dspEngine->getAMBEEngine());
m_mainCore->m_masterTabIndex = -1; m_mainCore->m_masterTabIndex = -1;
qDebug() << "MainServer::MainServer: create FFT factory..."; qDebug() << "MainServer::MainServer: create FFT factory...";