mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 06:55:52 +08:00
Fix FM RAW mode resampler bug.
This commit is contained in:
@@ -104,10 +104,12 @@ bool CFMNetwork::open()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(HAS_SRC)
|
||||||
if ((m_protocol == FMNP_RAW) && (m_sampleRate != MMDVM_SAMPLERATE)) {
|
if ((m_protocol == FMNP_RAW) && (m_sampleRate != MMDVM_SAMPLERATE)) {
|
||||||
LogError("The resampler needed for non-native sample rates has not been included");
|
LogError("The resampler needed for non-native sample rates has not been included");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return m_socket.open(m_addr);
|
return m_socket.open(m_addr);
|
||||||
}
|
}
|
||||||
@@ -544,7 +546,7 @@ bool CFMNetwork::writeUSRPStart()
|
|||||||
buffer[length++] = 0x08U;
|
buffer[length++] = 0x08U;
|
||||||
|
|
||||||
// TLV Length
|
// TLV Length
|
||||||
buffer[length++] = 3U + 4U + 3U + 1U + 1U + m_callsign.size() + 1U;
|
buffer[length++] = 3U + 4U + 3U + 1U + 1U + (unsigned char)m_callsign.size() + 1U;
|
||||||
|
|
||||||
// DMR Id
|
// DMR Id
|
||||||
buffer[length++] = 0x00U;
|
buffer[length++] = 0x00U;
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ REMOTE_COMMAND CRemoteControl::getCommand()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
m_socket.write((unsigned char*)replyStr.c_str(), replyStr.length(), address, addrlen);
|
m_socket.write((unsigned char*)replyStr.c_str(), (unsigned int)replyStr.length(), address, addrlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_command;
|
return m_command;
|
||||||
@@ -209,14 +209,14 @@ unsigned int CRemoteControl::getArgCount() const
|
|||||||
case RCD_MODE_P25:
|
case RCD_MODE_P25:
|
||||||
case RCD_MODE_NXDN:
|
case RCD_MODE_NXDN:
|
||||||
case RCD_MODE_M17:
|
case RCD_MODE_M17:
|
||||||
return m_args.size() - SET_MODE_ARGS;
|
return (unsigned int)m_args.size() - SET_MODE_ARGS;
|
||||||
case RCD_PAGE:
|
case RCD_PAGE:
|
||||||
case RCD_PAGE_BCD:
|
case RCD_PAGE_BCD:
|
||||||
case RCD_PAGE_A1:
|
case RCD_PAGE_A1:
|
||||||
case RCD_PAGE_A2:
|
case RCD_PAGE_A2:
|
||||||
return m_args.size() - 1U;
|
return (unsigned int)m_args.size() - 1U;
|
||||||
case RCD_CW:
|
case RCD_CW:
|
||||||
return m_args.size() - 1U;
|
return (unsigned int)m_args.size() - 1U;
|
||||||
default:
|
default:
|
||||||
return 0U;
|
return 0U;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user