1
0
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:
tsrk 2023-08-29 19:45:11 +02:00
parent a04333c17b
commit a7a64b57e9
No known key found for this signature in database
GPG Key ID: EBD46BB3049B56D6

View File

@ -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);