Add a resampler to the FM network RAW data mode.

This commit is contained in:
Jonathan Naylor
2023-10-18 11:34:38 +01:00
parent 77d38f37e0
commit e91f640e7e
12 changed files with 127 additions and 48 deletions

View File

@@ -1886,6 +1886,7 @@ bool CMMDVMHost::createFMNetwork()
{
std::string callsign = m_conf.getFMCallsign();
std::string protocol = m_conf.getFMNetworkProtocol();
unsigned int sampleRate = m_conf.getFMNetworkSampleRate();
std::string gatewayAddress = m_conf.getFMGatewayAddress();
unsigned short gatewayPort = m_conf.getFMGatewayPort();
std::string localAddress = m_conf.getFMLocalAddress();
@@ -1899,6 +1900,8 @@ bool CMMDVMHost::createFMNetwork()
LogInfo("FM Network Parameters");
LogInfo(" Protocol: %s", protocol.c_str());
if (protocol == "RAW")
LogInfo(" Sample Rate: %u", sampleRate);
LogInfo(" Gateway Address: %s", gatewayAddress.c_str());
LogInfo(" Gateway Port: %hu", gatewayPort);
LogInfo(" Local Address: %s", localAddress.c_str());
@@ -1909,7 +1912,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, debug);
m_fmNetwork = new CFMNetwork(callsign, protocol, localAddress, localPort, gatewayAddress, gatewayPort, sampleRate, debug);
bool ret = m_fmNetwork->open();
if (!ret) {