From 1bfcda7ab2c156eda63183c1e1973fe0b43ba1bb Mon Sep 17 00:00:00 2001 From: iscwDu Date: Mon, 20 Apr 2026 22:51:03 +0000 Subject: [PATCH] Prevent negative volume to avoid corrupted audio --- core/src/display_object.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/display_object.rs b/core/src/display_object.rs index d7f2143e2ff7..7bf444b007b0 100644 --- a/core/src/display_object.rs +++ b/core/src/display_object.rs @@ -3162,7 +3162,7 @@ impl SoundTransform { left_to_right: (sound_transform.left_to_right() * 100.0) as i32, right_to_left: (sound_transform.right_to_left() * 100.0) as i32, right_to_right: (sound_transform.right_to_right() * 100.0) as i32, - volume: (sound_transform.volume() * 100.0) as i32, + volume: i32:abs((sound_transform.volume() * 100.0) as i32), } }