Allow mods to control how looped sounds are used.

This commit is contained in:
Andre Mohren
2023-02-17 23:39:28 +01:00
committed by Matthias Mailänder
parent 68fddf818c
commit 3f0c3a8b9c
4 changed files with 14 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ namespace OpenRA.Platforms.Default
public void StopAllSounds() { }
public void SetListenerPosition(WPos position) { }
public void SetSoundLooping(bool looping, ISound sound) { }
public void SetSoundPosition(ISound sound, WPos position) { }
public void Dispose() { }
}

View File

@@ -350,6 +350,11 @@ namespace OpenRA.Platforms.Default
((OpenAlSound)sound)?.SetLooping(looping);
}
public void SetSoundPosition(ISound sound, WPos position)
{
((OpenAlSound)sound)?.SetPosition(position);
}
~OpenAlSoundEngine()
{
Dispose(false);