mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 15:56:33 -04:00
Remote input: moved writes increment counter in the write method for better consistency
This commit is contained in:
parent
983b4f3da9
commit
c60079397e
@ -167,8 +167,6 @@ void RemoteInputBuffer::checkSlotData(int slotIndex)
|
|||||||
{
|
{
|
||||||
int pseudoWriteIndex = slotIndex * sizeof(BufferFrame);
|
int pseudoWriteIndex = slotIndex * sizeof(BufferFrame);
|
||||||
m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex;
|
m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex;
|
||||||
m_nbWrites++;
|
|
||||||
|
|
||||||
int rwDelayBytes = (m_wrDeltaEstimate > 0 ? m_wrDeltaEstimate : sizeof(BufferFrame) * nbDecoderSlots + m_wrDeltaEstimate);
|
int rwDelayBytes = (m_wrDeltaEstimate > 0 ? m_wrDeltaEstimate : sizeof(BufferFrame) * nbDecoderSlots + m_wrDeltaEstimate);
|
||||||
int sampleRate = m_currentMeta.m_sampleRate;
|
int sampleRate = m_currentMeta.m_sampleRate;
|
||||||
|
|
||||||
@ -210,6 +208,7 @@ void RemoteInputBuffer::writeData(char *array)
|
|||||||
m_frameHead = frameIndex; // new frame head
|
m_frameHead = frameIndex; // new frame head
|
||||||
checkSlotData(decoderIndex); // check slot before re-init
|
checkSlotData(decoderIndex); // check slot before re-init
|
||||||
rwCorrectionEstimate(decoderIndex);
|
rwCorrectionEstimate(decoderIndex);
|
||||||
|
m_nbWrites++;
|
||||||
initDecodeSlot(decoderIndex); // collect stats and re-initialize current slot
|
initDecodeSlot(decoderIndex); // collect stats and re-initialize current slot
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user