From 6b19ed665e25721c16d1f0ea5cb1929ee9c4595b Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 22 Sep 2019 23:58:49 +0200 Subject: [PATCH] Ref T730, added settings in AFV client --- src/blackcore/afv/clients/afvclient.cpp | 7 +++++++ src/blackcore/afv/clients/afvclient.h | 13 +++++++++---- src/blackmisc/audio/settings/voicesettings.h | 1 + 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/blackcore/afv/clients/afvclient.cpp b/src/blackcore/afv/clients/afvclient.cpp index f05cc660e..c9ecb1f6c 100644 --- a/src/blackcore/afv/clients/afvclient.cpp +++ b/src/blackcore/afv/clients/afvclient.cpp @@ -19,6 +19,7 @@ using namespace BlackMisc; using namespace BlackMisc::Audio; using namespace BlackMisc::PhysicalQuantities; using namespace BlackMisc::Simulation; +using namespace BlackSound; using namespace BlackSound::SampleProvider; namespace BlackCore @@ -405,6 +406,12 @@ namespace BlackCore return {}; } + void CAfvClient::onSettingsChanged() + { + CSettings audioSettings = m_audioSettings.get(); + + } + void CAfvClient::updateTransceiversFromContext(const CSimulatedAircraft &aircraft, const CIdentifier &originator) { Q_UNUSED(originator) diff --git a/src/blackcore/afv/clients/afvclient.h b/src/blackcore/afv/clients/afvclient.h index 269783dd5..bf4d74cf1 100644 --- a/src/blackcore/afv/clients/afvclient.h +++ b/src/blackcore/afv/clients/afvclient.h @@ -11,18 +11,20 @@ #ifndef BLACKCORE_AFV_CLIENT_AFVCLIENT_H #define BLACKCORE_AFV_CLIENT_AFVCLIENT_H +#include "blackcore/context/contextownaircraft.h" #include "blackcore/afv/connection/clientconnection.h" #include "blackcore/afv/audio/input.h" #include "blackcore/afv/audio/output.h" #include "blackcore/afv/audio/soundcardsampleprovider.h" #include "blackcore/afv/dto.h" - -#include "blackcore/context/contextownaircraft.h" #include "blackcore/blackcoreexport.h" -#include "blackmisc/audio/ptt.h" #include "blacksound/sampleprovider/volumesampleprovider.h" +#include "blackmisc/settingscache.h" +#include "blackmisc/audio/audiosettings.h" +#include "blackmisc/audio/ptt.h" + #include #include #include @@ -127,6 +129,7 @@ namespace BlackCore QString getReceivingCallsignsCom2(); void input_OpusDataAvailable(); + void onSettingsChanged(); void updateTransceivers(); void updateTransceiversFromContext(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const BlackMisc::CIdentifier &originator); @@ -164,9 +167,11 @@ namespace BlackCore QVector m_transceivers; QSet m_enabledTransceivers; - Audio::InputVolumeStreamArgs m_inputVolumeStream; + Audio::InputVolumeStreamArgs m_inputVolumeStream; Audio::OutputVolumeStreamArgs m_outputVolumeStream; + BlackMisc::CSetting m_audioSettings { this, &CAfvClient::onSettingsChanged }; + void initWithContext(); static bool hasContext(); diff --git a/src/blackmisc/audio/settings/voicesettings.h b/src/blackmisc/audio/settings/voicesettings.h index e044850b0..9afe83e3c 100644 --- a/src/blackmisc/audio/settings/voicesettings.h +++ b/src/blackmisc/audio/settings/voicesettings.h @@ -22,6 +22,7 @@ namespace BlackMisc namespace Settings { //! Voice settings + //! \deprecated Voice VATLIB specifics struct TVoiceSetup : public TSettingTrait { //! \copydoc BlackMisc::TSettingTrait::key