From 74d87fab82d21ddfc915e04f65a34e3d4d73f285 Mon Sep 17 00:00:00 2001 From: Lars Toenning Date: Mon, 30 Dec 2024 09:32:43 +0100 Subject: [PATCH] refactor: Remove option to disable AFV aliasing --- src/core/afv/clients/afvclient.cpp | 3 --- src/core/afv/clients/afvclient.h | 8 -------- src/core/context/contextaudio.cpp | 17 +++++------------ src/core/context/contextaudio.h | 2 -- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/src/core/afv/clients/afvclient.cpp b/src/core/afv/clients/afvclient.cpp index 4175b2b61..bcdee4fca 100644 --- a/src/core/afv/clients/afvclient.cpp +++ b/src/core/afv/clients/afvclient.cpp @@ -1329,9 +1329,6 @@ namespace swift::core::afv::clients // void rounding issues from float/double quint32 roundedFrequencyHz = static_cast(qRound(frequencyHz / 1000.0)) * 1000; - // disabled? - if (!m_enableAliased) { return roundedFrequencyHz; } - // change to aliased frequency if needed { QMutexLocker lock(&m_mutex); diff --git a/src/core/afv/clients/afvclient.h b/src/core/afv/clients/afvclient.h index f1a0f1833..e653c01f7 100644 --- a/src/core/afv/clients/afvclient.h +++ b/src/core/afv/clients/afvclient.h @@ -179,13 +179,6 @@ namespace swift::core::afv::clients QSet getEnabledTransceivers() const; //! @} - //! @{ - //! Aliased stations enabled? - //! \threadsafe - bool isAliasedStationsEnabled() const { return m_enableAliased; } - void enableAliasedStations(bool enabled) { m_enableAliased = enabled; } - //! @} - //! @{ //! Update frequency //! \threadsafe @@ -411,7 +404,6 @@ namespace swift::core::afv::clients std::atomic_int m_heartBeatFailures { 0 }; //!< voice server heartbeat failures std::atomic_bool m_isStarted { false }; std::atomic_bool m_loopbackOn { false }; - std::atomic_bool m_enableAliased { true }; std::atomic_bool m_winCoInitialized { false }; //!< Windows only CoInitializeEx std::atomic_bool m_integratedComUnit { false }; //!< is COM unit sychronized, integrated? diff --git a/src/core/context/contextaudio.cpp b/src/core/context/contextaudio.cpp index 0cbfc5e29..6fac73d3b 100644 --- a/src/core/context/contextaudio.cpp +++ b/src/core/context/contextaudio.cpp @@ -80,10 +80,11 @@ namespace swift::core::context { Q_UNUSED(originator) if (commandLine.isEmpty()) { return false; } - CSimpleCommandParser parser({ ".vol", ".volume", // output volume - ".mute", // mute - ".unmute", // unmute - ".aliased" }); + CSimpleCommandParser parser({ + ".vol", ".volume", // output volume + ".mute", // mute + ".unmute", // unmute + }); parser.parse(commandLine); if (!parser.isKnownCommand()) { return false; } @@ -103,14 +104,6 @@ namespace swift::core::context this->setMasterOutputVolume(v); return true; } - else if (afvClient() && parser.matchesCommand(".aliased") && parser.countParts() > 1) - { - const bool enable = parser.toBool(1, true); - afvClient()->enableAliasedStations(enable); - - CLogMessage(this).info(u"Aliased stations are: %1") << boolToOnOff(enable); - return true; - } return false; } diff --git a/src/core/context/contextaudio.h b/src/core/context/contextaudio.h index 8e2080fe6..c6354eb68 100644 --- a/src/core/context/contextaudio.h +++ b/src/core/context/contextaudio.h @@ -233,7 +233,6 @@ namespace swift::core swift::misc::CSimpleCommandParser::registerCommand({ ".mute", "mute audio" }); swift::misc::CSimpleCommandParser::registerCommand({ ".unmute", "unmute audio" }); swift::misc::CSimpleCommandParser::registerCommand({ ".vol volume", "volume 0..100" }); - swift::misc::CSimpleCommandParser::registerCommand({ ".aliased on|off", "aliased HF frequencies" }); } // -------- parts which can run in core and GUI, referring to local voice client ------------ @@ -248,7 +247,6 @@ namespace swift::core //! .mute mute swift::core::context::CContextAudioBase //! .unmute unmute swift::core::context::CContextAudioBase //! .vol .volume volume 0..100 set volume swift::core::context::CContextAudioBase - //! .aliased on|off aliased stations swift::core::context::CContextAudioBase //! virtual bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator) override;