mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Cleanup external PlayButton.Playing usage
This commit is contained in:
@ -37,14 +37,17 @@ namespace osu.Game.Audio
|
||||
CurrentTrack?.Stop();
|
||||
audio.Track.AddAdjustment(AdjustableProperty.Volume, muteBindable);
|
||||
CurrentTrack = track;
|
||||
CurrentTrack.Stopped += () => CurrentTrack = null;
|
||||
};
|
||||
onTrackStop = () => audio.Track.RemoveAdjustment(AdjustableProperty.Volume, muteBindable);
|
||||
onTrackStop = () =>
|
||||
{
|
||||
audio.Track.RemoveAdjustment(AdjustableProperty.Volume, muteBindable);
|
||||
CurrentTrack = null;
|
||||
};
|
||||
}
|
||||
|
||||
public PreviewTrack Get(BeatmapSetInfo beatmapSetInfo) =>
|
||||
new PreviewTrack(
|
||||
trackManager.Get($"https://b.ppy.sh/preview/{beatmapSetInfo.OnlineBeatmapSetID}.mp3"),
|
||||
trackManager.Get($"https://b.ppy.sh/preview/{beatmapSetInfo?.OnlineBeatmapSetID}.mp3"),
|
||||
onTrackStart,
|
||||
onTrackStop);
|
||||
|
||||
|
Reference in New Issue
Block a user