// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using System.IO; using osu.Framework.Audio.Track; using osu.Framework.Graphics.Textures; using osu.Game.Rulesets; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects; using osu.Game.Rulesets.UI; using osu.Game.Skinning; using osu.Game.Storyboards; namespace osu.Game.Beatmaps { public interface IWorkingBeatmap { /// /// Retrieves the which this represents. /// IBeatmap Beatmap { get; } /// /// Retrieves the background for this . /// Texture Background { get; } /// /// Retrieves the for the of this . /// Waveform Waveform { get; } /// /// Retrieves the which this provides. /// Storyboard Storyboard { get; } /// /// Retrieves the which this provides. /// ISkin Skin { get; } /// /// Get the loaded audio track instance. /// Track Track { get; } /// /// Constructs a playable from using the applicable converters for a specific . /// /// The returned is in a playable state - all and s /// have been applied, and s have been fully constructed. /// /// /// The to create a playable for. /// The s to apply to the . /// The maximum length in milliseconds to wait for load to complete. Defaults to 10,000ms. /// The converted . /// If could not be converted to . IBeatmap GetPlayableBeatmap(RulesetInfo ruleset, IReadOnlyList mods = null, TimeSpan? timeout = null); /// /// Load a new audio track instance for this beatmap. This should be called once before accessing . /// The caller of this method is responsible for the lifetime of the track. /// /// /// In a standard game context, the loading of the track is managed solely by MusicController, which will /// automatically load the track of the current global IBindable WorkingBeatmap. /// As such, this method should only be called in very special scenarios, such as external tests or apps which are /// outside of the game context. /// /// A fresh track instance, which will also be available via . Track LoadTrack(); Stream GetStream(string storagePath); } }