refactor: Remove option to disable AFV aliasing

This commit is contained in:
Lars Toenning
2024-12-30 09:32:43 +01:00
parent edbabe34be
commit 74d87fab82
4 changed files with 5 additions and 25 deletions

View File

@@ -1329,9 +1329,6 @@ namespace swift::core::afv::clients
// void rounding issues from float/double // void rounding issues from float/double
quint32 roundedFrequencyHz = static_cast<quint32>(qRound(frequencyHz / 1000.0)) * 1000; quint32 roundedFrequencyHz = static_cast<quint32>(qRound(frequencyHz / 1000.0)) * 1000;
// disabled?
if (!m_enableAliased) { return roundedFrequencyHz; }
// change to aliased frequency if needed // change to aliased frequency if needed
{ {
QMutexLocker lock(&m_mutex); QMutexLocker lock(&m_mutex);

View File

@@ -179,13 +179,6 @@ namespace swift::core::afv::clients
QSet<quint16> getEnabledTransceivers() const; QSet<quint16> getEnabledTransceivers() const;
//! @} //! @}
//! @{
//! Aliased stations enabled?
//! \threadsafe
bool isAliasedStationsEnabled() const { return m_enableAliased; }
void enableAliasedStations(bool enabled) { m_enableAliased = enabled; }
//! @}
//! @{ //! @{
//! Update frequency //! Update frequency
//! \threadsafe //! \threadsafe
@@ -411,7 +404,6 @@ namespace swift::core::afv::clients
std::atomic_int m_heartBeatFailures { 0 }; //!< voice server heartbeat failures std::atomic_int m_heartBeatFailures { 0 }; //!< voice server heartbeat failures
std::atomic_bool m_isStarted { false }; std::atomic_bool m_isStarted { false };
std::atomic_bool m_loopbackOn { 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_winCoInitialized { false }; //!< Windows only CoInitializeEx
std::atomic_bool m_integratedComUnit { false }; //!< is COM unit sychronized, integrated? std::atomic_bool m_integratedComUnit { false }; //!< is COM unit sychronized, integrated?

View File

@@ -80,10 +80,11 @@ namespace swift::core::context
{ {
Q_UNUSED(originator) Q_UNUSED(originator)
if (commandLine.isEmpty()) { return false; } if (commandLine.isEmpty()) { return false; }
CSimpleCommandParser parser({ ".vol", ".volume", // output volume CSimpleCommandParser parser({
".mute", // mute ".vol", ".volume", // output volume
".unmute", // unmute ".mute", // mute
".aliased" }); ".unmute", // unmute
});
parser.parse(commandLine); parser.parse(commandLine);
if (!parser.isKnownCommand()) { return false; } if (!parser.isKnownCommand()) { return false; }
@@ -103,14 +104,6 @@ namespace swift::core::context
this->setMasterOutputVolume(v); this->setMasterOutputVolume(v);
return true; 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; return false;
} }

View File

@@ -233,7 +233,6 @@ namespace swift::core
swift::misc::CSimpleCommandParser::registerCommand({ ".mute", "mute audio" }); swift::misc::CSimpleCommandParser::registerCommand({ ".mute", "mute audio" });
swift::misc::CSimpleCommandParser::registerCommand({ ".unmute", "unmute audio" }); swift::misc::CSimpleCommandParser::registerCommand({ ".unmute", "unmute audio" });
swift::misc::CSimpleCommandParser::registerCommand({ ".vol volume", "volume 0..100" }); 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 ------------ // -------- 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 //! .mute mute swift::core::context::CContextAudioBase
//! .unmute unmute swift::core::context::CContextAudioBase //! .unmute unmute swift::core::context::CContextAudioBase
//! .vol .volume volume 0..100 set volume swift::core::context::CContextAudioBase //! .vol .volume volume 0..100 set volume swift::core::context::CContextAudioBase
//! .aliased on|off aliased stations swift::core::context::CContextAudioBase
//! </pre> //! </pre>
virtual bool parseCommandLine(const QString &commandLine, virtual bool parseCommandLine(const QString &commandLine,
const swift::misc::CIdentifier &originator) override; const swift::misc::CIdentifier &originator) override;