1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

Audio CAT SISO: removed reference to Audio input and output devices

This commit is contained in:
f4exb 2023-07-10 11:49:52 +02:00
parent df917bb489
commit 249cb476c0
4 changed files with 25 additions and 5 deletions

View File

@ -488,7 +488,8 @@ void AudioCATSISO::applySettings(const AudioCATSISOSettings& settings, const QLi
if (settingsKeys.contains("rxVolume") || force)
{
m_audioInput.setVolume(settings.m_rxVolume);
AudioDeviceManager *audioDeviceManager = DSPEngine::instance()->getAudioDeviceManager();
audioDeviceManager->setInputDeviceVolume(settings.m_rxVolume, m_rxAudioDeviceIndex);
qDebug() << "AudioCATSISO::applySettings: set Rx volume to " << settings.m_rxVolume;
}

View File

@ -25,8 +25,6 @@
#include <QThread>
#include "dsp/devicesamplemimo.h"
#include "audio/audioinputdevice.h"
#include "audio/audiooutputdevice.h"
#include "audio/audiofifo.h"
#include "audiocatsisosettings.h"
#include "audiocatsisohamlib.h"
@ -161,9 +159,7 @@ private:
};
DeviceAPI *m_deviceAPI;
AudioInputDevice m_audioInput;
AudioFifo m_inputFifo;
AudioOutputDevice m_audioOutput;
AudioFifo m_outputFifo;
QMutex m_mutex;
AudioCATSISOSettings m_settings;

View File

@ -839,6 +839,27 @@ void AudioDeviceManager::outputInfosCleanup()
}
}
bool AudioDeviceManager::setInputDeviceVolume(float volume, int inputDeviceIndex)
{
if (m_audioInputs.find(inputDeviceIndex) == m_audioInputs.end()) { // no FIFO registered yet hence no audio input has been allocated yet
return false;
}
m_audioInputs[inputDeviceIndex]->setVolume(volume);
return true;
}
bool AudioDeviceManager::setOutputDeviceVolume(float volume, int outputDeviceIndex)
{
if (m_audioOutputs.find(outputDeviceIndex) == m_audioOutputs.end()) { // no FIFO registered yet hence no audio output has been allocated yet
return false;
}
m_audioOutputs[outputDeviceIndex]->setVolume(volume);
return true;
}
void AudioDeviceManager::debugAudioInputInfos() const
{
QMap<QString, InputDeviceInfo>::const_iterator it = m_audioInputInfos.begin();

View File

@ -124,6 +124,8 @@ public:
void unsetOutputDeviceInfo(int outputDeviceIndex);
void inputInfosCleanup(); //!< Remove input info from map for input devices not present
void outputInfosCleanup(); //!< Remove output info from map for output devices not present
bool setInputDeviceVolume(float volume, int inputDeviceIndex);
bool setOutputDeviceVolume(float volume, int outputDeviceIndex);
static const int m_defaultAudioSampleRate = 48000;
static const float m_defaultAudioInputVolume;