mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix unsafe sample playback in GameplaySampleTriggerSource
Resolves https://github.com/ppy/osu/issues/18727. Added delay from `Schedule` should be minimal as it is always called from the `Update` thread (input propagation) anyway.
This commit is contained in:
@ -56,12 +56,12 @@ namespace osu.Game.Rulesets.UI
|
|||||||
PlaySamples(samples);
|
PlaySamples(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void PlaySamples(ISampleInfo[] samples)
|
protected void PlaySamples(ISampleInfo[] samples) => Schedule(() =>
|
||||||
{
|
{
|
||||||
var hitSound = getNextSample();
|
var hitSound = getNextSample();
|
||||||
hitSound.Samples = samples;
|
hitSound.Samples = samples;
|
||||||
hitSound.Play();
|
hitSound.Play();
|
||||||
}
|
});
|
||||||
|
|
||||||
protected HitObject GetMostValidObject()
|
protected HitObject GetMostValidObject()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user