Dean Herbert
7ceced7012
Scope TestPauseWithLargeOffset
to focus on what matters
...
See https://github.com/ppy/osu/actions/runs/6693917410/job/18186111009
This test is to make sure we don't seek before the original
pause time, so I've exposed that value precisely to avoid
CI woes.
2023-10-31 14:47:04 +09:00
Bartłomiej Dach
fdb81bfa4c
Rename methods to not mention "source clock" anymore
2023-10-26 19:38:52 +02:00
Bartłomiej Dach
565ae99e0d
Fix StopUsingBeatmapClock()
applying adjustments to track it was supposed to stop using
...
- Closes https://github.com/ppy/osu/issues/25248
- Possibly also closes https://github.com/ppy/osu/issues/20475
Regressed in e33486a766
.
`StopUsingBeatmapClock()` intends to, as the name says, stop operating
on the working beatmap clock to yield its usage to other components on
exit. As part of that it tries to unapply audio adjustments so that
other screens can apply theirs freely instead.
However, the aforementioned commit introduced a bug in this. Previously
to it, `track` was an alias for the `SourceClock`, which could be
mutated in an indirect way via `ChangeSource()` calls. The
aforementioned commit made `track` a `readonly` field, initialised in
constructor, which would _never_ change value. In particular, it would
_always_ be the beatmap track, which meant that
`StopUsingBeatmapClock()` would remove the adjustments from the beatmap
track, but then at the end of the method, _apply them onto that same
track again_.
This was only saved by the fact that clock adjustments are removed again
on disposal of the `MasterGameplayClockContainer()`. This - due to async
disposal pressure - could explain infrequently reported cases wherein
the track would just continue to speed up ad infinitum.
To fix, fully substitute the beatmap track for a virtual track at the
point of calling `StopUsingBeatmapClock()`.
2023-10-26 19:38:52 +02:00
Dean Herbert
251a85db43
Fix StopUsingBeatmapClock
not transferring time and running state
2023-09-22 16:22:36 +09:00
Dean Herbert
8367bb6bee
Don't apply decoupling to SpectatorPlayerClock
s
...
See inline comment for reasoning. It's a bit complicated.
2023-09-22 16:22:35 +09:00
Dan Balasescu
7bc8908ca9
Partial everything
2022-11-27 00:00:27 +09:00
o-dasher
feadac1f79
Cleanup all other leftover binding instantiation
2022-09-25 16:02:40 -04:00
Dan Balasescu
b559d4ecdf
Rename GameplayAdjustments -> AdjustmentsFromMods
2022-09-08 17:14:06 +09:00
Salman Ahmed
50923b6e5b
Move track assignment below
2022-09-08 00:25:55 +03:00
Dean Herbert
fa15502384
Move full track adjustment flow inside MasterGameplayClockContainer
2022-09-07 19:12:16 +09:00
Dean Herbert
75d0deef72
Apply proposed changes to remove inheritance from MasterGameplayClockContainer
2022-09-07 17:49:05 +09:00
Dean Herbert
66c44f5913
Delegate interface to valid target
2022-09-06 22:26:46 +09:00
Dean Herbert
bc1212f4e6
Change NonGameplayAdjustments
to GameplayAdjustments
and convert TrueGameplayRate
to extension method
2022-09-06 22:26:46 +09:00
Dean Herbert
266eb758aa
Use new flow to calcaulate TrueGameplayRate
2022-09-05 23:37:49 +09:00
Dean Herbert
7084aeee05
Add method flow to reset applied adjustments
2022-09-05 23:22:38 +09:00
Dean Herbert
e33486a766
Implement IAdjustableAudioComponent
in MasterGameplayClockContainer
2022-09-05 23:20:02 +09:00
Dean Herbert
1bff540381
Remove debug changes
2022-08-29 22:14:07 +09:00
Dean Herbert
75531d2d62
Fix gameplay skipping forward during resume operation
2022-08-29 19:51:16 +09:00
Dean Herbert
29fed0c4a3
Avoid setting the source clock until gameplay is ready to start
...
Without this change, the audio track may audibly seek during load
proceedings.
2022-08-23 18:34:17 +09:00
Dean Herbert
489e172a76
Simplify track start/stop/paused tracking
2022-08-22 19:43:18 +09:00
Dean Herbert
af2e82d7d5
Move operation of setting GameplayClockContainer.StartTime
to Reset
call
2022-08-22 14:11:06 +09:00
Dean Herbert
2c6fd1ec6e
Fix `GameplayClockContainer potentially resetting external seeks
2022-08-18 18:54:10 +09:00
Dean Herbert
6003afafc7
Use FramedBeatmapClock
in GameplayClockContainer
2022-08-18 18:54:10 +09:00
Dean Herbert
343efa1d11
Split OffsetCorrectionClock
out of MasterGameplayClockContainer
2022-08-18 18:54:10 +09:00
Dean Herbert
9735728cf6
Reverse conditionals to better define intent in addSourceClockAdjustments
2022-08-18 15:08:09 +09:00
Dean Herbert
1696a905ba
Reduce exposed properties in GameplayClockContainer
2022-08-15 20:22:36 +09:00
Dean Herbert
704568ae3b
Remove remaining usage of GameplayClock
2022-08-15 20:22:36 +09:00
Dean Herbert
27569e2ed5
Remove FrameStableClock
(and redirect usages to FrameStabilityContainer
)
2022-08-15 19:19:19 +09:00
Dean Herbert
cc4cde2c79
Improve IBeatSyncProvider
interface and reduce beatmap track dependence
2022-08-02 17:59:18 +09:00
Dean Herbert
f71f6302fd
Remove unnecessary null
casts
2022-06-24 14:50:11 +09:00
Dan Balasescu
f8830c6850
Automated #nullable processing
2022-06-17 16:37:17 +09:00
Dean Herbert
007582afb9
Remove unused usings resulting from namespace move
2022-05-22 23:55:33 +09:00
Dean Herbert
eabf578282
Use interface to convey beat sync information
2022-05-22 22:44:54 +09:00
Dan Balasescu
2abdbe53e7
Cleanup whitespace
2022-04-14 18:55:12 +09:00
Dean Herbert
fbf0e5a45c
Remove startFromSkipTarget
parameter and update usages that required said behaviour
2022-04-13 14:25:43 +09:00
Dean Herbert
a59c6013c7
Rename latestGameplayStartTime
to skipTargetTime
2022-04-13 14:03:52 +09:00
Dean Herbert
d4286255a0
Expose and set GameplayStartTime
directly, rather than via Reset
parameter
2022-04-13 13:58:44 +09:00
Dean Herbert
cb6e557212
Fix MasterGameplayClockContainer
having incorrect rate-based offsets immediately after LoadComplete
...
I've attempted to explain why this is required using inline comments.
There's also further conversation at
https://github.com/ppy/osu/pull/17302#issuecomment-1091850927 .
2022-04-11 14:11:26 +09:00
Dean Herbert
8ca9cbc866
Set a more correct initial value for pauseFreqAdjust
...
As the `GameplayClock` now starts paused, this value needs to match to
ensure things work correctly.
For a better explanation of how we got here, see discussion at
https://github.com/ppy/osu/pull/17302#discussion_r830017735 .
2022-03-24 14:50:00 +09:00
Dean Herbert
c6be26eb01
Rename start time calculation method and add more commenting to explain purpose better
2022-03-18 01:35:50 +09:00
Dean Herbert
e3ab5de8cd
Tidy up constructor logic overlap with gameplayStartTime
2022-03-18 01:35:50 +09:00
Dean Herbert
a4a0241800
Use a more explicit flow to set and reset GameplayClockContainer
start time
2022-03-17 20:57:30 +09:00
Bartłomiej Dach
edd361d256
Trim unused using directives
2022-03-03 20:21:48 +01:00
Dean Herbert
cecc746f9e
Update existing usages to use SubscribeToPropertyChanged
2022-03-03 17:42:50 +09:00
Dean Herbert
6c09237956
Reorder fields in BeatmapOffsetControl
and MasterGameplayClockContainer
2022-03-01 20:16:55 +09:00
Dean Herbert
bc2a15db96
Handle cases of beatmaps not existing in realm for tests
2022-03-01 20:12:59 +09:00
Dean Herbert
bb8caabb8b
Subscribe to changes in offset
2022-03-01 20:12:59 +09:00
Dean Herbert
047e801da9
Store and retrieve offset from realm
2022-03-01 20:12:59 +09:00
Salman Ahmed
6556a7e3c3
Handle different gameplay rates when seeking on master clock
2022-01-31 01:40:07 +03:00
Dean Herbert
5f27f1c099
Avoid accounting for the pause pitch adjust effect when "fixing" hardware offset adjustments
...
Bit of an unfortunate one. Because we are applying the pitch adjustment
to the lowest level (`Track`), it's hard to filter out in parent clock
calculations.
Tried a few solutions but this feels the best. Note that we can't just
undo the `pauseFreqAdjust` adjustment as it will div-by-zero.
Closes https://github.com/ppy/osu/issues/14773 .
2021-09-17 15:43:38 +09:00