Increase ASIO runtime drain budget
This commit is contained in:
parent
fad7eb63b7
commit
0574629914
2 changed files with 3 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ public sealed record MimirAsioStreamSourceOptions(
|
|||
public sealed class MimirAsioStreamSource : IMimirStreamSource
|
||||
{
|
||||
private const string DefaultClsid = "{AC4D0455-50D7-4498-B3CD-9A41D130B759}";
|
||||
private const int MaxQueuedBlocks = 32768;
|
||||
private readonly ConcurrentQueue<MimirStreamSample> samples = new();
|
||||
private readonly ManualResetEventSlim started = new();
|
||||
private readonly Thread captureThread;
|
||||
|
|
@ -145,7 +146,7 @@ public sealed class MimirAsioStreamSource : IMimirStreamSource
|
|||
frameCount,
|
||||
timestampNs)));
|
||||
|
||||
while (samples.Count > 8192 && samples.TryDequeue(out _))
|
||||
while (samples.Count > MaxQueuedBlocks && samples.TryDequeue(out _))
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ public sealed class MimirSynchronizationHub : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
public int PollSources(int maxSamplesPerSource = 256)
|
||||
public int PollSources(int maxSamplesPerSource = 8192)
|
||||
{
|
||||
ObjectDisposedException.ThrowIf(disposed, this);
|
||||
var consumed = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue