mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 09:02:58 +08:00
fix: use using
statement for waveform auto-disposal
This commit is contained in:
parent
a04333c17b
commit
a7a64b57e9
@ -57,8 +57,8 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
if (!isHitSound(file.Filename))
|
||||
continue;
|
||||
|
||||
Waveform waveform = new Waveform(stream);
|
||||
|
||||
using (Waveform waveform = new Waveform(stream))
|
||||
{
|
||||
var points = waveform.GetPoints();
|
||||
|
||||
// Skip muted samples
|
||||
@ -109,6 +109,7 @@ namespace osu.Game.Rulesets.Edit.Checks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool hasAudioExtension(string filename) => audioExtensions.Any(filename.ToLowerInvariant().EndsWith);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user