1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

Make DuckDuration non-zero by default

This commit is contained in:
Dean Herbert 2024-07-05 18:38:24 +09:00
parent 7efb4ce30a
commit 5907e0d1eb
No known key found for this signature in database
5 changed files with 6 additions and 9 deletions

View File

@ -13,10 +13,7 @@ namespace osu.Game.Tests.Visual.Menus
[Test] [Test]
public void TestMomentaryDuck() public void TestMomentaryDuck()
{ {
AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000, new DuckParameters AddStep("duck momentarily", () => Game.MusicController.DuckMomentarily(1000));
{
DuckDuration = 300,
}));
} }
[Test] [Test]

View File

@ -127,8 +127,8 @@ namespace osu.Game.Collections
{ {
duckOperation = musicController?.Duck(new DuckParameters duckOperation = musicController?.Duck(new DuckParameters
{ {
DuckDuration = 100,
DuckVolumeTo = 1, DuckVolumeTo = 1,
DuckDuration = 100,
RestoreDuration = 100, RestoreDuration = 100,
}); });

View File

@ -108,8 +108,8 @@ namespace osu.Game.Overlays
{ {
duckOperation = musicController?.Duck(new DuckParameters duckOperation = musicController?.Duck(new DuckParameters
{ {
DuckDuration = 100,
DuckVolumeTo = 1, DuckVolumeTo = 1,
DuckDuration = 100,
RestoreDuration = 100, RestoreDuration = 100,
}); });
} }

View File

@ -486,9 +486,9 @@ namespace osu.Game.Overlays
{ {
/// <summary> /// <summary>
/// The duration of the ducking transition in milliseconds. /// The duration of the ducking transition in milliseconds.
/// Defaults to no duration (immediate ducking). /// Defaults to 100 ms.
/// </summary> /// </summary>
public double DuckDuration = 0; public double DuckDuration = 100;
/// <summary> /// <summary>
/// The final volume which should be reached during ducking, when 0 is silent and 1 is original volume. /// The final volume which should be reached during ducking, when 0 is silent and 1 is original volume.

View File

@ -122,7 +122,7 @@ namespace osu.Game.Overlays.Toolbar
rulesetSelectionChannel[r.NewValue] = channel; rulesetSelectionChannel[r.NewValue] = channel;
channel.Play(); channel.Play();
musicController?.DuckMomentarily(500); musicController?.DuckMomentarily(500, new DuckParameters { DuckDuration = 0 });
} }
public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput; public override bool HandleNonPositionalInput => !Current.Disabled && base.HandleNonPositionalInput;