diff --git a/osu.Game/Screens/Menu/IntroScreen.cs b/osu.Game/Screens/Menu/IntroScreen.cs index afe75c5ef7..65f9dde1f9 100644 --- a/osu.Game/Screens/Menu/IntroScreen.cs +++ b/osu.Game/Screens/Menu/IntroScreen.cs @@ -13,14 +13,17 @@ using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Screens; using osu.Framework.Utils; +using osu.Game.Audio; using osu.Game.Beatmaps; using osu.Game.Configuration; using osu.Game.Database; using osu.Game.IO.Archives; +using osu.Game.Online.API; using osu.Game.Overlays; using osu.Game.Overlays.Notifications; using osu.Game.Rulesets; using osu.Game.Screens.Backgrounds; +using osu.Game.Skinning; using osuTK; using osuTK.Graphics; using Realms; @@ -55,7 +58,8 @@ namespace osu.Game.Screens.Menu private const int exit_delay = 3000; - private Sample seeya; + private SkinnableSound skinnableSeeya; + private ISample seeya; protected virtual string SeeyaSampleName => "Intro/seeya"; @@ -90,14 +94,18 @@ namespace osu.Game.Screens.Menu private BeatmapManager beatmaps { get; set; } [BackgroundDependencyLoader] - private void load(OsuConfigManager config, Framework.Game game, RealmAccess realm) + private void load(OsuConfigManager config, Framework.Game game, RealmAccess realm, IAPIProvider api) { // prevent user from changing beatmap while the intro is still running. beatmap = Beatmap.BeginLease(false); MenuVoice = config.GetBindable(OsuSetting.MenuVoice); MenuMusic = config.GetBindable(OsuSetting.MenuMusic); - seeya = audio.Samples.Get(SeeyaSampleName); + + if (api.LocalUser.Value.IsSupporter) + AddInternal(skinnableSeeya = new SkinnableSound(new SampleInfo(SeeyaSampleName))); + else + seeya = audio.Samples.Get(SeeyaSampleName); // if the user has requested not to play theme music, we should attempt to find a random beatmap from their collection. if (!MenuMusic.Value) @@ -201,7 +209,14 @@ namespace osu.Game.Screens.Menu // we also handle the exit transition. if (MenuVoice.Value) { - seeya.Play(); + // ensure samples have been updated after resume before playing. + ScheduleAfterChildren(() => + { + if (skinnableSeeya != null) + skinnableSeeya.Play(); + else + seeya.Play(); + }); // if playing the outro voice, we have more time to have fun with the background track. // initially fade to almost silent then ramp out over the remaining time.