mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:25:11 +08:00
More cleanups
This commit is contained in:
parent
031d29ac34
commit
070d71ec27
@ -175,11 +175,11 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
|
||||
private void createDrawableRuleset()
|
||||
{
|
||||
AddUntilStep("wait for beatmap to be loaded", () => MusicController.TrackLoaded);
|
||||
AddUntilStep("wait for beatmap to be loaded", () => MusicController.CurrentTrack.TrackLoaded);
|
||||
|
||||
AddStep("create drawable ruleset", () =>
|
||||
{
|
||||
MusicController.Play(true);
|
||||
MusicController.CurrentTrack.Start();
|
||||
|
||||
SetContents(() =>
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Rulesets.Taiko.Tests.Skinning
|
||||
|
||||
beatmap.ControlPointInfo.Add(0, new TimingControlPoint { BeatLength = 1000 });
|
||||
|
||||
MusicController.Play(true);
|
||||
MusicController.CurrentTrack.Start();
|
||||
});
|
||||
|
||||
AddStep("Load playfield", () => SetContents(() => new TaikoPlayfield(new ControlPointInfo())
|
||||
|
@ -29,6 +29,6 @@ namespace osu.Game.Tests.Skins
|
||||
public void TestRetrieveOggSample() => AddAssert("sample is non-null", () => Beatmap.Value.Skin.GetSample(new SampleInfo("sample")) != null);
|
||||
|
||||
[Test]
|
||||
public void TestRetrieveOggTrack() => AddAssert("track is non-null", () => MusicController.CurrentTrack.IsDummyDevice == false);
|
||||
public void TestRetrieveOggTrack() => AddAssert("track is non-null", () => !MusicController.CurrentTrack.IsDummyDevice);
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
|
||||
Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
|
||||
|
||||
MusicController.Play(true);
|
||||
MusicController.SeekTo(Beatmap.Value.Beatmap.HitObjects.First().StartTime - 1000);
|
||||
MusicController.CurrentTrack.Start();
|
||||
MusicController.CurrentTrack.Seek(Beatmap.Value.Beatmap.HitObjects.First().StartTime - 1000);
|
||||
|
||||
Add(new ModNightcore<HitObject>.NightcoreBeatContainer());
|
||||
|
||||
|
@ -236,7 +236,7 @@ namespace osu.Game.Overlays
|
||||
|
||||
var track = musicController.CurrentTrack;
|
||||
|
||||
if (track.IsDummyDevice == false)
|
||||
if (!track.IsDummyDevice)
|
||||
{
|
||||
progressBar.EndTime = track.Length;
|
||||
progressBar.CurrentTime = track.CurrentTime;
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
@ -64,8 +63,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
waveform.Waveform = b.NewValue.Waveform;
|
||||
track = musicController.CurrentTrack;
|
||||
|
||||
Debug.Assert(track != null);
|
||||
|
||||
if (track.Length > 0)
|
||||
{
|
||||
MaxZoom = getZoomLevelForVisibleMilliseconds(500);
|
||||
|
@ -82,7 +82,7 @@ namespace osu.Game.Screens.Edit
|
||||
beatDivisor.BindValueChanged(divisor => Beatmap.Value.BeatmapInfo.BeatDivisor = divisor.NewValue);
|
||||
|
||||
// Todo: should probably be done at a DrawableRuleset level to share logic with Player.
|
||||
clock = new EditorClock(Beatmap.Value, musicController.CurrentTrack.Length, beatDivisor) { IsCoupled = false };
|
||||
clock = new EditorClock(Beatmap.Value, beatDivisor) { IsCoupled = false };
|
||||
clock.ChangeSource(musicController.CurrentTrack);
|
||||
|
||||
dependencies.CacheAs(clock);
|
||||
@ -348,7 +348,7 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private void resetTrack(bool seekToStart = false)
|
||||
{
|
||||
musicController.Stop();
|
||||
musicController.CurrentTrack.Stop();
|
||||
|
||||
if (seekToStart)
|
||||
{
|
||||
|
@ -25,8 +25,8 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
private readonly DecoupleableInterpolatingFramedClock underlyingClock;
|
||||
|
||||
public EditorClock(WorkingBeatmap beatmap, double trackLength, BindableBeatDivisor beatDivisor)
|
||||
: this(beatmap.Beatmap.ControlPointInfo, trackLength, beatDivisor)
|
||||
public EditorClock(WorkingBeatmap beatmap, BindableBeatDivisor beatDivisor)
|
||||
: this(beatmap.Beatmap.ControlPointInfo, beatmap.GetTrack().Length, beatDivisor)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (setInfo != null)
|
||||
{
|
||||
initialBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]);
|
||||
UsingThemedIntro = initialBeatmap.GetTrack().IsDummyDevice == false;
|
||||
UsingThemedIntro = !initialBeatmap.GetTrack().IsDummyDevice;
|
||||
}
|
||||
|
||||
return UsingThemedIntro;
|
||||
|
Loading…
Reference in New Issue
Block a user