mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-04 17:10:09 +08:00
fix(audioout2): wire skipped-submit trace counter (#761)
This commit is contained in:
@@ -921,6 +921,7 @@ public static class AudioOut2Exports
|
||||
|
||||
if (mixedPorts == 0)
|
||||
{
|
||||
TraceSubmitSkipped(context, frames, "no-ports");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -942,6 +943,7 @@ public static class AudioOut2Exports
|
||||
var backend = ResolveContextBackend(context, out var backendName);
|
||||
if (backend is null)
|
||||
{
|
||||
TraceSubmitSkipped(context, frames, "no-backend");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1212,4 +1214,14 @@ public static class AudioOut2Exports
|
||||
Console.Error.WriteLine($"[LOADER][TRACE] audio_out2.{message}");
|
||||
}
|
||||
}
|
||||
|
||||
private static void TraceSubmitSkipped(ContextState context, int frames, string reason)
|
||||
{
|
||||
var n = Interlocked.Increment(ref _submitSkipTraceCount);
|
||||
if (n <= 8 || n % 500 == 0)
|
||||
{
|
||||
TraceAudioOut2(
|
||||
$"context-submit-skip#{n} handle=0x{context.Handle:X} frames={frames} reason={reason}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user