From 1dc44c4047cf24e0ed755dbd82f5518097cb9dbf Mon Sep 17 00:00:00 2001 From: Andre Mohren Date: Fri, 13 Jan 2023 09:21:50 +0100 Subject: [PATCH] Looped sounds can now be unlooped to avoid cut-offs. --- OpenRA.Game/Sound/Sound.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Game/Sound/Sound.cs b/OpenRA.Game/Sound/Sound.cs index 4cb265878a..7223a7831d 100644 --- a/OpenRA.Game/Sound/Sound.cs +++ b/OpenRA.Game/Sound/Sound.cs @@ -129,6 +129,11 @@ namespace OpenRA soundEngine.StopAllSounds(); } + public void EndLoop(ISound sound) + { + soundEngine.SetSoundLooping(false, sound); + } + public void MuteAudio() { soundEngine.Volume = 0f;