diff --git a/Readme.md b/Readme.md index 1d3d3ce3b..bc47cc544 100644 --- a/Readme.md +++ b/Readme.md @@ -34,15 +34,14 @@ From version 2 SDRangel can integrate more than one hardware device running conc Transmission or signal generation support for eligible devices (BladeRF and HackRF) is progressively introduced with the following roadmap: - - Phase 1: version 2.2.0: generation to file (File Sink) with AM modulator with simple sine modulation. Fixed sample rate of 48 kS/s (no effective interpolation) - - Phase 2: version 2.2.x: full baseband interpolation chain: in AM modulator and Up Channelizer. + - Phase 1: version 2.2.0: generation to file (File Sink) with AM modulator with simple sine modulation. Fixed sample rate of 48 kS/s (no effective interpolation) + - Phase 2: version 2.2.2: full baseband interpolation chain: in AM modulator and Up Channelizer. - 2.3.0: SDRplay came into play ... - - Phase 3a: version 2.3.1: Improve AM modulator with audio file input - - Phase 3b: version 2.3.x: Improve AM modulator with audio input (Mic) support + - Phase 3: version 2.3.1: Improve AM modulator with audio file input and audio input (Mic) support - Phase 4a: version 2.4.0: FM modulator - Phase 4b: version 2.4.x: WFM modulator - Phase 4c: version 2.4.x: SSB modulator - - phase 5: version 3.0.0: BladeRF and HackRF support including final interpolation stage. + - phase 5: version 3.0.0: BladeRF and HackRF support including final interpolation stage.

Airspy

diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index 03dbbf4fc..7b73374eb 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -35,6 +35,7 @@ MESSAGE_CLASS_DEFINITION(AMMod::MsgReportFileSourceStreamTiming, Message) AMMod::AMMod() : + m_audioFifo(4, 48000), m_settingsMutex(QMutex::Recursive), m_fileSize(0), m_recordLength(0), @@ -52,28 +53,31 @@ AMMod::AMMod() : apply(); - m_audioBuffer.resize(1<<14); - m_audioBufferFill = 0; + //m_audioBuffer.resize(1<<14); + //m_audioBufferFill = 0; m_movingAverage.resize(16, 0); m_volumeAGC.resize(4096, 0.003, 0); m_magsq = 0.0; m_toneNco.setFreq(1000.0, m_config.m_audioSampleRate); + DSPEngine::instance()->addAudioSource(&m_audioFifo); } AMMod::~AMMod() { + DSPEngine::instance()->removeAudioSource(&m_audioFifo); } void AMMod::configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, float modFactor, + int volumeTenths, bool audioMute, bool playLoop) { - Message* cmd = MsgConfigureAMMod::create(rfBandwidth, afBandwidth, modFactor, audioMute, playLoop); + Message* cmd = MsgConfigureAMMod::create(rfBandwidth, afBandwidth, modFactor, volumeTenths, audioMute, playLoop); messageQueue->push(cmd); } @@ -124,6 +128,8 @@ void AMMod::pull(Sample& sample) void AMMod::pullAF(Real& sample) { + int16_t audioSample[2]; + switch (m_afInput) { case AMModInputTone: @@ -158,7 +164,8 @@ void AMMod::pullAF(Real& sample) } break; case AMModInputAudio: - sample = 0.0f; // TODO + m_audioFifo.read(reinterpret_cast(audioSample), 1, 10); + sample = ((audioSample[0] + audioSample[1]) * m_running.m_volumeFactor) / 6553600.0f; break; case AMModInputNone: default: @@ -205,6 +212,7 @@ bool AMMod::handleMessage(const Message& cmd) m_config.m_rfBandwidth = cfg.getRFBandwidth(); m_config.m_afBandwidth = cfg.getAFBandwidth(); m_config.m_modFactor = cfg.getModFactor(); + m_config.m_volumeFactor = cfg.getVolumeFactor(); m_config.m_audioMute = cfg.getAudioMute(); m_config.m_playLoop = cfg.getPlayLoop(); @@ -214,6 +222,7 @@ bool AMMod::handleMessage(const Message& cmd) << " m_rfBandwidth: " << m_config.m_rfBandwidth << " m_afBandwidth: " << m_config.m_afBandwidth << " m_modFactor: " << m_config.m_modFactor + << " m_volumeFactor: " << m_config.m_volumeFactor << " m_audioMute: " << m_config.m_audioMute << " m_playLoop: " << m_config.m_playLoop; @@ -298,6 +307,7 @@ void AMMod::apply() m_running.m_rfBandwidth = m_config.m_rfBandwidth; m_running.m_afBandwidth = m_config.m_afBandwidth; m_running.m_modFactor = m_config.m_modFactor; + m_running.m_volumeFactor = m_config.m_volumeFactor; m_running.m_audioSampleRate = m_config.m_audioSampleRate; m_running.m_audioMute = m_config.m_audioMute; m_running.m_playLoop = m_config.m_playLoop; diff --git a/plugins/channeltx/modam/ammod.h b/plugins/channeltx/modam/ammod.h index d5e714b6b..cb7821e02 100644 --- a/plugins/channeltx/modam/ammod.h +++ b/plugins/channeltx/modam/ammod.h @@ -174,7 +174,7 @@ public: AMMod(); ~AMMod(); - void configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, float modFactor, bool audioMute, bool playLoop); + void configure(MessageQueue* messageQueue, Real rfBandwidth, Real afBandwidth, float modFactor, int volumeFactor, bool audioMute, bool playLoop); virtual void pull(Sample& sample); virtual void start(); @@ -192,26 +192,29 @@ private: Real getRFBandwidth() const { return m_rfBandwidth; } Real getAFBandwidth() const { return m_afBandwidth; } float getModFactor() const { return m_modFactor; } + int getVolumeFactor() const { return m_volumeFactor; } bool getAudioMute() const { return m_audioMute; } bool getPlayLoop() const { return m_playLoop; } - static MsgConfigureAMMod* create(Real rfBandwidth, Real afBandwidth, float modFactor, bool audioMute, bool playLoop) + static MsgConfigureAMMod* create(Real rfBandwidth, Real afBandwidth, float modFactor, int volumeFactor, bool audioMute, bool playLoop) { - return new MsgConfigureAMMod(rfBandwidth, afBandwidth, modFactor, audioMute, playLoop); + return new MsgConfigureAMMod(rfBandwidth, afBandwidth, modFactor, volumeFactor, audioMute, playLoop); } private: Real m_rfBandwidth; Real m_afBandwidth; float m_modFactor; + int m_volumeFactor; bool m_audioMute; bool m_playLoop; - MsgConfigureAMMod(Real rfBandwidth, Real afBandwidth, float modFactor, bool audioMute, bool playLoop) : + MsgConfigureAMMod(Real rfBandwidth, Real afBandwidth, float modFactor, int volumeFactor, bool audioMute, bool playLoop) : Message(), m_rfBandwidth(rfBandwidth), m_afBandwidth(afBandwidth), m_modFactor(modFactor), + m_volumeFactor(volumeFactor), m_audioMute(audioMute), m_playLoop(playLoop) { } @@ -236,6 +239,7 @@ private: Real m_rfBandwidth; Real m_afBandwidth; float m_modFactor; + int m_volumeFactor; quint32 m_audioSampleRate; bool m_audioMute; bool m_playLoop; @@ -246,6 +250,7 @@ private: m_rfBandwidth(-1), m_afBandwidth(-1), m_modFactor(0.2f), + m_volumeFactor(20), m_audioSampleRate(0), m_audioMute(false), m_playLoop(false) @@ -270,8 +275,8 @@ private: MovingAverage m_movingAverage; SimpleAGC m_volumeAGC; - AudioVector m_audioBuffer; - uint m_audioBufferFill; + //AudioVector m_audioBuffer; + //uint m_audioBufferFill; AudioFifo m_audioFifo; SampleVector m_sampleBuffer; diff --git a/plugins/channeltx/modam/ammodgui.cpp b/plugins/channeltx/modam/ammodgui.cpp index dc3045531..de3a1e2f9 100644 --- a/plugins/channeltx/modam/ammodgui.cpp +++ b/plugins/channeltx/modam/ammodgui.cpp @@ -77,6 +77,7 @@ void AMModGUI::resetToDefaults() ui->rfBW->setValue(6); ui->afBW->setValue(3); ui->modPercent->setValue(20); + ui->micVolume->setValue(50); ui->deltaFrequency->setValue(0); blockApplySettings(false); @@ -219,6 +220,12 @@ void AMModGUI::on_modPercent_valueChanged(int value) applySettings(); } +void AMModGUI::on_micVolume_valueChanged(int value) +{ + ui->micVolumeText->setText(QString("%1").arg(value)); + applySettings(); +} + void AMModGUI::on_audioMute_toggled(bool checked) { applySettings(); @@ -391,6 +398,7 @@ void AMModGUI::applySettings() m_rfBW[ui->rfBW->value()], ui->afBW->value() * 1000.0, ui->modPercent->value() / 100.0f, + ui->micVolume->value(), ui->audioMute->isChecked(), ui->playLoop->isChecked()); } diff --git a/plugins/channeltx/modam/ammodgui.h b/plugins/channeltx/modam/ammodgui.h index fdbee0449..319664c66 100644 --- a/plugins/channeltx/modam/ammodgui.h +++ b/plugins/channeltx/modam/ammodgui.h @@ -63,6 +63,7 @@ private slots: void on_rfBW_valueChanged(int value); void on_afBW_valueChanged(int value); void on_modPercent_valueChanged(int value); + void on_micVolume_valueChanged(int value); void on_audioMute_toggled(bool checked); void on_tone_toggled(bool checked); void on_mic_toggled(bool checked); diff --git a/plugins/channeltx/modam/ammodgui.ui b/plugins/channeltx/modam/ammodgui.ui index da4399fe4..41c0519bb 100644 --- a/plugins/channeltx/modam/ammodgui.ui +++ b/plugins/channeltx/modam/ammodgui.ui @@ -6,8 +6,8 @@ 0 0 - 261 - 180 + 266 + 190 @@ -27,7 +27,7 @@ 10 10 - 241 + 251 161 @@ -38,16 +38,7 @@ 3 - - 2 - - - 2 - - - 2 - - + 2 @@ -276,6 +267,18 @@ + + + 0 + 0 + + + + + 0 + 0 + + Modulation percentage @@ -297,7 +300,7 @@ - 50 + 30 0 @@ -309,6 +312,57 @@ + + + + Qt::Vertical + + + + + + + + 24 + 24 + + + + Audio input volume + + + 100 + + + 1 + + + 50 + + + + + + + + 30 + 0 + + + + Audio input volume level + + + + + + 50 + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + diff --git a/plugins/samplesink/filesink/filesinkgui.cpp b/plugins/samplesink/filesink/filesinkgui.cpp index 3475f5c18..1381afa8c 100644 --- a/plugins/samplesink/filesink/filesinkgui.cpp +++ b/plugins/samplesink/filesink/filesinkgui.cpp @@ -266,13 +266,14 @@ void FileSinkGui::on_startStop_toggled(bool checked) { qDebug("FileSinkGui::on_startStop_toggled: device start failed"); } -// DSPEngine::instance()->startAudio(); // TODO: activate when audio input is available + + DSPEngine::instance()->startAudioInput(); } } else { m_deviceAPI->stopGeneration(); -// DSPEngine::instance()->stopAudio(); // TODO: activate when audio input is available + DSPEngine::instance()->stopAudioInput(); } } diff --git a/plugins/samplesource/airspy/airspygui.cpp b/plugins/samplesource/airspy/airspygui.cpp index 5950c0442..cff37abaf 100644 --- a/plugins/samplesource/airspy/airspygui.cpp +++ b/plugins/samplesource/airspy/airspygui.cpp @@ -351,13 +351,13 @@ void AirspyGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/bladerf/bladerfgui.cpp b/plugins/samplesource/bladerf/bladerfgui.cpp index 669a5e84e..f503c59dc 100644 --- a/plugins/samplesource/bladerf/bladerfgui.cpp +++ b/plugins/samplesource/bladerf/bladerfgui.cpp @@ -358,13 +358,13 @@ void BladerfGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index 4a880bd47..41b59210a 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -428,13 +428,13 @@ void FCDProGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp index 3758f385e..85fb2ebeb 100644 --- a/plugins/samplesource/fcdproplus/fcdproplusgui.cpp +++ b/plugins/samplesource/fcdproplus/fcdproplusgui.cpp @@ -292,13 +292,13 @@ void FCDProPlusGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/filesource/filesourcegui.cpp b/plugins/samplesource/filesource/filesourcegui.cpp index 3bc10e1fc..c5e533f4f 100644 --- a/plugins/samplesource/filesource/filesourcegui.cpp +++ b/plugins/samplesource/filesource/filesourcegui.cpp @@ -221,13 +221,13 @@ void FileSourceGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/hackrf/hackrfgui.cpp b/plugins/samplesource/hackrf/hackrfgui.cpp index 07ecea935..af810f348 100644 --- a/plugins/samplesource/hackrf/hackrfgui.cpp +++ b/plugins/samplesource/hackrf/hackrfgui.cpp @@ -334,13 +334,13 @@ void HackRFGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp index b8507a870..8b57645d6 100644 --- a/plugins/samplesource/rtlsdr/rtlsdrgui.cpp +++ b/plugins/samplesource/rtlsdr/rtlsdrgui.cpp @@ -318,13 +318,13 @@ void RTLSDRGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp index 6412b7a59..0b215ab9f 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp +++ b/plugins/samplesource/sdrdaemon/sdrdaemongui.cpp @@ -589,13 +589,13 @@ void SDRdaemonGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp index cea41a000..c51f68e35 100644 --- a/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp +++ b/plugins/samplesource/sdrdaemonfec/sdrdaemonfecgui.cpp @@ -547,13 +547,13 @@ void SDRdaemonFECGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/plugins/samplesource/sdrplay/sdrplaygui.cpp b/plugins/samplesource/sdrplay/sdrplaygui.cpp index 5b07a7e46..9e80aba95 100644 --- a/plugins/samplesource/sdrplay/sdrplaygui.cpp +++ b/plugins/samplesource/sdrplay/sdrplaygui.cpp @@ -453,13 +453,13 @@ void SDRPlayGui::on_startStop_toggled(bool checked) if (m_deviceAPI->initAcquisition()) { m_deviceAPI->startAcquisition(); - DSPEngine::instance()->startAudio(); + DSPEngine::instance()->startAudioOutput(); } } else { m_deviceAPI->stopAcquisition(); - DSPEngine::instance()->stopAudio(); + DSPEngine::instance()->stopAudioOutput(); } } diff --git a/sdrbase/audio/audioinput.cpp b/sdrbase/audio/audioinput.cpp index 2476d779a..ca84df4b7 100644 --- a/sdrbase/audio/audioinput.cpp +++ b/sdrbase/audio/audioinput.cpp @@ -96,7 +96,7 @@ bool AudioInput::start(int device, int rate) m_audioInput = new QAudioInput(devInfo, m_audioFormat); - QIODevice::open(QIODevice::ReadOnly); + QIODevice::open(QIODevice::ReadWrite); m_audioInput->start(this); diff --git a/sdrbase/dsp/dspengine.cpp b/sdrbase/dsp/dspengine.cpp index d077c7579..33ba68231 100644 --- a/sdrbase/dsp/dspengine.cpp +++ b/sdrbase/dsp/dspengine.cpp @@ -26,7 +26,8 @@ DSPEngine::DSPEngine() : m_deviceSourceEnginesUIDSequence(0), m_deviceSinkEnginesUIDSequence(0), - m_audioSampleRate(48000) // Use default output device at 48 kHz + m_audioOutputSampleRate(48000), // Use default output device at 48 kHz + m_audioInputSampleRate(48000) // Use default input device at 48 kHz { m_dvSerialSupport = false; } @@ -86,28 +87,50 @@ void DSPEngine::removeLastDeviceSinkEngine() } } -void DSPEngine::startAudio() +void DSPEngine::startAudioOutput() { - m_audioOutput.start(-1, m_audioSampleRate); - m_audioSampleRate = m_audioOutput.getRate(); // update with actual rate + m_audioOutput.start(-1, m_audioOutputSampleRate); + m_audioOutputSampleRate = m_audioOutput.getRate(); // update with actual rate } -void DSPEngine::stopAudio() +void DSPEngine::stopAudioOutput() { m_audioOutput.stop(); } -void DSPEngine::startAudioImmediate() +void DSPEngine::startAudioOutputImmediate() { - m_audioOutput.start(-1, m_audioSampleRate); - m_audioSampleRate = m_audioOutput.getRate(); // update with actual rate + m_audioOutput.start(-1, m_audioOutputSampleRate); + m_audioOutputSampleRate = m_audioOutput.getRate(); // update with actual rate } -void DSPEngine::stopAudioImmediate() +void DSPEngine::stopAudioOutputImmediate() { m_audioOutput.stop(); } +void DSPEngine::startAudioInput() +{ + m_audioInput.start(-1, m_audioInputSampleRate); + m_audioInputSampleRate = m_audioInput.getRate(); // update with actual rate +} + +void DSPEngine::stopAudioInput() +{ + m_audioInput.stop(); +} + +void DSPEngine::startAudioInputImmediate() +{ + m_audioInput.start(-1, m_audioInputSampleRate); + m_audioInputSampleRate = m_audioInput.getRate(); // update with actual rate +} + +void DSPEngine::stopAudioInputImmediate() +{ + m_audioInput.stop(); +} + void DSPEngine::addAudioSink(AudioFifo* audioFifo) { qDebug("DSPEngine::addAudioSink"); @@ -120,6 +143,18 @@ void DSPEngine::removeAudioSink(AudioFifo* audioFifo) m_audioOutput.removeFifo(audioFifo); } +void DSPEngine::addAudioSource(AudioFifo* audioFifo) +{ + qDebug("DSPEngine::addAudioSource"); + m_audioInput.addFifo(audioFifo); +} + +void DSPEngine::removeAudioSource(AudioFifo* audioFifo) +{ + qDebug("DSPEngine::removeAudioSource"); + m_audioInput.removeFifo(audioFifo); +} + DSPDeviceSourceEngine *DSPEngine::getDeviceSourceEngineByUID(uint uid) { std::vector::iterator it = m_deviceSourceEngines.begin(); diff --git a/sdrbase/dsp/dspengine.h b/sdrbase/dsp/dspengine.h index 5ec543ef7..3a9db7665 100644 --- a/sdrbase/dsp/dspengine.h +++ b/sdrbase/dsp/dspengine.h @@ -21,6 +21,7 @@ #include #include #include "audio/audiooutput.h" +#include "audio/audioinput.h" #include "util/export.h" #ifdef DSD_USE_SERIALDV #include "dsp/dvserialengine.h" @@ -37,7 +38,7 @@ public: static DSPEngine *instance(); - uint getAudioSampleRate() const { return m_audioSampleRate; } + uint getAudioSampleRate() const { return m_audioOutputSampleRate; } DSPDeviceSourceEngine *addDeviceSourceEngine(); void removeLastDeviceSourceEngine(); @@ -45,10 +46,15 @@ public: DSPDeviceSinkEngine *addDeviceSinkEngine(); void removeLastDeviceSinkEngine(); - void startAudio(); - void stopAudio(); - void startAudioImmediate(); - void stopAudioImmediate(); + void startAudioOutput(); + void stopAudioOutput(); + void startAudioOutputImmediate(); + void stopAudioOutputImmediate(); + + void startAudioInput(); + void stopAudioInput(); + void startAudioInputImmediate(); + void stopAudioInputImmediate(); DSPDeviceSourceEngine *getDeviceSourceEngineByIndex(uint deviceIndex) { return m_deviceSourceEngines[deviceIndex]; } DSPDeviceSourceEngine *getDeviceSourceEngineByUID(uint uid); @@ -59,6 +65,9 @@ public: void addAudioSink(AudioFifo* audioFifo); //!< Add the audio sink void removeAudioSink(AudioFifo* audioFifo); //!< Remove the audio sink + void addAudioSource(AudioFifo* audioFifo); //!< Add an audio source + void removeAudioSource(AudioFifo* audioFifo); //!< Remove an audio source + // Serial DV methods: bool hasDVSerialSupport() @@ -92,7 +101,9 @@ private: std::vector m_deviceSinkEngines; uint m_deviceSinkEnginesUIDSequence; AudioOutput m_audioOutput; - uint m_audioSampleRate; + AudioInput m_audioInput; + uint m_audioOutputSampleRate; + uint m_audioInputSampleRate; bool m_dvSerialSupport; #ifdef DSD_USE_SERIALDV DVSerialEngine m_dvSerialEngine;