mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 14:13:18 +08:00
Fix a couple of oversights regarding track
nullability
This commit is contained in:
parent
ec60e16439
commit
ad3dd1c700
@ -146,6 +146,7 @@ namespace osu.Game.Beatmaps
|
||||
/// Get the loaded audio track instance. <see cref="LoadTrack"/> must have first been called.
|
||||
/// This generally happens via MusicController when changing the global beatmap.
|
||||
/// </summary>
|
||||
[NotNull]
|
||||
public Track Track
|
||||
{
|
||||
get
|
||||
|
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private Box redFlashLayer = null!;
|
||||
|
||||
private Track? track;
|
||||
private Track track = null!;
|
||||
|
||||
private AudioFilter failLowPassFilter = null!;
|
||||
private AudioFilter failHighPassFilter = null!;
|
||||
@ -153,15 +153,17 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public void RemoveFilters(bool resetTrackFrequency = true)
|
||||
{
|
||||
if (filtersRemoved)
|
||||
return;
|
||||
if (filtersRemoved) return;
|
||||
|
||||
filtersRemoved = true;
|
||||
|
||||
if (resetTrackFrequency)
|
||||
track?.RemoveAdjustment(AdjustableProperty.Frequency, trackFreq);
|
||||
if (!started)
|
||||
return;
|
||||
|
||||
track?.RemoveAdjustment(AdjustableProperty.Volume, volumeAdjustment);
|
||||
if (resetTrackFrequency)
|
||||
track.RemoveAdjustment(AdjustableProperty.Frequency, trackFreq);
|
||||
|
||||
track.RemoveAdjustment(AdjustableProperty.Volume, volumeAdjustment);
|
||||
|
||||
if (filters.Parent == null)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user