From c60079397e075274693aa974c686c2029a5223f4 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 28 Apr 2019 21:22:48 +0200 Subject: [PATCH] Remote input: moved writes increment counter in the write method for better consistency --- plugins/samplesource/remoteinput/remoteinputbuffer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/samplesource/remoteinput/remoteinputbuffer.cpp b/plugins/samplesource/remoteinput/remoteinputbuffer.cpp index dcedd6197..a2e138779 100644 --- a/plugins/samplesource/remoteinput/remoteinputbuffer.cpp +++ b/plugins/samplesource/remoteinput/remoteinputbuffer.cpp @@ -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 }