mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +08:00
[AFV] Ref T739, verify devices
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "blacksound/audioutilities.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
#include "blackmisc/verify.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include "comdef.h"
|
||||
@@ -243,6 +244,9 @@ namespace BlackCore
|
||||
return;
|
||||
}
|
||||
|
||||
BLACK_VERIFY_X(inputDevice.isValid() && inputDevice.isInputDevice(), Q_FUNC_INFO, "Wrong input device");
|
||||
BLACK_VERIFY_X(outputDevice.isValid() && outputDevice.isOutputDevice(), Q_FUNC_INFO, "Wrong output device");
|
||||
|
||||
if (m_isStarted)
|
||||
{
|
||||
if (this->usesSameDevices(inputDevice, outputDevice))
|
||||
@@ -829,8 +833,11 @@ namespace BlackCore
|
||||
void CAfvClient::onSettingsChanged()
|
||||
{
|
||||
const CSettings audioSettings = m_audioSettings.get();
|
||||
this->setNormalizedInputVolume(audioSettings.getInVolume());
|
||||
this->setNormalizedOutputVolume(audioSettings.getOutVolume());
|
||||
const int iv = audioSettings.getInVolume();
|
||||
const int ov = audioSettings.getOutVolume();
|
||||
|
||||
this->setNormalizedInputVolume(iv);
|
||||
this->setNormalizedOutputVolume(ov);
|
||||
this->setBypassEffects(!audioSettings.isAudioEffectsEnabled());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user