Remote input: moved writes increment counter in the write method for better consistency

This commit is contained in:
f4exb 2019-04-28 21:22:48 +02:00
parent 983b4f3da9
commit c60079397e
1 changed files with 1 additions and 2 deletions

View File

@ -167,8 +167,6 @@ void RemoteInputBuffer::checkSlotData(int slotIndex)
{
int pseudoWriteIndex = slotIndex * sizeof(BufferFrame);
m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex;
m_nbWrites++;
int rwDelayBytes = (m_wrDeltaEstimate > 0 ? m_wrDeltaEstimate : sizeof(BufferFrame) * nbDecoderSlots + m_wrDeltaEstimate);
int sampleRate = m_currentMeta.m_sampleRate;
@ -210,6 +208,7 @@ void RemoteInputBuffer::writeData(char *array)
m_frameHead = frameIndex; // new frame head
checkSlotData(decoderIndex); // check slot before re-init
rwCorrectionEstimate(decoderIndex);
m_nbWrites++;
initDecodeSlot(decoderIndex); // collect stats and re-initialize current slot
}