mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-22 08:05:49 +08:00
Fix missing audio detection.
This commit is contained in:
10
DMRSlot.cpp
10
DMRSlot.cpp
@@ -727,8 +727,12 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||||||
dmrData.getData(data + 2U);
|
dmrData.getData(data + 2U);
|
||||||
|
|
||||||
if (dataType == DT_VOICE_LC_HEADER) {
|
if (dataType == DT_VOICE_LC_HEADER) {
|
||||||
if (m_netState == RS_NET_AUDIO)
|
if (m_netState == RS_NET_AUDIO) {
|
||||||
|
// Reset the missing audio timers
|
||||||
|
m_packetTimer.start();
|
||||||
|
m_elapsed.start();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CDMRFullLC fullLC;
|
CDMRFullLC fullLC;
|
||||||
m_netLC = fullLC.decode(data + 2U, DT_VOICE_LC_HEADER);
|
m_netLC = fullLC.decode(data + 2U, DT_VOICE_LC_HEADER);
|
||||||
@@ -828,6 +832,10 @@ void CDMRSlot::writeNetwork(const CDMRData& dmrData)
|
|||||||
bptc.decode(data + 2U, payload);
|
bptc.decode(data + 2U, payload);
|
||||||
bptc.encode(payload, data + 2U);
|
bptc.encode(payload, data + 2U);
|
||||||
|
|
||||||
|
// Reset the missing audio timers
|
||||||
|
m_packetTimer.start();
|
||||||
|
m_elapsed.start();
|
||||||
|
|
||||||
data[0U] = TAG_DATA;
|
data[0U] = TAG_DATA;
|
||||||
data[1U] = 0x00U;
|
data[1U] = 0x00U;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user