Change overlapping Duck() usages to be a noop instead of a throw

This commit is contained in:
Jamie Taylor 2024-07-04 15:51:50 +09:00
parent 753463fadb
commit 82e4e884d7
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -267,8 +267,7 @@ namespace osu.Game.Overlays
/// <param name="unduckEasing">Easing for the unducking transition.</param>
public IDisposable Duck(int duration = 0, float duckVolumeTo = 0.25f, int? duckCutoffTo = 300, Easing easing = Easing.OutCubic, int unduckDuration = 500, Easing unduckEasing = Easing.InCubic)
{
if (audioDuckActive)
throw new InvalidOperationException("Cannot perform Duck() while another Duck() is in progress.");
if (audioDuckActive) return null;
audioDuckActive = true;