Final jitter buffer rollback cleanups.

This commit is contained in:
Jonathan Naylor 2018-02-08 20:34:18 +00:00
parent e6ed2e17a1
commit bf1773ebcc
2 changed files with 11 additions and 6 deletions

View file

@ -246,8 +246,15 @@ bool CDMRNetwork::write(const CDMRData& data)
} else if (dataType == DT_VOICE) {
buffer[15U] |= data.getN();
} else {
if (dataType == DT_VOICE_LC_HEADER)
if (dataType == DT_VOICE_LC_HEADER) {
m_streamId[slotIndex] = ::rand() + 1U;
count = 2U;
}
if (dataType == DT_CSBK || dataType == DT_DATA_HEADER) {
m_streamId[slotIndex] = ::rand() + 1U;
count = 1U;
}
buffer[15U] |= (0x20U | dataType);
}

View file

@ -45,7 +45,7 @@ unsigned int CDMRSlot::m_hangCount = 3U * 17U;
CRSSIInterpolator* CDMRSlot::m_rssiMapper = NULL;
unsigned int CDMRSlot::m_jitterTime = 300U;
unsigned int CDMRSlot::m_jitterTime = 300U;
unsigned int CDMRSlot::m_jitterSlots = 5U;
unsigned char* CDMRSlot::m_idle = NULL;
@ -571,8 +571,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
} else {
if (m_rfState == RS_RF_AUDIO) {
m_rfN = data[1U] & 0x0FU;
if(m_rfN > 5U)
if (m_rfN > 5U)
return false;
unsigned int errors = 0U;
@ -814,8 +813,7 @@ bool CDMRSlot::writeModem(unsigned char *data, unsigned int len)
writeNetworkRF(start, DT_VOICE_LC_HEADER);
m_rfN = data[1U] & 0x0FU;
if(m_rfN > 5U)
if (m_rfN > 5U)
return false;
// Regenerate the EMB