mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 06:29:46 +08:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user