1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Merge pull request #22133 from peppy/fix-fail-sound-not-playing

Fix skin fail sound not correctly playing
This commit is contained in:
Bartłomiej Dach 2023-01-11 17:28:03 +01:00 committed by GitHub
commit 8e022ad4f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,11 +15,13 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Utils;
using osu.Game.Audio;
using osu.Game.Audio.Effects;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Graphics;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
@ -48,7 +50,7 @@ namespace osu.Game.Screens.Play
private const float duration = 2500;
private Sample? failSample;
private ISample? failSample;
[Resolved]
private OsuConfigManager config { get; set; } = null!;
@ -73,10 +75,10 @@ namespace osu.Game.Screens.Play
}
[BackgroundDependencyLoader]
private void load(AudioManager audio, IBindable<WorkingBeatmap> beatmap)
private void load(AudioManager audio, ISkinSource skin, IBindable<WorkingBeatmap> beatmap)
{
track = beatmap.Value.Track;
failSample = audio.Samples.Get(@"Gameplay/failsound");
failSample = skin.GetSample(new SampleInfo(@"Gameplay/failsound"));
AddRangeInternal(new Drawable[]
{