kopia lustrzana https://github.com/f4exb/sdrangel
Audio CAT SISO: removed reference to Audio input and output devices
rodzic
df917bb489
commit
249cb476c0
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Ładowanie…
Reference in New Issue