mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Fix compilation bug and add lost start call.
This commit is contained in:
@@ -78,7 +78,7 @@ const float FILTER_TAPS[] = {
|
||||
|
||||
const unsigned int FILTER_TAPS_COUNT = 200U;
|
||||
|
||||
CFMControl::CFMControl(CFMNetwork* network, float txAudioGain, float rxAudioGain, bool preEmphasisOn, bool deEmphasisOn) :
|
||||
CFMControl::CFMControl(IFMNetwork* network, float txAudioGain, float rxAudioGain, bool preEmphasisOn, bool deEmphasisOn) :
|
||||
m_network(network),
|
||||
m_txAudioGain(txAudioGain),
|
||||
m_rxAudioGain(rxAudioGain),
|
||||
@@ -110,12 +110,19 @@ bool CFMControl::writeModem(const unsigned char* data, unsigned int length)
|
||||
if (data[0U] == TAG_HEADER)
|
||||
return true;
|
||||
|
||||
if (data[0U] == TAG_EOT)
|
||||
if (data[0U] == TAG_EOT) {
|
||||
m_begin = true;
|
||||
return m_network->writeEnd();
|
||||
}
|
||||
|
||||
if (data[0U] != TAG_DATA)
|
||||
return false;
|
||||
|
||||
if (m_begin) {
|
||||
m_begin = false;
|
||||
m_network->writeStart();
|
||||
}
|
||||
|
||||
m_incomingRFAudio.addData(data + 1U, length - 1U);
|
||||
unsigned int bufferLength = m_incomingRFAudio.dataSize();
|
||||
if (bufferLength > 240U) // 160 samples 12-bit
|
||||
|
||||
Reference in New Issue
Block a user