Add the squelch file as needed by SVXLink.

This commit is contained in:
Jonathan Naylor
2023-10-25 12:39:09 +01:00
parent b6269c73da
commit 3eb29a0bf5
7 changed files with 82 additions and 7 deletions

View File

@@ -1887,6 +1887,7 @@ bool CMMDVMHost::createFMNetwork()
std::string callsign = m_conf.getFMCallsign();
std::string protocol = m_conf.getFMNetworkProtocol();
unsigned int sampleRate = m_conf.getFMNetworkSampleRate();
std::string squelchFile = m_conf.getFMNetworkSquelchFile();
std::string gatewayAddress = m_conf.getFMGatewayAddress();
unsigned short gatewayPort = m_conf.getFMGatewayPort();
std::string localAddress = m_conf.getFMLocalAddress();
@@ -1900,8 +1901,10 @@ bool CMMDVMHost::createFMNetwork()
LogInfo("FM Network Parameters");
LogInfo(" Protocol: %s", protocol.c_str());
if (protocol == "RAW")
if (protocol == "RAW") {
LogInfo(" Sample Rate: %u", sampleRate);
LogInfo(" Squelch File: %s", squelchFile.empty() ? "(none)" : squelchFile.c_str());
}
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
LogInfo(" Gateway Port: %hu", gatewayPort);
LogInfo(" Local Address: %s", localAddress.c_str());
@@ -1912,7 +1915,7 @@ bool CMMDVMHost::createFMNetwork()
LogInfo(" RX Audio Gain: %.2f", rxAudioGain);
LogInfo(" Mode Hang: %us", m_fmNetModeHang);
m_fmNetwork = new CFMNetwork(callsign, protocol, localAddress, localPort, gatewayAddress, gatewayPort, sampleRate, debug);
m_fmNetwork = new CFMNetwork(callsign, protocol, localAddress, localPort, gatewayAddress, gatewayPort, sampleRate, squelchFile, debug);
bool ret = m_fmNetwork->open();
if (!ret) {