mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 17:17:24 +08:00
Apply nullability to ducking methods
This commit is contained in:
parent
7f84e377ab
commit
0696e2df32
@ -61,8 +61,9 @@ namespace osu.Game.Overlays
|
||||
[Resolved]
|
||||
private RealmAccess realm { get; set; } = null!;
|
||||
|
||||
private AudioFilter audioDuckFilter;
|
||||
private readonly BindableDouble audioDuckVolume = new BindableDouble(1);
|
||||
|
||||
private AudioFilter? audioDuckFilter;
|
||||
private bool audioDuckActive;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -268,7 +269,7 @@ namespace osu.Game.Overlays
|
||||
/// <param name="easing">Easing for the ducking transition.</param>
|
||||
/// <param name="unduckDuration">Duration of the unducking transition, in ms.</param>
|
||||
/// <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)
|
||||
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) return null;
|
||||
|
||||
@ -295,7 +296,8 @@ namespace osu.Game.Overlays
|
||||
/// <param name="duckCutoffTo">Cutoff frequency to drop `AudioFilter` to. Use `null` to skip filter effect.</param>
|
||||
/// <param name="duckDuration">Duration of the ducking transition, in ms.</param>
|
||||
/// <param name="duckEasing">Easing for the ducking transition.</param>
|
||||
public void DuckMomentarily(int delay, int unduckDuration = 500, Easing unduckEasing = Easing.InCubic, float duckVolumeTo = 0.25f, int? duckCutoffTo = 300, int duckDuration = 0, Easing duckEasing = Easing.OutCubic)
|
||||
public void DuckMomentarily(int delay, int unduckDuration = 500, Easing unduckEasing = Easing.InCubic, float duckVolumeTo = 0.25f, int? duckCutoffTo = 300, int duckDuration = 0,
|
||||
Easing duckEasing = Easing.OutCubic)
|
||||
{
|
||||
if (audioDuckActive) return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user