Expose track from MusicController

This commit is contained in:
smoogipoo
2020-08-05 21:10:38 +09:00
parent 6e42b8219c
commit 5c05fe3988
39 changed files with 204 additions and 283 deletions

View File

@ -44,7 +44,7 @@ namespace osu.Game.Tests.Visual
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e)
{
Clock.ControlPointInfo = e.NewValue.Beatmap.ControlPointInfo;
Clock.ChangeSource(MusicController.GetTrackClock() ?? new StopwatchClock());
Clock.ChangeSource((IAdjustableClock)MusicController.CurrentTrack ?? new StopwatchClock());
Clock.ProcessFrame();
}

View File

@ -1,6 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Extensions.ObjectExtensions;
namespace osu.Game.Tests.Visual
{
/// <summary>
@ -13,7 +15,7 @@ namespace osu.Game.Tests.Visual
base.Update();
// note that this will override any mod rate application
MusicController.Tempo.Value = Clock.Rate;
MusicController.CurrentTrack.AsNonNull().Tempo.Value = Clock.Rate;
}
}
}