Reset lastFrameValid when used up.
This commit is contained in:
parent
ad4cb859b5
commit
443c363b1c
2 changed files with 5 additions and 1 deletions
|
@ -1562,8 +1562,10 @@ void CDMRSlot::insertSilence(unsigned int count)
|
||||||
for (unsigned int i = 0U; i < count; i++) {
|
for (unsigned int i = 0U; i < count; i++) {
|
||||||
// Only use our silence frame if its AMBE audio data
|
// Only use our silence frame if its AMBE audio data
|
||||||
if (fid == FID_ETSI || fid == FID_DMRA) {
|
if (fid == FID_ETSI || fid == FID_DMRA) {
|
||||||
if (i > 0U)
|
if (i > 0U) {
|
||||||
::memcpy(data, DMR_SILENCE_DATA, DMR_FRAME_LENGTH_BYTES + 2U);
|
::memcpy(data, DMR_SILENCE_DATA, DMR_FRAME_LENGTH_BYTES + 2U);
|
||||||
|
m_lastFrameValid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (n == 0U) {
|
if (n == 0U) {
|
||||||
|
|
|
@ -848,6 +848,8 @@ void CDStarControl::insertSilence(unsigned int count)
|
||||||
writeQueueDataNet(m_lastFrame);
|
writeQueueDataNet(m_lastFrame);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
m_lastFrameValid = false;
|
||||||
|
|
||||||
if (n == 0U)
|
if (n == 0U)
|
||||||
writeQueueDataNet(DSTAR_NULL_FRAME_SYNC_BYTES);
|
writeQueueDataNet(DSTAR_NULL_FRAME_SYNC_BYTES);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue