We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3c0887 commit 2af6bdbCopy full SHA for 2af6bdb
1 file changed
source/TS.NET/Memory/CaptureCircularBuffer.cs
@@ -135,8 +135,6 @@ public bool TryStartWrite()
135
{
136
if (currentCaptureCount == maxCaptureCount)
137
138
- captureDrops++;
139
- intervalCaptureDrops++;
140
FinishRead(drop: true); // Remove oldest buffer
141
}
142
@@ -203,9 +201,14 @@ private void FinishRead(bool drop = false)
203
201
readCaptureOffset += (channelCount * channelCaptureLength);
204
202
if (readCaptureOffset >= wraparoundOffset)
205
readCaptureOffset = 0;
206
- captureReads++;
207
- if (!drop)
+ if (drop)
208
+ captureDrops++;
+ intervalCaptureDrops++;
+ }
209
+ else
210
+ {
211
+ captureReads++;
212
intervalCaptureReads++;
213
214
readInProgress = false;
0 commit comments