fix: VulkanHostBufferPool deadlock, audio overflow crash, and log grouping (#564)

* fix: VulkanHostBufferPool deadlock, audio overflow crash, and log grouping

* fix: implement thread-safe buffer pool, refactor output handling, and use unchecked cast for audio conversion
This commit is contained in:
CasualcoderDev
2026-07-23 19:41:51 +07:00
committed by GitHub
parent f9d92135a0
commit 5a08a9bb43
3 changed files with 71 additions and 39 deletions
@@ -68,7 +68,7 @@ internal static class AudioPcmConversion
value = Math.Clamp(value, -1.0f, 1.0f);
var scale = value < 0.0f ? 32768.0f : short.MaxValue;
return checked((short)MathF.Round(value * scale));
return unchecked((short)MathF.Round(value * scale));
}
// <paramref name="volume"/> is expected pre-clamped to [0, 1] by the caller.