Allow the USRP audio format to be used natively by the FM networking.

This commit is contained in:
Jonathan Naylor
2021-03-14 12:16:39 +00:00
parent 7c14a6ec40
commit fb0d1ef5e2
7 changed files with 139 additions and 45 deletions

View File

@@ -283,6 +283,7 @@ m_pocsagLocalPort(0U),
m_pocsagNetworkModeHang(3U),
m_pocsagNetworkDebug(false),
m_fmNetworkEnabled(false),
m_fmNetworkFormat("MMDVM"),
m_fmGatewayAddress(),
m_fmGatewayPort(0U),
m_fmLocalAddress(),
@@ -440,7 +441,7 @@ bool CConf::read()
value++;
} else {
// if value is not quoted, remove after # (to make comment)
::strtok(value, "#");
(void)::strtok(value, "#");
}
if (section == SECTION_GENERAL) {
@@ -998,6 +999,8 @@ bool CConf::read()
} else if (section == SECTION_FM_NETWORK) {
if (::strcmp(key, "Enable") == 0)
m_fmNetworkEnabled = ::atoi(value) == 1;
else if (::strcmp(key, "Format") == 0)
m_fmNetworkFormat = value;
else if (::strcmp(key, "LocalAddress") == 0)
m_fmLocalAddress = value;
else if (::strcmp(key, "LocalPort") == 0)
@@ -2197,6 +2200,11 @@ bool CConf::getFMNetworkEnabled() const
return m_fmNetworkEnabled;
}
std::string CConf::getFMNetworkFormat() const
{
return m_fmNetworkFormat;
}
std::string CConf::getFMGatewayAddress() const
{
return m_fmGatewayAddress;