Layer playback of beatmap-changed and random-beatmap samples

This commit is contained in:
Jamie Taylor
2022-02-04 15:42:52 +09:00
parent 002cc7261b
commit 0f48c0131c
2 changed files with 7 additions and 18 deletions

View File

@ -154,6 +154,7 @@ namespace osu.Game.Screens.Select
private readonly DrawablePool<DrawableCarouselBeatmapSet> setPool = new DrawablePool<DrawableCarouselBeatmapSet>(100);
private Sample spinSample;
private Sample randomSelectSample;
private int visibleSetsCount;
@ -178,6 +179,7 @@ namespace osu.Game.Screens.Select
private void load(OsuConfigManager config, AudioManager audio)
{
spinSample = audio.Samples.Get("SongSelect/random-spin");
randomSelectSample = audio.Samples.Get(@"SongSelect/select-random");
config.BindWith(OsuSetting.RandomSelectAlgorithm, RandomAlgorithm);
config.BindWith(OsuSetting.SongSelectRightMouseScroll, RightClickScrollingEnabled);
@ -495,6 +497,8 @@ namespace osu.Game.Screens.Select
var chan = spinSample.GetChannel();
chan.Frequency.Value = 1f + Math.Min(1f, distance / visibleSetsCount);
chan.Play();
randomSelectSample?.Play();
}
private void select(CarouselItem item)